From 24800e05983de01da9497acd7c2cab02e9b35e20 Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Fri, 5 May 2023 04:15:29 -0700 Subject: [PATCH] Mac: Fix permission errors when running client as a daemon / system service (PR #5061) --- client/check_security.cpp | 4 ++-- clientgui/mac/SetupSecurity.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/check_security.cpp b/client/check_security.cpp index 86a899b819..a77fc06480 100644 --- a/client/check_security.cpp +++ b/client/check_security.cpp @@ -1,6 +1,6 @@ // This file is part of BOINC. // 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 // 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) return -1041; - if (sbuf.st_gid != boinc_project_gid) + if (sbuf.st_gid != boinc_master_gid) return -1042; if (sbuf.st_uid != 0) // root diff --git a/clientgui/mac/SetupSecurity.cpp b/clientgui/mac/SetupSecurity.cpp index d104d7b9cb..b309502902 100644 --- a/clientgui/mac/SetupSecurity.cpp +++ b/clientgui/mac/SetupSecurity.cpp @@ -1,6 +1,6 @@ // This file is part of BOINC. // 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 // under the terms of the GNU Lesser General Public License @@ -587,7 +587,7 @@ int SetBOINCDataOwnersGroupsAndPermissions() { isDirectory = S_ISDIR(sbuf.st_mode); if ((result == noErr) && (! isDirectory)) { // 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" err = DoSudoPosixSpawn(chownPath, buf1, fullpath, NULL, NULL, NULL, NULL); if (err)