From 98f8029ea194326327f69b47cb0b95c0af72564f Mon Sep 17 00:00:00 2001 From: Joe Rayhawk Date: Thu, 12 May 2011 18:09:32 -0700 Subject: Adding pinyconfig.cgi and rebuildrepo.cgi --- pinyweb/cgi-bin/auth/rebuildrepo.cgi | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 pinyweb/cgi-bin/auth/rebuildrepo.cgi (limited to 'pinyweb/cgi-bin/auth/rebuildrepo.cgi') diff --git a/pinyweb/cgi-bin/auth/rebuildrepo.cgi b/pinyweb/cgi-bin/auth/rebuildrepo.cgi new file mode 100755 index 0000000..0d23fbd --- /dev/null +++ b/pinyweb/cgi-bin/auth/rebuildrepo.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'}, 'rebuildrepo', $q->param('r') ) == 0 ) { + die( 'rebuildrepo was unsuccessful.' ); + }; +} else { + print 'Missing parameters.'; +}; -- cgit v1.2.3