diff options
author | Ian Duffe <joanofarctangent@gmail.com> | 2011-01-18 23:43:26 -0800 |
---|---|---|
committer | Ian Duffe <joanofarctangent@gmail.com> | 2011-01-18 23:43:26 -0800 |
commit | 145dd509a0ed40be03e8b1372cee183703344b36 (patch) | |
tree | c90eee135d96a5cc1adfdedab003634a4c8568a2 /pinyweb/cgi-bin | |
parent | e7dfef272790cf79cce19e3459363e6ee95f73d5 (diff) | |
download | piny-code-145dd509a0ed40be03e8b1372cee183703344b36.tar.gz piny-code-145dd509a0ed40be03e8b1372cee183703344b36.zip |
Adding BEGIN phrase to newuser.cgi
Diffstat (limited to 'pinyweb/cgi-bin')
-rwxr-xr-x | pinyweb/cgi-bin/newuser.cgi | 7 |
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 ); |