src/mercurialserver/refreshauth.py
changeset 85 80fa761c7f5d
parent 79 3a58a95fae2f
child 86 78777f509303
equal deleted inserted replaced
84:964b04126d01 85:80fa761c7f5d
    15 def refreshAuth():
    15 def refreshAuth():
    16     pentry = pwd.getpwuid(os.geteuid())
    16     pentry = pwd.getpwuid(os.geteuid())
    17     if pentry.pw_name != "hg":
    17     if pentry.pw_name != "hg":
    18         # FIXME: re-execute
    18         # FIXME: re-execute
    19         print >>sys.stderr, "Must be run as the 'hg' user"
    19         print >>sys.stderr, "Must be run as the 'hg' user"
       
    20         sys.exit(-1)
    20 
    21 
    21     akeyfile = pentry.pw_dir + "/.ssh/authorized_keys"
    22     akeyfile = pentry.pw_dir + "/.ssh/authorized_keys"
    22     wrappercommand = paths.getExePath() + "/hg-ssh"
    23     wrappercommand = paths.getExePath() + "/hg-ssh"
    23     keydirs = [paths.getEtcPath() + "/keys", pentry.pw_dir + "/repos/hgadmin/keys"]
    24     keydirs = [paths.getEtcPath() + "/keys", pentry.pw_dir + "/repos/hgadmin/keys"]
    24     prefix='no-pty,no-port-forwarding,no-X11-forwarding,no-agent-forwarding,command='
    25     prefix='no-pty,no-port-forwarding,no-X11-forwarding,no-agent-forwarding,command='