summaryrefslogtreecommitdiff
path: root/pinyweb/cgi-bin/auth/addaccess.cgi
diff options
context:
space:
mode:
authorJoe Rayhawk <jrayhawk@omgwallhack.org>2021-03-11 13:37:12 -0800
committerJoe Rayhawk <jrayhawk@omgwallhack.org>2021-03-11 13:37:12 -0800
commita55d110f8eccde182ce8932016d806ec9b97b866 (patch)
treee0aef953309ca6e37ca0cfdc63433d5fe2e5d0ef /pinyweb/cgi-bin/auth/addaccess.cgi
parent19ee32c91c882fbead9cee20c406bc11e195790b (diff)
downloadpiny-code-a55d110f8eccde182ce8932016d806ec9b97b866.tar.gz
piny-code-a55d110f8eccde182ce8932016d806ec9b97b866.zip
pinyweb: delay STDERR redirect until we're properly ready for it
Diffstat (limited to 'pinyweb/cgi-bin/auth/addaccess.cgi')
-rwxr-xr-xpinyweb/cgi-bin/auth/addaccess.cgi4
1 files changed, 2 insertions, 2 deletions
diff --git a/pinyweb/cgi-bin/auth/addaccess.cgi b/pinyweb/cgi-bin/auth/addaccess.cgi
index 02b9cb1..575d9b1 100755
--- a/pinyweb/cgi-bin/auth/addaccess.cgi
+++ b/pinyweb/cgi-bin/auth/addaccess.cgi
@@ -1,8 +1,6 @@
#!/usr/bin/perl
$| = 1;
-open(STDERR, ">&STDOUT");
-
use warnings;
use CGI;
@@ -13,6 +11,8 @@ $q = CGI->new;
print( "Content-type: text/plain\n\n");
+open(STDERR, ">&STDOUT");
+
if( defined( $q->param('r') ) && defined( $q->param('n') ) ) {
unless( system( '/usr/sbin/piny-suid', $ENV{'REMOTE_USER'}, 'addaccess', scalar( $q->param('r') ), scalar( $q->param('n') ) ) == 0 ) {
die( 'Addaccess was unsuccessful.' );