mirror of
https://github.com/linux-msm/cdba.git
synced 2026-02-25 13:11:56 -08:00
16 lines
258 B
Plaintext
16 lines
258 B
Plaintext
|
|
#!/bin/sh
|
||
|
|
|
||
|
|
user=$1
|
||
|
|
cmd=${SSH_ORIGINAL_COMMAND%% *}
|
||
|
|
|
||
|
|
if [ "$cmd" = "git-upload-pack" -o "$cmd" = "git-receive-pack" ]; then
|
||
|
|
if grep -Fxq $user $HOME/admins ; then
|
||
|
|
exec sh -c "$SSH_ORIGINAL_COMMAND"
|
||
|
|
fi
|
||
|
|
|
||
|
|
echo Permission denied
|
||
|
|
exit 1
|
||
|
|
fi
|
||
|
|
|
||
|
|
exec cdba-server
|