mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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>
This commit is contained in:
parent
ae2907a57e
commit
e9485531be
2 changed files with 24 additions and 3 deletions
|
@ -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.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue