mirror of
https://github.com/usnistgov/macos_security.git
synced 2026-03-23 08:20:27 +00:00
fix[rule]: update check for time machine encryption
changing to CIS method Issue #538
This commit is contained in:
@@ -3,15 +3,7 @@ title: Ensure Time Machine Volumes are Encrypted
|
||||
discussion: |
|
||||
Time Machine volumes _MUST_ be encrypted.
|
||||
check: |
|
||||
error_count=0
|
||||
for tm in $(/usr/bin/tmutil destinationinfo 2>/dev/null| /usr/bin/awk -F': ' '/Name/{print $2}'); do
|
||||
tmMounted=$(/usr/sbin/diskutil info "${tm}" 2>/dev/null | /usr/bin/awk '/Mounted/{print $2}')
|
||||
tmEncrypted=$(/usr/sbin/diskutil info "${tm}" 2>/dev/null | /usr/bin/awk '/FileVault/{print $2}')
|
||||
if [[ "$tmMounted" = "Yes" && "$tmEncrypted" = "No" ]]; then
|
||||
((error_count++))
|
||||
fi
|
||||
done
|
||||
echo "$error_count"
|
||||
/usr/bin/sudo /usr/bin/defaults read /Library/Preferences/com.apple.TimeMachine.plist | grep -c NotEncrypted
|
||||
result:
|
||||
integer: 0
|
||||
fix: |
|
||||
|
||||
Reference in New Issue
Block a user