# HG changeset patch # User Steven King # Date 1291134368 18000 # Node ID 57dcdb212d00805283d4826e1c5ade441984e633 # Parent f0630151e057eb6c826d6c5d11bc03c6d8da5071 Fix permissions of authorized_keys file for sshd StrictModes diff -r f0630151e057 -r 57dcdb212d00 src/mercurialserver/refreshauth.py --- a/src/mercurialserver/refreshauth.py Wed Jan 27 17:02:43 2010 +0000 +++ b/src/mercurialserver/refreshauth.py Tue Nov 30 11:26:08 2010 -0500 @@ -4,7 +4,7 @@ import re import base64 -import os +import os, stat import os.path import subprocess from mercurialserver import config @@ -55,6 +55,7 @@ if len(l): akeys.write('%s"%s %s" %s\n' % (prefix, wrappercommand, keyname, l)) akeys.close() + os.chmod(akeyfile + "_new", stat.S_IRUSR) os.rename(akeyfile + "_new", akeyfile) def hook(ui, repo, hooktype, node=None, source=None, **kwargs):