Merge pull request #9063 from cachedout/#6764

Wrap highstate.cache.p in restrictive umask.
This commit is contained in:
Thomas S Hatch 2013-12-05 16:33:58 -08:00
commit 01387050f5

View File

@ -2407,12 +2407,14 @@ class BaseHighState(object):
return err
if not high:
return ret
cumask = os.umask(191)
with salt.utils.fopen(cfn, 'w+') as fp_:
try:
self.serial.dump(high, fp_)
except TypeError:
# Can't serialize pydsl
pass
os.umask(cumask)
return self.state.call_high(high)
def compile_highstate(self):