summaryrefslogtreecommitdiff
path: root/pinyweb/cgi-bin/auth/rmrepo.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'pinyweb/cgi-bin/auth/rmrepo.cgi')
-rwxr-xr-xpinyweb/cgi-bin/auth/rmrepo.cgi22
1 files changed, 22 insertions, 0 deletions
diff --git a/pinyweb/cgi-bin/auth/rmrepo.cgi b/pinyweb/cgi-bin/auth/rmrepo.cgi
new file mode 100755
index 0000000..2d0ff23
--- /dev/null
+++ b/pinyweb/cgi-bin/auth/rmrepo.cgi
@@ -0,0 +1,22 @@
+#!/usr/bin/perl
+$| = 1;
+
+open(STDERR, ">&STDOUT");
+
+use warnings;
+
+use CGI;
+
+use IPC::Open2;
+
+$q = CGI->new;
+
+print( "Content-type: text/plain\n\n");
+
+if( $q->param('r') ) {
+ unless ( system( '/usr/sbin/piny-suid', $ENV{'REMOTE_USER'}, 'rmrepo', $q->param('r') ) == 0 ) {
+ die( 'rmrepo was unsuccessful.' );
+ };
+} else {
+ print 'Missing parameters.';
+};