mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Fix deployment when umask is non-standard. Fixes #29005
This commit is contained in:
parent
fb3c8be32b
commit
2a2c69d77c
@ -217,6 +217,7 @@ def main(argv): # pylint: disable=W0613
|
||||
if not OPTIONS.tty:
|
||||
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)
|
||||
@ -228,6 +229,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…
Reference in New Issue
Block a user