summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Duffe <joanofarctangent@gmail.com>2011-01-18 23:43:26 -0800
committerIan Duffe <joanofarctangent@gmail.com>2011-01-18 23:43:26 -0800
commit145dd509a0ed40be03e8b1372cee183703344b36 (patch)
treec90eee135d96a5cc1adfdedab003634a4c8568a2
parente7dfef272790cf79cce19e3459363e6ee95f73d5 (diff)
downloadpiny-code-145dd509a0ed40be03e8b1372cee183703344b36.tar.gz
piny-code-145dd509a0ed40be03e8b1372cee183703344b36.zip
Adding BEGIN phrase to newuser.cgi
-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 );