mirror of
https://github.com/usnistgov/macos_security.git
synced 2026-03-16 14:02:07 +00:00
Merge branch 'dev_ventura_issue197' into ventura
This commit is contained in:
@@ -7,7 +7,7 @@ discussion: |
|
||||
check: |
|
||||
authDBs=("system.preferences" "system.preferences.energysaver" "system.preferences.network" "system.preferences.printing" "system.preferences.sharing" "system.preferences.softwareupdate" "system.preferences.startupdisk" "system.preferences.timemachine")
|
||||
result="1"
|
||||
for section in $authDBs; do
|
||||
for section in ${authDBs[@]}; do
|
||||
if [[ $(/usr/bin/security -q authorizationdb read "$section" | /usr/bin/xmllint -xpath 'name(//*[contains(text(), "shared")]/following-sibling::*[1])' -) != "false" ]]; then
|
||||
result="0"
|
||||
fi
|
||||
@@ -20,7 +20,7 @@ fix: |
|
||||
----
|
||||
authDBs=("system.preferences" "system.preferences.energysaver" "system.preferences.network" "system.preferences.printing" "system.preferences.sharing" "system.preferences.softwareupdate" "system.preferences.startupdisk" "system.preferences.timemachine")
|
||||
|
||||
for section in $authDBs; do
|
||||
for section in ${authDBs[@]}; do
|
||||
/usr/bin/security -q authorizationdb read "$section" > "/tmp/$section.plist"
|
||||
key_value=$(/usr/libexec/PlistBuddy -c "Print :shared" "/tmp/$section.plist" 2>&1)
|
||||
if [[ "$key_value" == *"Does Not Exist"* ]]; then
|
||||
|
||||
Reference in New Issue
Block a user