aboutsummaryrefslogtreecommitdiffstats
path: root/modules/restrictshell
diff options
context:
space:
mode:
authorOlivier Blin <mageia@blino.org>2016-02-07 13:38:47 +0100
committerOlivier Blin <dev@blino.org>2016-02-07 13:59:29 +0100
commita1ec64e4a39405dec329393a2849bfcbda9c4025 (patch)
tree084b0f0f41754536ed5477a15bde7d641c05f401 /modules/restrictshell
parentc234268e88960dae9b812db591f5b1635facd3e6 (diff)
downloadpuppet-a1ec64e4a39405dec329393a2849bfcbda9c4025.tar
puppet-a1ec64e4a39405dec329393a2849bfcbda9c4025.tar.gz
puppet-a1ec64e4a39405dec329393a2849bfcbda9c4025.tar.bz2
puppet-a1ec64e4a39405dec329393a2849bfcbda9c4025.tar.xz
puppet-a1ec64e4a39405dec329393a2849bfcbda9c4025.zip
sv_membersh: allow gitolite-shell (and enable on duvel)
Diffstat (limited to 'modules/restrictshell')
-rwxr-xr-xmodules/restrictshell/templates/membersh-conf.pl2
-rw-r--r--modules/restrictshell/templates/sv_membersh.pl7
2 files changed, 5 insertions, 4 deletions
diff --git a/modules/restrictshell/templates/membersh-conf.pl b/modules/restrictshell/templates/membersh-conf.pl
index e7be4266..9e0c8bf5 100755
--- a/modules/restrictshell/templates/membersh-conf.pl
+++ b/modules/restrictshell/templates/membersh-conf.pl
@@ -5,7 +5,7 @@ $regexp_svn = "^svnserve -t\$";
#@prepend_args_svn = ( '-r', '/svn' );
@prepend_args_svn = ();
-$bin_git = "/usr/bin/git-shell";
+$bin_git = "/usr/share/gitolite/gitolite-shell";
$bin_rsync = "/usr/bin/rsync";
$regexp_rsync = "^rsync --server";
diff --git a/modules/restrictshell/templates/sv_membersh.pl b/modules/restrictshell/templates/sv_membersh.pl
index d4a6d6d4..0b07f23a 100644
--- a/modules/restrictshell/templates/sv_membersh.pl
+++ b/modules/restrictshell/templates/sv_membersh.pl
@@ -147,10 +147,11 @@ if ($#ARGV == 1 and $ARGV[0] eq "-c") {
push( @args, @args_user );
exec($bin_svn, @args) or die("Failed to exec $bin_svn: $!");
- } elsif ($use_git and $ARGV[1] =~ m:^git-.+:) {
+ } elsif ($use_git and $ARGV[1] =~ m:^$bin_git\b:) {
- # Delegate filtering to git-shell
- exec($bin_git, @ARGV) or die("Failed to exec $bin_git: $!");
+ # Delegate filtering to gitolite-shell
+ my ($gitolite_bin, @rest) = split(' ', $ARGV[1]);
+ exec($bin_git, @rest) or die("Failed to exec $bin_git: $!");
} elsif ($use_pkgsubmit and
$ARGV[1] =~ m:$regexp_pkgsubmit:) {