Commit d5948d59 by James Cammarata

Place retry file in the user's home dir instead of /var/lib/tmp

Addresses CVE-2013-4260: predictable filename used for failed results
in world writable directory.
parent b33ca492
......@@ -447,13 +447,7 @@ class PlayBook(object):
basedir = self.inventory.basedir()
filename = "%s.retry" % os.path.basename(self.filename)
filename = filename.replace(".yml","")
if not os.path.exists('/var/tmp/ansible'):
try:
os.makedirs('/var/tmp/ansible')
except:
pass
filename = os.path.join('/var/tmp/ansible', filename)
filename = os.path.join(os.path.expandvars('$HOME/'), filename)
try:
fd = open(filename, 'w')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment