mirror of
https://github.com/usnistgov/macos_security.git
synced 2026-03-16 22:12:08 +00:00
fix[rule] updated check for USB restricted mode
Updated system_settings_usb_restricted_mode issue #222
This commit is contained in:
@@ -9,8 +9,15 @@ discussion: |
|
||||
====
|
||||
check: |
|
||||
/usr/bin/osascript -l JavaScript << EOS
|
||||
$.NSUserDefaults.alloc.initWithSuiteName('com.apple.applicationaccess')\
|
||||
.objectForKey('allowUSBRestrictedMode').js
|
||||
function run() {
|
||||
let pref1 = ObjC.unwrap($.NSUserDefaults.alloc.initWithSuiteName('com.apple.applicationaccess')\
|
||||
.objectForKey('allowUSBRestrictedMode'))
|
||||
if ( pref1 == false ) {
|
||||
return("false")
|
||||
} else {
|
||||
return("true")
|
||||
}
|
||||
}
|
||||
EOS
|
||||
result:
|
||||
string: "true"
|
||||
|
||||
Reference in New Issue
Block a user