mirror of
https://github.com/munki/munki.git
synced 2026-02-12 18:19:54 -06:00
When matching blocking_applications against running processes, do not match executables inside a bundle, but not in Contents/MacOS.
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>3.5.0</string>
|
||||
<string>3.5.1</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
|
||||
@@ -425,7 +425,7 @@ def getRunningBlockingApps(appnames):
|
||||
if appname.endswith('.app'):
|
||||
# search by filename
|
||||
matching_items = [item for item in proc_list
|
||||
if '/'+ appname + '/' in item]
|
||||
if '/'+ appname + '/Contents/MacOS/' in item]
|
||||
else:
|
||||
# check executable name
|
||||
matching_items = [item for item in proc_list
|
||||
@@ -434,7 +434,7 @@ def getRunningBlockingApps(appnames):
|
||||
if not matching_items:
|
||||
# try adding '.app' to the name and check again
|
||||
matching_items = [item for item in proc_list
|
||||
if '/' + appname + '.app/' in item]
|
||||
if '/' + appname + '.app/Contents/MacOS/' in item]
|
||||
|
||||
matching_items = set(matching_items)
|
||||
for path in matching_items:
|
||||
|
||||
Reference in New Issue
Block a user