diff options
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.' ); + }; +}; |