mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Allow the user that the master is running as to command the master
This fixes an issue where the master could not be started as the literal user. This fixes running tests as non-root
This commit is contained in:
parent
7205c55e8c
commit
299f9d26e6
@ -1526,6 +1526,9 @@ class ClearFuncs(object):
|
||||
elif clear_load['user'] == 'root':
|
||||
if not clear_load.pop('key') == self.key.get(self.opts.get('user', 'root')):
|
||||
return ''
|
||||
elif clear_load['user'] == getpass.getuser():
|
||||
if not clear_load.pop('key') == self.key.get(clear_load['user']):
|
||||
return ''
|
||||
else:
|
||||
if clear_load['user'] in self.key:
|
||||
# User is authorised, check key and check perms
|
||||
@ -1605,7 +1608,10 @@ class ClearFuncs(object):
|
||||
)
|
||||
pub_sock.connect(pull_uri)
|
||||
pub_sock.send(self.serial.dumps(payload))
|
||||
minions = self.ckminions.check_minions(load['tgt'], load.get('tgt_type', 'glob'))
|
||||
minions = self.ckminions.check_minions(
|
||||
load['tgt'],
|
||||
load.get('tgt_type', 'glob')
|
||||
)
|
||||
return {'enc': 'clear',
|
||||
'load': {'jid': clear_load['jid'],
|
||||
'minions': minions}}
|
||||
|
Loading…
Reference in New Issue
Block a user