diff options
author | Julian Blake Kongslie <jblake@omgwallhack.org> | 2011-05-13 15:15:29 -0700 |
---|---|---|
committer | Julian Blake Kongslie <jblake@omgwallhack.org> | 2011-05-13 15:15:29 -0700 |
commit | d9df093f1837f971090def69fb20e5677cb364da (patch) | |
tree | 115b6df9f9a03a79cfdd855003b3b7c0b0447e79 /pinyweb/cgi-bin/auth/lsaccess.cgi | |
parent | c4fb9497982e2f51c1afefd43f94be8c6cc74edc (diff) | |
parent | 9a8be1d87c03fbcdbc7b62e1369cdfe3f5aba193 (diff) | |
download | piny-code-d9df093f1837f971090def69fb20e5677cb364da.tar.gz piny-code-d9df093f1837f971090def69fb20e5677cb364da.zip |
Merge branch 'master' of ssh://piny/srv/git/piny-code
Diffstat (limited to 'pinyweb/cgi-bin/auth/lsaccess.cgi')
-rwxr-xr-x | pinyweb/cgi-bin/auth/lsaccess.cgi | 24 |
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..354ba32 --- /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( defined( $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.' ); + }; +}; |