summaryrefslogtreecommitdiff
path: root/pinyweb
diff options
context:
space:
mode:
Diffstat (limited to 'pinyweb')
-rwxr-xr-xpinyweb/cgi-bin/newuser.cgi7
1 files changed, 7 insertions, 0 deletions
diff --git a/pinyweb/cgi-bin/newuser.cgi b/pinyweb/cgi-bin/newuser.cgi
index 1950515..ee499be 100755
--- a/pinyweb/cgi-bin/newuser.cgi
+++ b/pinyweb/cgi-bin/newuser.cgi
@@ -2,6 +2,13 @@
$| = 1;
use warnings;
+
+BEGIN {
+ if ( not defined $ENV{"SUDO_UID"} ) {
+ exec( "sudo", "/usr/lib/cgi-bin/piny/newuser.cgi", @ARGV );
+ };
+};
+
use CGI qw/:standard *p *table *Tr/;
use Email::Valid::Loose qw( );
my ( $JSCRIPT, $error, $email, $username, $password1, $password2 );