Re: [RFC] Secure central repositories by UNIX socket authentication

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Sun, 27 Jan 2008, Shawn O. Pearce wrote:

>     ## Owner (not jdoe)
>     ##
>   cat >foo.git/hooks/update <<'EOF'
>   #!/bin/sh
>   test -z "$GIT_REMOTE_USER" || exit
>   case "$GIT_REMOTE_USER" in
>   jdoe)     exit 0;;
>   spearce)  exit 0;;
>   *)        exit 1
>   esac
>   EOF
>   chmod u+x foo.git/hooks/update
>   chmod 700 foo.git
> 
>   git daemon \
>       --export-all \
>       --enable=receive-pack \
>       --base=`pwd` \
>       --listen=/tmp/shawn-git
> 
>     ## Other User
>     ##
>   git push jdoe@server:/tmp/shawn-git/foo.git master

I probably miss something, but if you already go through SSH, the $USER is 
set appropriately, no?

So you could do without git-daemon entirely, and replace the 
GIT_REMOTE_USER variable in the hook by USER.

Ciao,
Dscho

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux