From 926ca248fd95ac946508bca7a511d50ae4a13de2 Mon Sep 17 00:00:00 2001 From: Dmitry Baryshkov Date: Sat, 8 Jul 2023 17:12:21 +0300 Subject: [PATCH] cdba-shell: set the CDBA_USER variable Set and export the CDBA_USER variable to enable ACL in cdba-server. Signed-off-by: Dmitry Baryshkov --- shell/cdba-shell | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 shell/cdba-shell diff --git a/shell/cdba-shell b/shell/cdba-shell old mode 100644 new mode 100755 index b23c197..d6c9992 --- a/shell/cdba-shell +++ b/shell/cdba-shell @@ -1,10 +1,10 @@ #!/bin/sh -user=$1 +export CDBA_USER="$1" cmd=${SSH_ORIGINAL_COMMAND%% *} if [ "$cmd" = "git-upload-pack" -o "$cmd" = "git-receive-pack" ]; then - if grep -Fxq $user $HOME/admins ; then + if grep -Fxq $CDBA_USER $HOME/admins ; then exec sh -c "$SSH_ORIGINAL_COMMAND" fi