diff -r 32131253c2f1 -r 3606d60b07e5 src/refresh-auth --- a/src/refresh-auth Fri Oct 30 16:55:07 2009 +0000 +++ b/src/refresh-auth Mon Nov 09 12:15:09 2009 +0000 @@ -8,19 +8,17 @@ import sys import os -import pwd from mercurialserver import refreshauth, paths if len(sys.argv) != 1: sys.stderr.write("refresh-auth: must be called with no arguments (%s)\n" % sys.argv) sys.exit(-1) -pentry = pwd.getpwuid(os.geteuid()) -if pentry.pw_name != "hg": - # FIXME: re-execute +# To protect the authorized_keys file for innocent users, you have to have +# a ~/.mercurial-server file to run this. +if not paths.configExists(): print >>sys.stderr, "Must be run as the 'hg' user" sys.exit(-1) paths.setExePath() - -refreshauth.refreshAuth(pentry.pw_dir) +refreshauth.refreshAuth()