From 145dd509a0ed40be03e8b1372cee183703344b36 Mon Sep 17 00:00:00 2001 From: Ian Duffe Date: Tue, 18 Jan 2011 23:43:26 -0800 Subject: Adding BEGIN phrase to newuser.cgi --- pinyweb/cgi-bin/newuser.cgi | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'pinyweb') 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 ); -- cgit v1.2.3