Mac installer: Create RealName field for users boinc_master and boinc_project and set it to empty string

svn path=/trunk/boinc/; revision=25337
This commit is contained in:
Charlie Fenton 2012-02-24 21:07:40 +00:00
parent 08d7dcd6d9
commit 353e703443
1 changed files with 5 additions and 2 deletions

View File

@ -845,13 +845,16 @@ static OSStatus CreateUserAndGroup(char * user_name, char * group_name) {
setRealName: setRealName:
// Always set the RealName field to an empty string // 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" // 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) if (err)
return err; return err;
// Something like 'dscl . -change /users/boinc_master RealName ""' // 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) if (err)
return err; return err;