--- loncom/lond 2000/12/13 22:45:56 1.33 +++ loncom/lond 2001/01/10 17:53:51 1.35 @@ -9,7 +9,7 @@ # 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 # # based on "Perl Cookbook" ISBN 1-56592-243-3 # preforker - server who forks first @@ -57,6 +57,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. loncron 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"; @@ -533,8 +543,7 @@ sub make_new_child { } } unless ($fperror) { - if ($umode eq 'none') { - } elsif ($umode eq 'krb4') { + if ($umode eq 'krb4') { { my $pf = IO::File->new(">$passfilename"); print $pf "krb4:$npass\n";