set authorized_keys file to 0600 when it is made with Salt

This commit is contained in:
Thomas S Hatch 2012-01-27 20:47:08 -07:00
parent 7dfe4b4312
commit e42561b5cf

View File

@ -239,6 +239,7 @@ def set_auth_key(
if not os.path.isfile(fconfig):
open(fconfig, 'a+').write('\n{0}'.format(auth_line))
os.chown(fconfig, uinfo['uid'], uinfo['gid'])
os.chmod(fconfig, 384)
else:
open(fconfig, 'a+').write('\n{0}'.format(auth_line))
return 'new'