diff -r 107906bfe2c6 -r 5dd3698fad54 src/refresh-auth --- a/src/refresh-auth Tue Oct 13 18:32:26 2009 +0100 +++ b/src/refresh-auth Mon Nov 09 16:23:04 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()