From d750725a34ae213e277318d18db533a5b7eb1b3e Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Mon, 17 Oct 2011 21:53:37 +0530 Subject: [PATCH] fix rsync adc to call check_access the correct way... also a test fix --- contrib/adc/rsync | 4 ++-- t/t65-rsync | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/adc/rsync b/contrib/adc/rsync index 41a70a1..a61b984 100755 --- a/contrib/adc/rsync +++ b/contrib/adc/rsync @@ -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 # (taken as a refex) using rsync. -check_access('EXTCMD/rsync', "NAME/$path", $perm); - # that should "die" if there's a problem +my $ret = check_access('EXTCMD/rsync', "NAME/$path", $perm, 1); +die "$perm NAME/$path $ENV{GL_USER} $ret\n" if $ret =~ /DENIED/; wrap_chdir($RSYNC_BASE); log_it(); diff --git a/t/t65-rsync b/t/t65-rsync index c56b8df..153d31f 100644 --- a/t/t65-rsync +++ b/t/t65-rsync @@ -83,6 +83,6 @@ expect "total size is" name "u3 rsync to bar" cd ~/gitolite-admin 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"