--- a/src/refresh-auth Sat Mar 07 09:48:10 2009 +0000
+++ b/src/refresh-auth Sat Mar 07 09:55:01 2009 +0000
@@ -7,12 +7,20 @@
# WARNING
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
+ print >>sys.stderr, "Must be run as the 'hg' user"
+ sys.exit(-1)
+
paths.setExePath()
-refreshauth.refreshAuth()
+refreshauth.refreshAuth(pentry.pw_dir)