summaryrefslogtreecommitdiff
path: root/pinyweb/cgi-bin/auth/newrepo.cgi
diff options
context:
space:
mode:
authorjrayhawk+piny.be@omgwallhack.org <jrayhawk@dev.piny.svcs.cs.pdx.edu>2011-01-21 03:35:21 -0800
committerjrayhawk+piny.be@omgwallhack.org <jrayhawk@dev.piny.svcs.cs.pdx.edu>2011-01-21 03:35:21 -0800
commitc0337286c8b72331c0ba1abb11cf7142bc479f0a (patch)
tree7c05dc0cd9b505ea1c4398d83a64f5c678413b02 /pinyweb/cgi-bin/auth/newrepo.cgi
parent11eeba59ae41328083f090b3d4f812585e86b0a7 (diff)
downloadpiny-code-c0337286c8b72331c0ba1abb11cf7142bc479f0a.tar.gz
piny-code-c0337286c8b72331c0ba1abb11cf7142bc479f0a.zip
Adding slew of simple piny-suid cgis
Diffstat (limited to 'pinyweb/cgi-bin/auth/newrepo.cgi')
-rwxr-xr-xpinyweb/cgi-bin/auth/newrepo.cgi9
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] );