refactor[rules]: Fixed xpath

Updated xpath to output all keys equaling DisabledPreferencePanes.

This fixes if there are multiple profiles setting the same key.

Issue #193
This commit is contained in:
Bob Gendler
2022-11-02 09:25:11 -04:00
parent 039a8118b1
commit 3fdbd2a5ac

View File

@@ -5,7 +5,7 @@ discussion: |
Disabling the system setting prevents login to Apple ID and iCloud.
check: |
/usr/bin/profiles show -output stdout-xml | /usr/bin/xmllint --xpath 'string(//*[contains(text(), "DisabledSystemSettings")]/following-sibling::*[1])' - | /usr/bin/grep -c com.apple.systempreferences.AppleIDSettings
/usr/bin/profiles show -output stdout-xml | /usr/bin/xmllint --xpath '//key[text()="DisabledSystemSettings"]/following-sibling::*[1]' - | /usr/bin/grep -c com.apple.systempreferences.AppleIDSettings
result:
integer: 1
fix: |