summaryrefslogtreecommitdiffstats
path: root/git-interface/git-serve.py
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2015-06-23 14:18:12 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2015-06-27 13:04:03 +0200
commite9485531be24b090162ec317bd3a3de3ec9a3d82 (patch)
tree4f97fbd36f78dc3239a4b1e876992ffbe390d36e /git-interface/git-serve.py
parentae2907a57ec50bba2c74d4ce1d137fe822fddf3b (diff)
downloadaurweb-e9485531be24b090162ec317bd3a3de3ec9a3d82.tar.xz
git: Use AUR_USER env var instead of ForceCommand argument
Also add an utility function for formatting the ForceCommand, using shlex.quote to quote the value. Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'git-interface/git-serve.py')
-rwxr-xr-xgit-interface/git-serve.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-interface/git-serve.py b/git-interface/git-serve.py
index 02086e0..9c9bddd 100755
--- a/git-interface/git-serve.py
+++ b/git-interface/git-serve.py
@@ -106,7 +106,7 @@ def die(msg):
def die_with_help(msg):
die(msg + "\nTry `{:s} help` for a list of commands.".format(ssh_cmdline))
-user = sys.argv[1]
+user = os.environ.get("AUR_USER")
cmd = os.environ.get("SSH_ORIGINAL_COMMAND")
if not cmd:
die_with_help("Interactive shell is disabled.")