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 #28830
This commit is contained in:
parent
d9c32011b4
commit
bbccb752f9
1 changed files with 4 additions and 0 deletions
|
@ -92,8 +92,10 @@ def get_hash(path, form='sha1', chunk_size=4096):
|
|||
def unpack_thin(thin_path):
|
||||
"""Unpack the Salt thin archive."""
|
||||
tfile = tarfile.TarFile.gzopen(thin_path)
|
||||
old_umask = os.umask(0o077)
|
||||
tfile.extractall(path=OPTIONS.saltdir)
|
||||
tfile.close()
|
||||
os.umask(old_umask)
|
||||
os.unlink(thin_path)
|
||||
|
||||
|
||||
|
@ -114,8 +116,10 @@ def unpack_ext(ext_path):
|
|||
'minion',
|
||||
'extmods')
|
||||
tfile = tarfile.TarFile.gzopen(ext_path)
|
||||
old_umask = os.umask(0o077)
|
||||
tfile.extractall(path=modcache)
|
||||
tfile.close()
|
||||
os.umask(old_umask)
|
||||
os.unlink(ext_path)
|
||||
ver_path = os.path.join(modcache, 'ext_version')
|
||||
ver_dst = os.path.join(OPTIONS.saltdir, 'ext_version')
|
||||
|
|
Loading…
Add table
Reference in a new issue