mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #38667 from rallytime/bp-37982
Back-port #37982 to 2016.11
This commit is contained in:
commit
89dc86e2bc
1 changed files with 1 additions and 1 deletions
|
@ -1165,7 +1165,7 @@ def hash_known_hosts(user=None, config=None):
|
|||
origmode = os.stat(full).st_mode
|
||||
cmd = ['ssh-keygen', '-H', '-f', full]
|
||||
cmd_result = __salt__['cmd.run'](cmd, python_shell=False)
|
||||
os.stat(full, origmode)
|
||||
os.chmod(full, origmode)
|
||||
# ssh-keygen creates a new file, thus a chown is required.
|
||||
if os.geteuid() == 0 and user:
|
||||
uinfo = __salt__['user.info'](user)
|
||||
|
|
Loading…
Add table
Reference in a new issue