mirror of
https://github.com/linux-msm/cdba.git
synced 2026-02-25 13:11:56 -08:00
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 <dmitry.baryshkov@linaro.org>
This commit is contained in:
4
shell/cdba-shell
Normal file → Executable file
4
shell/cdba-shell
Normal file → Executable file
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user