--- loncom/lond 2000/12/13 16:41:43 1.31 +++ loncom/lond 2001/03/15 13:50:16 1.37 @@ -9,7 +9,10 @@ # 06/26 Scott Harrison # 06/29,06/30,07/14,07/15,07/17,07/20,07/25,09/18 Gerd Kortemeyer # 12/05 Scott Harrison -# 12/05,12/13 Gerd Kortemeyer +# 12/05,12/13,12/29 Gerd Kortemeyer +# Jan 01 Scott Harrison +# 02/12 Gerd Kortemeyer +# 03/15 Scott Harrison # # based on "Perl Cookbook" ISBN 1-56592-243-3 # preforker - server who forks first @@ -57,6 +60,16 @@ while ($configline=) { } close(CONFIG); +# ----------------------------- Make sure this process is running from user=www +my $wwwid=getpwnam('www'); +if ($wwwid!=$<) { + $emailto="$perlvar{'lonAdmEMail'},$perlvar{'lonSysEMail'}"; + $subj="LON: $perlvar{'lonHostID'} User ID mismatch"; + system("echo 'User ID mismatch. lond must be run as user www.' |\ + mailto $emailto -s '$subj' > /dev/null"); + exit 1; +} + # --------------------------------------------- Check if other instance running my $pidfile="$perlvar{'lonDaemons'}/logs/lond.pid"; @@ -477,6 +490,8 @@ sub make_new_child { my ($cmd,$udom,$uname,$upass,$npass)=split(/:/,$userinput); chomp($npass); + $upass=&unescape($upass); + $npass=&unescape($npass); my $proname=propath($udom,$uname); my $passfilename="$proname/passwd"; if (-e $passfilename) { @@ -511,6 +526,7 @@ sub make_new_child { my ($cmd,$udom,$uname,$umode,$npass)=split(/:/,$userinput); chomp($npass); + $npass=&unescape($npass); my $proname=propath($udom,$uname); my $passfilename="$proname/passwd"; if (-e $passfilename) { @@ -530,11 +546,10 @@ sub make_new_child { } } unless ($fperror) { - if ($umode eq 'none') { - } elsif ($umode eq 'kerberos') { + if ($umode eq 'krb4') { { my $pf = IO::File->new(">$passfilename"); - print $pf "kerberos:$npass\n"; + print $pf "krb4:$npass\n"; } print $client "ok\n"; } elsif ($umode eq 'internal') { @@ -903,7 +918,8 @@ sub make_new_child { $allkeys.=$key.':'; $hash{"$version:$rid:$key"}=$value; } - $allkeys=~s/:$//; + $hash{"$version:$rid:timestamp"}=$now; + $allkeys.='timestamp'; $hash{"$version:keys:$rid"}=$allkeys; if (untie(%hash)) { print $client "ok\n"; 500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.