# HG changeset patch # User Paul Crowley # Date 1258115563 0 # Node ID 72e7ba8b41a6b53441d67a36e8be2fe5004228a5 # Parent ab5e0e4f5a0cbcd716f716c47a9428e073adf5f3 Don't hardwire location of authorized_keys file diff -r ab5e0e4f5a0c -r 72e7ba8b41a6 src/init/dot-mercurial-server --- a/src/init/dot-mercurial-server Fri Nov 13 12:30:06 2009 +0000 +++ b/src/init/dot-mercurial-server Fri Nov 13 12:32:43 2009 +0000 @@ -3,6 +3,7 @@ [paths] repos = ~/repos +authorizedkeys = ~/.ssh/authorized_keys keys = /etc/mercurial-server/keys:~/repos/hgadmin/keys access = /etc/mercurial-server/access.conf:~/repos/hgadmin/access.conf diff -r ab5e0e4f5a0c -r 72e7ba8b41a6 src/mercurialserver/config.py --- a/src/mercurialserver/config.py Fri Nov 13 12:30:06 2009 +0000 +++ b/src/mercurialserver/config.py Fri Nov 13 12:32:43 2009 +0000 @@ -28,6 +28,7 @@ for p in _getConf()["paths"][name].split(":")] def getReposPath(): return _getPath("repos") +def getAuthorizedKeysPath(): return _getPath("authorized_keys") def getKeysPaths(): return _getPaths("keys") def getAccessPaths(): return _getPaths("access") diff -r ab5e0e4f5a0c -r 72e7ba8b41a6 src/mercurialserver/refreshauth.py --- a/src/mercurialserver/refreshauth.py Fri Nov 13 12:30:06 2009 +0000 +++ b/src/mercurialserver/refreshauth.py Fri Nov 13 12:32:43 2009 +0000 @@ -15,7 +15,7 @@ goodkey = re.compile("[/A-Za-z0-9._-]+$") def refreshAuth(): - akeyfile = os.path.expanduser("~/.ssh/authorized_keys") + akeyfile = config.getAuthorizedKeysPath() wrappercommand = config.getExePath() + "/hg-ssh" prefix='no-pty,no-port-forwarding,no-X11-forwarding,no-agent-forwarding,command='