diff options
Diffstat (limited to 'modules/restrictshell/templates')
| -rwxr-xr-x | modules/restrictshell/templates/membersh-conf.pl | 4 | ||||
| -rw-r--r-- | modules/restrictshell/templates/sv_membersh.pl | 9 |
2 files changed, 7 insertions, 6 deletions
diff --git a/modules/restrictshell/templates/membersh-conf.pl b/modules/restrictshell/templates/membersh-conf.pl index ea7d2957..9e0c8bf5 100755 --- a/modules/restrictshell/templates/membersh-conf.pl +++ b/modules/restrictshell/templates/membersh-conf.pl @@ -5,13 +5,13 @@ $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"; $regexp_dir_rsync = "^/.*"; -$bin_sftp = "<%= lib_dir %>/ssh/sftp-server"; +$bin_sftp = "<%= @lib_dir %>/ssh/sftp-server"; $regexp_sftp = "^(/usr/lib{64,}/ssh/sftp-server|/usr/lib/sftp-server|/usr/libexec/sftp-server|/usr/lib/openssh/sftp-server)"; foreach my $f (glob("/etc/membersh-conf.d/allow_*pl")) { diff --git a/modules/restrictshell/templates/sv_membersh.pl b/modules/restrictshell/templates/sv_membersh.pl index 155bc300..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:) { @@ -169,7 +170,7 @@ if ($#ARGV == 1 and $ARGV[0] eq "-c") { } unless (-e "/etc/membersh-errormsg") { - if ($ARGV) { + if (@ARGV) { print STDERR "You tried to execute: @ARGV[1..$#ARGV]\n"; } else { print STDERR "You tried to run a interactive shell.\n" |
