diff options
author | jrayhawk+piny.be@omgwallhack.org <jrayhawk@dev.piny.svcs.cs.pdx.edu> | 2011-01-21 03:35:21 -0800 |
---|---|---|
committer | jrayhawk+piny.be@omgwallhack.org <jrayhawk@dev.piny.svcs.cs.pdx.edu> | 2011-01-21 03:35:21 -0800 |
commit | c0337286c8b72331c0ba1abb11cf7142bc479f0a (patch) | |
tree | 7c05dc0cd9b505ea1c4398d83a64f5c678413b02 /pinyweb/cgi-bin/auth/rmaccess.cgi | |
parent | 11eeba59ae41328083f090b3d4f812585e86b0a7 (diff) | |
download | piny-code-c0337286c8b72331c0ba1abb11cf7142bc479f0a.tar.gz piny-code-c0337286c8b72331c0ba1abb11cf7142bc479f0a.zip |
Adding slew of simple piny-suid cgis
Diffstat (limited to 'pinyweb/cgi-bin/auth/rmaccess.cgi')
-rwxr-xr-x | pinyweb/cgi-bin/auth/rmaccess.cgi | 22 |
1 files changed, 22 insertions, 0 deletions
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.'; +}; |