Files

16 lines
277 B
Bash
Raw Permalink Normal View History

#!/bin/sh
2023-07-08 17:12:21 +03:00
export CDBA_USER="$1"
cmd=${SSH_ORIGINAL_COMMAND%% *}
if [ "$cmd" = "git-upload-pack" -o "$cmd" = "git-receive-pack" ]; then
2023-07-08 17:12:21 +03:00
if grep -Fxq $CDBA_USER $HOME/admins ; then
exec sh -c "$SSH_ORIGINAL_COMMAND"
fi
echo Permission denied
exit 1
fi
exec cdba-server