mirror of
https://github.com/linux-msm/cdba.git
synced 2026-02-25 13:11:56 -08:00
Introduce some scripts to allow storing users public keys in a git and some hooks such that when this is pushed to the server the authorized_keys file is re-generated. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
16 lines
258 B
Bash
16 lines
258 B
Bash
#!/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
|