summaryrefslogtreecommitdiff
path: root/pinyweb/cgi-bin/auth
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
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')
-rwxr-xr-xpinyweb/cgi-bin/auth/addaccess.cgi4
-rwxr-xr-xpinyweb/cgi-bin/auth/lsaccess.cgi4
-rwxr-xr-xpinyweb/cgi-bin/auth/lsrepo.cgi4
-rwxr-xr-xpinyweb/cgi-bin/auth/newpass.cgi4
-rwxr-xr-xpinyweb/cgi-bin/auth/newrepo.cgi4
-rwxr-xr-xpinyweb/cgi-bin/auth/pinyconfig.cgi4
-rwxr-xr-xpinyweb/cgi-bin/auth/rebuildrepo.cgi4
-rwxr-xr-xpinyweb/cgi-bin/auth/rmaccess.cgi4
-rwxr-xr-xpinyweb/cgi-bin/auth/rmrepo.cgi4
9 files changed, 18 insertions, 18 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.' );
diff --git a/pinyweb/cgi-bin/auth/lsaccess.cgi b/pinyweb/cgi-bin/auth/lsaccess.cgi
index 000d794..2de6f26 100755
--- a/pinyweb/cgi-bin/auth/lsaccess.cgi
+++ b/pinyweb/cgi-bin/auth/lsaccess.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') ) ) {
unless ( system( '/usr/sbin/piny-suid', $ENV{'REMOTE_USER'}, 'lsaccess', scalar( $q->param('r') ) ) == 0 ) {
die( 'lsaccess was unsuccessful.' );
diff --git a/pinyweb/cgi-bin/auth/lsrepo.cgi b/pinyweb/cgi-bin/auth/lsrepo.cgi
index 3513b5f..fa42952 100755
--- a/pinyweb/cgi-bin/auth/lsrepo.cgi
+++ b/pinyweb/cgi-bin/auth/lsrepo.cgi
@@ -1,8 +1,6 @@
#!/usr/bin/perl
$| = 1;
-open(STDERR, ">&STDOUT");
-
use warnings;
use CGI;
@@ -13,6 +11,8 @@ use IPC::Open2;
print( "Content-type: text/plain\n\n");
+open(STDERR, ">&STDOUT");
+
unless ( system( '/usr/sbin/piny-suid', $ENV{'REMOTE_USER'}, 'lsrepo' ) == 0 ) {
die( 'lsrepo was unsuccessful.' );
};
diff --git a/pinyweb/cgi-bin/auth/newpass.cgi b/pinyweb/cgi-bin/auth/newpass.cgi
index b367558..4f4a636 100755
--- a/pinyweb/cgi-bin/auth/newpass.cgi
+++ b/pinyweb/cgi-bin/auth/newpass.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('p') ) ) {
my @saltchars =
diff --git a/pinyweb/cgi-bin/auth/newrepo.cgi b/pinyweb/cgi-bin/auth/newrepo.cgi
index 46c5993..dfd9f02 100755
--- a/pinyweb/cgi-bin/auth/newrepo.cgi
+++ b/pinyweb/cgi-bin/auth/newrepo.cgi
@@ -1,8 +1,6 @@
#!/usr/bin/perl
$| = 1;
-open(STDERR, ">&STDOUT");
-
use warnings;
use CGI;
@@ -15,6 +13,8 @@ my @cmd;
print( "Content-type: text/plain\n\n");
+open(STDERR, ">&STDOUT");
+
if( defined( $q->param('r') ) && defined( $q->param('d') ) ) { # repository, description
@cmd = ( '/usr/sbin/piny-suid', $ENV{'REMOTE_USER'}, 'newrepo', '--batch', '--enable-ikiwiki', $q->param('r') );
diff --git a/pinyweb/cgi-bin/auth/pinyconfig.cgi b/pinyweb/cgi-bin/auth/pinyconfig.cgi
index f660032..1bb03e9 100755
--- a/pinyweb/cgi-bin/auth/pinyconfig.cgi
+++ b/pinyweb/cgi-bin/auth/pinyconfig.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') ) && defined( $q->param('v') ) ) {
unless( system( '/usr/sbin/piny-suid', $ENV{'REMOTE_USER'}, 'pinyconfig', scalar( $q->param('r') ), scalar( $q->param('n') ), scalar( $q->param('v') ) ) == 0 ) {
die( 'pinyconfig was unsuccessful.' );
diff --git a/pinyweb/cgi-bin/auth/rebuildrepo.cgi b/pinyweb/cgi-bin/auth/rebuildrepo.cgi
index 1452573..5139f2d 100755
--- a/pinyweb/cgi-bin/auth/rebuildrepo.cgi
+++ b/pinyweb/cgi-bin/auth/rebuildrepo.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') ) ) {
unless ( system( '/usr/sbin/piny-suid', $ENV{'REMOTE_USER'}, 'rebuildrepo', scalar( $q->param('r') ) ) == 0 ) {
die( 'rebuildrepo was unsuccessful.' );
diff --git a/pinyweb/cgi-bin/auth/rmaccess.cgi b/pinyweb/cgi-bin/auth/rmaccess.cgi
index 24147ba..afad0df 100755
--- a/pinyweb/cgi-bin/auth/rmaccess.cgi
+++ b/pinyweb/cgi-bin/auth/rmaccess.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'}, 'rmaccess', scalar( $q->param('r') ), scalar( $q->param('n') ) ) == 0 ) {
die( 'rmaccess was unsuccessful.' );
diff --git a/pinyweb/cgi-bin/auth/rmrepo.cgi b/pinyweb/cgi-bin/auth/rmrepo.cgi
index 54f1a09..88e2be6 100755
--- a/pinyweb/cgi-bin/auth/rmrepo.cgi
+++ b/pinyweb/cgi-bin/auth/rmrepo.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') ) ) {
unless ( system( '/usr/sbin/piny-suid', $ENV{'REMOTE_USER'}, 'rmrepo', scalar( $q->param('r') ) ) == 0 ) {
die( 'rmrepo was unsuccessful.' );