From c0337286c8b72331c0ba1abb11cf7142bc479f0a Mon Sep 17 00:00:00 2001 From: "jrayhawk+piny.be@omgwallhack.org" Date: Fri, 21 Jan 2011 03:35:21 -0800 Subject: Adding slew of simple piny-suid cgis --- pinyweb/cgi-bin/auth/rmaccess.cgi | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 pinyweb/cgi-bin/auth/rmaccess.cgi (limited to 'pinyweb/cgi-bin/auth/rmaccess.cgi') diff --git a/pinyweb/cgi-bin/auth/rmaccess.cgi b/pinyweb/cgi-bin/auth/rmaccess.cgi new file mode 100755 index 0000000..5123041 --- /dev/null +++ b/pinyweb/cgi-bin/auth/rmaccess.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') ) { + unless ( system( '/usr/sbin/piny-suid', $ENV{'REMOTE_USER'}, 'rmaccess', $q->param('r'), $q->param('n') ) == 0 ) { + die( 'rmaccess was unsuccessful.' ); + }; +} else { + print 'Missing parameters.'; +}; -- cgit v1.2.3