summaryrefslogtreecommitdiff
path: root/pinyweb/cgi-bin/auth/lsaccess.cgi
diff options
context:
space:
mode:
authorjrayhawk+piny.be@omgwallhack.org <jrayhawk+piny.be@omgwallhack.org>2011-05-12 20:04:07 -0700
committerjrayhawk+piny.be@omgwallhack.org <jrayhawk+piny.be@omgwallhack.org>2011-05-12 20:04:07 -0700
commit336f98bc53c1ca862d696d18642ed552f425724e (patch)
tree4765e3e6c9bfb48a24291be2acbafeea5819fc45 /pinyweb/cgi-bin/auth/lsaccess.cgi
parent98f8029ea194326327f69b47cb0b95c0af72564f (diff)
downloadpiny-code-336f98bc53c1ca862d696d18642ed552f425724e.tar.gz
piny-code-336f98bc53c1ca862d696d18642ed552f425724e.zip
Add lsaccess.cgi and lsrepo.cgi
Diffstat (limited to 'pinyweb/cgi-bin/auth/lsaccess.cgi')
-rwxr-xr-xpinyweb/cgi-bin/auth/lsaccess.cgi24
1 files changed, 24 insertions, 0 deletions
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.' );
+ };
+};