--- loncom/lond 2002/02/06 14:18:09 1.68.2.1 +++ loncom/lond 2002/02/12 23:08:27 1.71 @@ -2,7 +2,7 @@ # The LearningOnline Network # lond "LON Daemon" Server (port "LOND" 5663) # -# $Id: lond,v 1.68.2.1 2002/02/06 14:18:09 albertel Exp $ +# $Id: lond,v 1.71 2002/02/12 23:08:27 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -48,6 +48,9 @@ # 12/22 Gerd Kortemeyer # YEAR=2002 # 01/20/02,02/05 Gerd Kortemeyer +# 02/05 Guy Albertelli +# 02/07 Scott Harrison +# 02/12 Gerd Kortemeyer ### # based on "Perl Cookbook" ISBN 1-56592-243-3 @@ -136,7 +139,7 @@ open (CONFIG,"$perlvar{'lonTabDir'}/host while ($configline=) { my ($id,$domain,$role,$name,$ip)=split(/:/,$configline); - chomp($ip); + chomp($ip); $ip=~s/\D+$//; $hostid{$ip}=$id; if ($id eq $perlvar{'lonHostID'}) { $thisserver=$name; } $PREFORK++; @@ -534,7 +537,6 @@ sub make_new_child { while (my $userinput=<$client>) { chomp($userinput); &status('Processing '.$hostid{$clientip}.': '.$userinput); - &logthis('Processing '.$hostid{$clientip}.': '.$userinput); my $wasenc=0; alarm(120); # ------------------------------------------------------------ See if encrypted @@ -551,9 +553,7 @@ sub make_new_child { $userinput=substr($userinput,0,$cmdlength); $wasenc=1; } - &logthis('Decrypted '.$hostid{$clientip}.': '.$userinput); - } - + } # ------------------------------------------------------------- Normal commands # ------------------------------------------------------------------------ ping if ($userinput =~ /^ping/) { @@ -640,10 +640,13 @@ sub make_new_child { $pwdcorrect=!$?; } } elsif ($howpwd eq 'krb4') { + $null=pack("C",0); + unless ($upass=~/$null/) { $pwdcorrect=( Authen::Krb4::get_pw_in_tkt($uname,"", $contentpwd,'krbtgt',$contentpwd,1, $upass) == 0); + } else { $pwdcorrect=0; } } elsif ($howpwd eq 'localauth') { $pwdcorrect=&localauth::localauth($uname,$upass, $contentpwd); @@ -1377,7 +1380,6 @@ sub make_new_child { # -------------------------------------------------------------------- complete alarm(0); &status('Listening to '.$hostid{$clientip}); - &logthis('Completed '.$userinput.' Listening to '.$hostid{$clientip}); } # --------------------------------------------- client unknown or fishy, refuse } else {