mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Merge pull request #6923 from jacksontj/develop
Fix for compound command and glob tgt not being a string
This commit is contained in:
commit
96102e7e12
@ -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(
|
||||
|
@ -1408,6 +1408,9 @@ class Matcher(object):
|
||||
'''
|
||||
Returns true if the passed glob matches the id
|
||||
'''
|
||||
if type(tgt) != str:
|
||||
return False
|
||||
|
||||
return fnmatch.fnmatch(self.opts['id'], tgt)
|
||||
|
||||
def pcre_match(self, tgt):
|
||||
|
Loading…
Reference in New Issue
Block a user