From 336f98bc53c1ca862d696d18642ed552f425724e Mon Sep 17 00:00:00 2001 From: "jrayhawk+piny.be@omgwallhack.org" Date: Thu, 12 May 2011 20:04:07 -0700 Subject: Add lsaccess.cgi and lsrepo.cgi --- pinyweb/cgi-bin/auth/lsaccess.cgi | 24 ++++++++++++++++++++++++ pinyweb/cgi-bin/auth/lsrepo.cgi | 18 ++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100755 pinyweb/cgi-bin/auth/lsaccess.cgi create mode 100755 pinyweb/cgi-bin/auth/lsrepo.cgi (limited to 'pinyweb/cgi-bin/auth') diff --git a/pinyweb/cgi-bin/auth/lsaccess.cgi b/pinyweb/cgi-bin/auth/lsaccess.cgi new file mode 100755 index 0000000..f7c9a06 --- /dev/null +++ b/pinyweb/cgi-bin/auth/lsaccess.cgi @@ -0,0 +1,24 @@ +#!/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'}, 'lsaccess', $q->param('r') ) == 0 ) { + die( 'lsaccess was unsuccessful.' ); + }; +} else { + unless ( system( '/usr/sbin/piny-suid', $ENV{'REMOTE_USER'}, 'lsaccess' ) == 0 ) { + die( 'lsaccess was unsuccessful.' ); + }; +}; diff --git a/pinyweb/cgi-bin/auth/lsrepo.cgi b/pinyweb/cgi-bin/auth/lsrepo.cgi new file mode 100755 index 0000000..599eb80 --- /dev/null +++ b/pinyweb/cgi-bin/auth/lsrepo.cgi @@ -0,0 +1,18 @@ +#!/usr/bin/perl +$| = 1; + +open(STDERR, ">&STDOUT"); + +use warnings; + +use CGI; + +use IPC::Open2; + +$q = CGI->new; + +print( "Content-type: text/plain\n\n"); + +unless ( system( '/usr/sbin/piny-suid', $ENV{'REMOTE_USER'}, 'lsrepo' ) == 0 ) { + die( 'lsrepo was unsuccessful.' ); +}; -- cgit v1.2.3