Created
August 18, 2017 16:04
-
-
Save weswhet/fde1b0ef348a0e3deb4fb03318c692b8 to your computer and use it in GitHub Desktop.
munki pkginfo for checking that the Crypt Mechanisms are in the Authorization Database.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>autoremove</key> | |
<false/> | |
<key>blocking_applications</key> | |
<array/> | |
<key>catalogs</key> | |
<array> | |
<string>Production</string> | |
</array> | |
<key>category</key> | |
<string>Security</string> | |
<key>description</key> | |
<string></string> | |
<key>developer</key> | |
<string>MacOps</string> | |
<key>display_name</key> | |
<string>Crypt Filevault Encryption Mechanisms</string> | |
<key>icon_name</key> | |
<string>Filevault.png</string> | |
<key>installcheck_script</key> | |
<string>#!/usr/bin/python | |
from plistlib import readPlistFromString | |
from subprocess import check_output | |
'''Checks to see if all the Crypt pieces are in the authorizationdb''' | |
def get_mechs(): | |
'''returns a list of all current authdb mechanisms''' | |
cmd = ["/usr/bin/security", "authorizationdb", "read", "system.login.console"] | |
cur_mech_plist = readPlistFromString(check_output(cmd)) | |
mechs_only = cur_mech_plist['mechanisms'] | |
return mechs_only | |
mechs = ['Crypt:Check,privileged', 'Crypt:CryptGUI', 'Crypt:Enablement,privileged'] | |
current_mechs = get_mechs() | |
for crypt_mech in mechs: | |
if not crypt_mech in current_mechs: | |
exit(0) | |
exit(1)</string> | |
<key>installed_size</key> | |
<integer>7372</integer> | |
<key>installer_item_hash</key> | |
<string>cryptinstallerhash</string> | |
<key>installer_item_location</key> | |
<string>path/to/crypt/installer</string> | |
<key>installer_item_size</key> | |
<integer>2912</integer> | |
<key>minimum_os_version</key> | |
<string>10.5.0</string> | |
<key>name</key> | |
<string>crypt_mechanisms</string> | |
<key>unattended_install</key> | |
<true/> | |
<key>unattended_uninstall</key> | |
<false/> | |
<key>uninstall_method</key> | |
<string>removepackages</string> | |
<key>uninstallable</key> | |
<false/> | |
<key>update_for</key> | |
<array> | |
<string>Crypt</string> | |
</array> | |
<key>version</key> | |
<string>2.2.0.61</string> | |
</dict> | |
</plist> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment