Commit e075607c by Michael DeHaan

Merge pull request #2859 from swayf/fix/authorized_key_chown_on_link

fix for authorized_key on debian squeeze
parents 736700f3 3531fbdb
......@@ -140,8 +140,12 @@ def keyfile(module, user, write=False, path=None, manage_dir=True):
if module.selinux_enabled():
module.set_default_selinux_context(keysfile, False)
os.chown(keysfile, uid, gid)
os.chmod(keysfile, 0600)
try:
os.chown(keysfile, uid, gid)
os.chmod(keysfile, 0600)
except OSError:
pass
return keysfile
def readkeys(filename):
......
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