Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac: After MacOS update, repair primary groups for users boinc_master, boinc_project #6088

Merged
merged 14 commits into from
Feb 27, 2025

Conversation

CharlieFenton
Copy link
Contributor

Fixes #5588 #5910 #5975 #6044

Description of the Change
Every MacOS update changes the primary group of user boinc_master from group boinc_master to staff (20), and changes the primary group of user boinc_project from group boinc_project to staff (20). This PR adds code to fix them when needed. It also adds corresponding code to the command-line utility Mac_SA_Secure.sh.

Alternate Designs
The incorrect primary groups caused problems with use of GPUs which were difficult to diagnose. I implemented #5502 to prevent BOINC from being run with the wrong primary groups by generating permissions error -1301 telling the user to reinstall BOINC. This PR is in response to complaints from users about needing to perform this extra step.

Release Notes
Automatically fix permissions error -1301 on Macs after updating the operating system.

@CharlieFenton CharlieFenton marked this pull request as draft February 16, 2025 10:44

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

Files not reviewed (9)
  • client/check_security.cpp: Language not supported
  • client/file_names.h: Language not supported
  • clientgui/DlgEventLog.h: Language not supported
  • clientgui/mac/MacFixUserGroups.cpp: Language not supported
  • clientgui/mac/SetupSecurity.cpp: Language not supported
  • mac_build/Mac_SA_Secure.sh: Language not supported
  • mac_build/boinc.xcodeproj/project.pbxproj: Language not supported
  • mac_installer/release_boinc.sh: Language not supported
  • mac_installer/release_brand.sh: Language not supported
@CharlieFenton
Copy link
Contributor Author

Please do not merge yet. I need to do some testing in the next few days.

@NenTech
Copy link

NenTech commented Feb 22, 2025

Please do not merge yet. I need to do some testing in the next few days.

@CharlieFenton do you want me to test it as well?

@NenTech
Copy link

NenTech commented Feb 23, 2025

I did build from the mentioned branch. I get the following error:
image

Copy link

codecov bot commented Feb 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 11.95%. Comparing base (2c222cc) to head (87ad9cf).
Report is 140 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #6088   +/-   ##
=========================================
  Coverage     11.95%   11.95%           
  Complexity     1068     1068           
=========================================
  Files           280      278    -2     
  Lines         36982    36938   -44     
  Branches       8533     8529    -4     
=========================================
- Hits           4420     4416    -4     
+ Misses        32162    32121   -41     
- Partials        400      401    +1     

see 7 files with indirect coverage changes

@CharlieFenton
Copy link
Contributor Author

@NenTech Thank you for trying to test, but the changes are more extensive than the BOINC Manager. You need to copy the new Fix_BOINC_Users executable into the BIONC Data folder before running the Mac_SA_Secure.sh script. Even better is to build and run the Mac installer.

@CharlieFenton
Copy link
Contributor Author

I have now finished testing this PR. It is ready for merging after completing CI checks.

@CharlieFenton CharlieFenton changed the title [WIP] Mac: After MacOS update, repair primary groups for users boinc_master, boinc_project Mac: After MacOS update, repair primary groups for users boinc_master, boinc_project Feb 27, 2025
@CharlieFenton CharlieFenton marked this pull request as ready for review February 27, 2025 12:24
@CharlieFenton
Copy link
Contributor Author

@NenTech Thank you for trying to test, but the changes are more extensive than the BOINC Manager. You need to copy the new Fix_BOINC_Users executable into the BIONC Data folder before running the Mac_SA_Secure.sh script. Even better is to build and run the Mac installer.

Note that the Mac_SA_Secure.sh script has also bee updated as part of this PR.

@AenBleidd AenBleidd requested a review from Copilot February 27, 2025 13:02

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

@AenBleidd
Copy link
Member

@CharlieFenton, thank you for taking care of this!

@AenBleidd AenBleidd merged commit eb1561b into master Feb 27, 2025
153 checks passed
@AenBleidd AenBleidd deleted the Mac_fix_after_mac_update branch February 27, 2025 13:07
@NenTech
Copy link

NenTech commented Feb 27, 2025

@NenTech Thank you for trying to test, but the changes are more extensive than the BOINC Manager. You need to copy the new Fix_BOINC_Users executable into the BIONC Data folder before running the Mac_SA_Secure.sh script. Even better is to build and run the Mac installer.

I did build the BOINC Manager first and afterwards the installer starting from your branch. But that gave me the error I showed you. I'll try to build again from the master branch now.

@NenTech
Copy link

NenTech commented Feb 27, 2025

Building from the master succeeded and I am testing the latest merge now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment