summaryrefslogtreecommitdiff
path: root/pinyweb
diff options
context:
space:
mode:
authorJoe Rayhawk <jrayhawk@omgwallhack.org>2011-05-12 18:09:32 -0700
committerJoe Rayhawk <jrayhawk@omgwallhack.org>2011-05-12 18:09:32 -0700
commit98f8029ea194326327f69b47cb0b95c0af72564f (patch)
tree499628b3ec4c18a050e393cab38fa511c61972cc /pinyweb
parent0452db3d392040db271baf8e6d2da5d697097300 (diff)
downloadpiny-code-98f8029ea194326327f69b47cb0b95c0af72564f.tar.gz
piny-code-98f8029ea194326327f69b47cb0b95c0af72564f.zip
Adding pinyconfig.cgi and rebuildrepo.cgi
Diffstat (limited to 'pinyweb')
-rwxr-xr-xpinyweb/cgi-bin/auth/pinyconfig.cgi22
-rwxr-xr-xpinyweb/cgi-bin/auth/rebuildrepo.cgi22
2 files changed, 44 insertions, 0 deletions
diff --git a/pinyweb/cgi-bin/auth/pinyconfig.cgi b/pinyweb/cgi-bin/auth/pinyconfig.cgi
new file mode 100755
index 0000000..f852a56
--- /dev/null
+++ b/pinyweb/cgi-bin/auth/pinyconfig.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') && $q->param('n') && $q->param('v') ) {
+ unless( system( '/usr/sbin/piny-suid', $ENV{'REMOTE_USER'}, 'pinyconfig', $q->param('r'), $q->param('n'), $q->param('v') ) == 0 ) {
+ die( 'pinyconfig was unsuccessful.' );
+ };
+} else {
+ print 'Missing parameters.';
+};
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.';
+};