mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix deployment when umask is non-standard. Fixes #29005
This commit is contained in:
parent
bbccb752f9
commit
4da11a5f3c
1 changed files with 2 additions and 0 deletions
|
@ -216,6 +216,7 @@ def main(argv): # pylint: disable=W0613
|
|||
sys.stdout.flush()
|
||||
sys.stderr.write(OPTIONS.delimiter + '\n')
|
||||
sys.stderr.flush()
|
||||
old_umask = os.umask(0o077)
|
||||
if OPTIONS.tty:
|
||||
stdout, _ = subprocess.Popen(salt_argv, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
|
||||
sys.stdout.write(stdout)
|
||||
|
@ -227,6 +228,7 @@ def main(argv): # pylint: disable=W0613
|
|||
shutil.rmtree(OPTIONS.saltdir)
|
||||
else:
|
||||
os.execv(sys.executable, salt_argv)
|
||||
os.umask(old_umask)
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main(sys.argv))
|
||||
|
|
Loading…
Add table
Reference in a new issue