From 353e703443ea68d965be0bd5ba42caf6feff6592 Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Fri, 24 Feb 2012 21:07:40 +0000 Subject: [PATCH] Mac installer: Create RealName field for users boinc_master and boinc_project and set it to empty string svn path=/trunk/boinc/; revision=25337 --- clientgui/mac/SetupSecurity.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/clientgui/mac/SetupSecurity.cpp b/clientgui/mac/SetupSecurity.cpp index cc02aa07ab..0ce4b7270d 100644 --- a/clientgui/mac/SetupSecurity.cpp +++ b/clientgui/mac/SetupSecurity.cpp @@ -845,13 +845,16 @@ static OSStatus CreateUserAndGroup(char * user_name, char * group_name) { setRealName: // Always set the RealName field to an empty string + // Note: create RealName with empty string fails under OS 10.7, but + // creating it with non-empty string and changing to empty string does work. + // // Something like "dscl . -create /users/boinc_master RealName tempName" - err = DoPrivilegedExec(dsclPath, ".", "-create", buf2, "RealName", "tempName", NULL); + err = DoPrivilegedExec(dsclPath, ".", "-create", buf2, "RealName", user_name, NULL); if (err) return err; // Something like 'dscl . -change /users/boinc_master RealName ""' - err = DoPrivilegedExec(dsclPath, ".", "-change", buf2, "RealName", "tempName", ""); + err = DoPrivilegedExec(dsclPath, ".", "-change", buf2, "RealName", user_name, ""); if (err) return err;