mirror of
https://github.com/usnistgov/macos_security.git
synced 2026-02-09 00:09:55 +00:00
sysprefs_system_wide_preferences_configure shared key doesn't exist on some systems #224
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @TSPARR on GitHub.
Summary
On some systems, the
sharedkey does not exist in the output from/usr/bin/security authorizationdb read system.preferences > /tmp/system.preferences.plistSteps to reproduce
I am unaware of how systems get into this state as it appears to be a non-standard configuration; however, I have seen multiple systems throughout our client base in this state. To emulate such a system, after outputting to
/tmp/system.preferences.plist, you can pause and edit the file to remove thesharedkey manually. From there, attempting to run/usr/libexec/PlistBuddy -c "Set :shared false" /tmp/system.preferences.plistfails and the finding is not remediated.Operating System version
12.6.0 (21G115)
What is the current bug behavior?
The finding is not remediated and the
sharedkey is not created.What is the expected correct behavior?
The finding should be remediated regardless including creating the key if it does not already exists.
Relevant logs and/or screenshots
Output of checks
Possible fixes
Doing a check for the existence of the key and created it if it doesn't exist should prevent this issue going forward for those systems which are in this state. There's likely a better way to check for its existence than mine; however, this code does work as expected.
@robertgendler commented on GitHub:
Solved by PR #178 and #179