mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Add support for compound functions in client_acl_blacklist
This commit is contained in:
parent
0bc4d423bf
commit
6e764f5ce5
@ -1989,9 +1989,16 @@ class ClearFuncs(object):
|
||||
|
||||
# check if the cmd is blacklisted
|
||||
for module_re in self.opts['client_acl_blacklist'].get('modules', []):
|
||||
if re.match(module_re, clear_load['fun']):
|
||||
good = False
|
||||
break
|
||||
# if this is a regular command, its a single function
|
||||
if type(clear_load['fun']) == str:
|
||||
funs_to_check = [ clear_load['fun'] ]
|
||||
# if this a compound function
|
||||
else:
|
||||
funs_to_check = clear_load['fun']
|
||||
for func in funs_to_check:
|
||||
if re.match(module_re, fun):
|
||||
good = False
|
||||
break
|
||||
|
||||
if good is False:
|
||||
log.error(
|
||||
|
Loading…
Reference in New Issue
Block a user