mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Keep $HOME from being interpretted by Master shell
The command is being sent to a shelled ssh call which allows $HOME to get interpreted by the local shell. This is usually different than the remote user when using sudo (ie, /root vs /home/user) and causes it to fail to find the shim script. Should fix bugs: https://github.com/saltstack/salt/issues/25134 and https://github.com/saltstack/salt/issues/24863
This commit is contained in:
parent
65ab5aa495
commit
1fd6fc6ce3
@ -926,10 +926,10 @@ ARGS = {9}\n'''.format(self.minion_config,
|
||||
pass
|
||||
|
||||
# Execute shim
|
||||
ret = self.shell.exec_cmd('/bin/sh $HOME/{0}'.format(target_shim_file))
|
||||
ret = self.shell.exec_cmd('/bin/sh \'$HOME/{0}\''.format(target_shim_file))
|
||||
|
||||
# Remove shim from target system
|
||||
self.shell.exec_cmd('rm $HOME/{0}'.format(target_shim_file))
|
||||
self.shell.exec_cmd('rm \'$HOME/{0}\''.format(target_shim_file))
|
||||
|
||||
return ret
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user