mirror of https://github.com/BOINC/boinc.git
Mac installer: revert to using a wrapper application around installer package
svn path=/trunk/boinc/; revision=24710
This commit is contained in:
parent
db4518aaff
commit
fda5fbf456
|
@ -218,6 +218,8 @@ OSStatus GetFinalAction(CFStringRef *restartValue)
|
||||||
group *grp = NULL;
|
group *grp = NULL;
|
||||||
gid_t boinc_master_gid = 0, boinc_project_gid = 0;
|
gid_t boinc_master_gid = 0, boinc_project_gid = 0;
|
||||||
uid_t boinc_master_uid = 0, boinc_project_uid = 0;
|
uid_t boinc_master_uid = 0, boinc_project_uid = 0;
|
||||||
|
OSStatus err = noErr;
|
||||||
|
long response;
|
||||||
char loginName[256];
|
char loginName[256];
|
||||||
|
|
||||||
*restartValue = valueRestartRequired;
|
*restartValue = valueRestartRequired;
|
||||||
|
@ -227,24 +229,18 @@ OSStatus GetFinalAction(CFStringRef *restartValue)
|
||||||
return noErr; // Group boinc_master does not exist
|
return noErr; // Group boinc_master does not exist
|
||||||
|
|
||||||
boinc_master_gid = grp->gr_gid;
|
boinc_master_gid = grp->gr_gid;
|
||||||
if (boinc_master_gid < 501)
|
|
||||||
return noErr; // We will change boinc_master_gid to a value > 501
|
|
||||||
|
|
||||||
grp = getgrnam(boinc_project_group_name);
|
grp = getgrnam(boinc_project_group_name);
|
||||||
if (grp == NULL)
|
if (grp == NULL)
|
||||||
return noErr; // Group boinc_project does not exist
|
return noErr; // Group boinc_project does not exist
|
||||||
|
|
||||||
boinc_project_gid = grp->gr_gid;
|
boinc_project_gid = grp->gr_gid;
|
||||||
if (boinc_project_gid < 501)
|
|
||||||
return noErr; // We will change boinc_project_gid to a value > 501
|
|
||||||
|
|
||||||
pw = getpwnam(boinc_master_user_name);
|
pw = getpwnam(boinc_master_user_name);
|
||||||
if (pw == NULL)
|
if (pw == NULL)
|
||||||
return noErr; // User boinc_master does not exist
|
return noErr; // User boinc_master does not exist
|
||||||
|
|
||||||
boinc_master_uid = pw->pw_uid;
|
boinc_master_uid = pw->pw_uid;
|
||||||
if (boinc_master_uid < 501)
|
|
||||||
return noErr; // We will change boinc_master_uid to a value > 501
|
|
||||||
|
|
||||||
if (pw->pw_gid != boinc_master_gid)
|
if (pw->pw_gid != boinc_master_gid)
|
||||||
return noErr; // User boinc_master does not have group boinc_master as its primary group
|
return noErr; // User boinc_master does not have group boinc_master as its primary group
|
||||||
|
@ -253,12 +249,20 @@ OSStatus GetFinalAction(CFStringRef *restartValue)
|
||||||
if (pw == NULL)
|
if (pw == NULL)
|
||||||
return noErr; // User boinc_project does not exist
|
return noErr; // User boinc_project does not exist
|
||||||
|
|
||||||
boinc_project_uid = pw->pw_uid;
|
|
||||||
if (boinc_project_uid < 501)
|
|
||||||
return noErr; // We will change boinc_project_uid to a value > 501
|
|
||||||
|
|
||||||
if (pw->pw_gid != boinc_project_gid)
|
if (pw->pw_gid != boinc_project_gid)
|
||||||
return noErr; // User boinc_project does not have group boinc_project as its primary group
|
return noErr; // User boinc_project does not have group boinc_project as its primary group
|
||||||
|
|
||||||
|
err = Gestalt(gestaltSystemVersion, &response);
|
||||||
|
if ((err == noErr) && (response >= 0x1050)) {
|
||||||
|
if (boinc_master_gid < 501)
|
||||||
|
return noErr; // We will change boinc_master_gid to a value > 501
|
||||||
|
if (boinc_project_gid < 501)
|
||||||
|
return noErr; // We will change boinc_project_gid to a value > 501
|
||||||
|
if (boinc_master_uid < 501)
|
||||||
|
return noErr; // We will change boinc_master_uid to a value > 501
|
||||||
|
if (boinc_project_uid < 501)
|
||||||
|
return noErr; // We will change boinc_project_uid to a value > 501
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef SANDBOX
|
#ifdef SANDBOX
|
||||||
strncpy(loginName, getenv("USER"), sizeof(loginName)-1);
|
strncpy(loginName, getenv("USER"), sizeof(loginName)-1);
|
||||||
|
|
Loading…
Reference in New Issue