Add dropfile function to utils

This commit is contained in:
Thomas S Hatch 2013-04-19 17:15:32 -06:00
parent f6fd94015e
commit c9f5e30976

View File

@ -965,6 +965,18 @@ def valid_url(url, protos):
return False
def dropfile():
'''
Set an aes dropfile to update the publish session key
'''
dfn = os.path.join(self.opts['cachedir'], '.dfn')
aes = salt.crypt.Crypticle.generate_key_string()
mask = os.umask(191)
with open(dfn, 'w+') as fp_:
fp_.write(aes)
os.umask(mask)
def parse_docstring(docstring):
'''
Parse a docstring into its parts.