From e9485531be24b090162ec317bd3a3de3ec9a3d82 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Tue, 23 Jun 2015 14:18:12 +0200 Subject: git: Use AUR_USER env var instead of ForceCommand argument MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also add an utility function for formatting the ForceCommand, using shlex.quote to quote the value. Signed-off-by: Johannes Löthberg Signed-off-by: Lukas Fleischer --- git-interface/git-serve.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git-interface/git-serve.py') diff --git a/git-interface/git-serve.py b/git-interface/git-serve.py index 02086e0d..9c9bddd5 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.") -- cgit v1.2.3-24-g4f1b