diff options
Diffstat (limited to 'pinyweb/cgi-bin/auth/newrepo.cgi')
-rwxr-xr-x | pinyweb/cgi-bin/auth/newrepo.cgi | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pinyweb/cgi-bin/auth/newrepo.cgi b/pinyweb/cgi-bin/auth/newrepo.cgi index ad3cdd7..000be02 100755 --- a/pinyweb/cgi-bin/auth/newrepo.cgi +++ b/pinyweb/cgi-bin/auth/newrepo.cgi @@ -1,6 +1,8 @@ #!/usr/bin/perl $| = 1; +open(STDERR, ">&STDOUT"); + use warnings; use CGI; @@ -11,10 +13,9 @@ $q = CGI->new; print( "Content-type: text/plain\n\n"); -if( $q->param('n') && $q->param('d') ) { - unless( open2( OUT, IN, '/usr/sbin/piny-suid', $ENV{'REMOTE_USER'}, 'newrepo', '--batch', $q->param('n') ) ) { - print 'could not execute newrepo'; - die; +if( $q->param('r') && $q->param('d') ) { + unless( open2( OUT, IN, '/usr/sbin/piny-suid', $ENV{'REMOTE_USER'}, 'newrepo', '--batch', $q->param('r') ) ) { + die 'could not execute newrepo'; }; # make things flushier select( (select(IN), $| = 1)[0] ); |