fix rsync adc to call check_access the correct way...

also a test fix
This commit is contained in:
Sitaram Chamarty 2011-10-17 21:53:37 +05:30
parent 85da5572b2
commit d750725a34
2 changed files with 3 additions and 3 deletions

View file

@ -34,8 +34,8 @@ die "I dont like '..' paths in $cmd\n" if $path =~ /\.\./;
# ok now check if we're permitted to execute a $perm action on $path # ok now check if we're permitted to execute a $perm action on $path
# (taken as a refex) using rsync. # (taken as a refex) using rsync.
check_access('EXTCMD/rsync', "NAME/$path", $perm); my $ret = check_access('EXTCMD/rsync', "NAME/$path", $perm, 1);
# that should "die" if there's a problem die "$perm NAME/$path $ENV{GL_USER} $ret\n" if $ret =~ /DENIED/;
wrap_chdir($RSYNC_BASE); wrap_chdir($RSYNC_BASE);
log_it(); log_it();

View file

@ -83,6 +83,6 @@ expect "total size is"
name "u3 rsync to bar" name "u3 rsync to bar"
cd ~/gitolite-admin cd ~/gitolite-admin
runlocal rsync -avP conf u3:bar runlocal rsync -avP conf u3:bar
expect "W NAME/bar EXTCMD/rsync u3 DENIED by fallthru" expect "W NAME/bar u3 DENIED by fallthru"
name "INTERNAL" name "INTERNAL"