Mac: Fix permission errors when running client as a daemon / system service (PR #5061)

This commit is contained in:
Charlie Fenton 2023-05-05 04:15:29 -07:00
parent 5b8fba8990
commit 24800e0598
2 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
// This file is part of BOINC. // This file is part of BOINC.
// http://boinc.berkeley.edu // http://boinc.berkeley.edu
// Copyright (C) 2022 University of California // Copyright (C) 2023 University of California
// //
// BOINC is free software; you can redistribute it and/or modify it // BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License // under the terms of the GNU Lesser General Public License
@ -432,7 +432,7 @@ int use_sandbox, int isManager, char* path_to_error, int len
if (retval) if (retval)
return -1041; return -1041;
if (sbuf.st_gid != boinc_project_gid) if (sbuf.st_gid != boinc_master_gid)
return -1042; return -1042;
if (sbuf.st_uid != 0) // root if (sbuf.st_uid != 0) // root

View File

@ -1,6 +1,6 @@
// This file is part of BOINC. // This file is part of BOINC.
// http://boinc.berkeley.edu // http://boinc.berkeley.edu
// Copyright (C) 2022 University of California // Copyright (C) 2023 University of California
// //
// BOINC is free software; you can redistribute it and/or modify it // BOINC is free software; you can redistribute it and/or modify it
// under the terms of the GNU Lesser General Public License // under the terms of the GNU Lesser General Public License
@ -587,7 +587,7 @@ int SetBOINCDataOwnersGroupsAndPermissions() {
isDirectory = S_ISDIR(sbuf.st_mode); isDirectory = S_ISDIR(sbuf.st_mode);
if ((result == noErr) && (! isDirectory)) { if ((result == noErr) && (! isDirectory)) {
// Set owner and group of setprojectgrp application // Set owner and group of setprojectgrp application
sprintf(buf1, "root:%s", boinc_project_group_name); sprintf(buf1, "root:%s", boinc_master_group_name);
// chown root:boinc_project "/Library/Application Support/BOINC Data/switcher/setprojectgrp" // chown root:boinc_project "/Library/Application Support/BOINC Data/switcher/setprojectgrp"
err = DoSudoPosixSpawn(chownPath, buf1, fullpath, NULL, NULL, NULL, NULL); err = DoSudoPosixSpawn(chownPath, buf1, fullpath, NULL, NULL, NULL, NULL);
if (err) if (err)