version 1.91, 2002/08/22 20:00:00
|
version 1.95, 2002/09/09 14:04:02
|
Line 107 $SIG{'QUIT'}=\&catchexception;
|
Line 107 $SIG{'QUIT'}=\&catchexception;
|
$SIG{__DIE__}=\&catchexception; |
$SIG{__DIE__}=\&catchexception; |
|
|
# ---------------------------------- Read loncapa_apache.conf and loncapa.conf |
# ---------------------------------- Read loncapa_apache.conf and loncapa.conf |
&status("Read loncapa_apache.conf and loncapa.conf"); |
&status("Read loncapa.conf and loncapa_apache.conf"); |
my $perlvarref=LONCAPA::Configuration::read_conf('loncapa_apache.conf', |
my $perlvarref=LONCAPA::Configuration::read_conf('loncapa.conf'); |
'loncapa.conf'); |
|
my %perlvar=%{$perlvarref}; |
my %perlvar=%{$perlvarref}; |
undef $perlvarref; |
undef $perlvarref; |
|
|
Line 501 sub make_new_child {
|
Line 500 sub make_new_child {
|
# ============================================================================= |
# ============================================================================= |
# do something with the connection |
# do something with the connection |
# ----------------------------------------------------------------------------- |
# ----------------------------------------------------------------------------- |
|
$client->sockopt(SO_KEEPALIVE, 1);# Enable monitoring of |
|
# connection liveness. |
# see if we know client and check for spoof IP by challenge |
# see if we know client and check for spoof IP by challenge |
my $caller=getpeername($client); |
my $caller=getpeername($client); |
my ($port,$iaddr)=unpack_sockaddr_in($caller); |
my ($port,$iaddr)=unpack_sockaddr_in($caller); |
Line 660 sub make_new_child {
|
Line 661 sub make_new_child {
|
$null=pack("C",0); |
$null=pack("C",0); |
unless ($upass=~/$null/) { |
unless ($upass=~/$null/) { |
my $krbclient=&Authen::Krb5::parse_name($uname.'@'.$contentpwd); |
my $krbclient=&Authen::Krb5::parse_name($uname.'@'.$contentpwd); |
&logthis("Realm ".$krbclient->realm); |
|
my $krbservice="krbtgt/".$contentpwd."\@".$contentpwd; |
my $krbservice="krbtgt/".$contentpwd."\@".$contentpwd; |
my $krbserver=&Authen::Krb5::parse_name($krbservice); |
my $krbserver=&Authen::Krb5::parse_name($krbservice); |
my $credentials=&Authen::Krb5::cc_default(); |
my $credentials=&Authen::Krb5::cc_default(); |
Line 668 sub make_new_child {
|
Line 668 sub make_new_child {
|
my $krbreturn = |
my $krbreturn = |
&Authen::Krb5::get_in_tkt_with_password( |
&Authen::Krb5::get_in_tkt_with_password( |
$krbclient,$krbserver,$upass,$credentials); |
$krbclient,$krbserver,$upass,$credentials); |
unless ($krbreturn) { |
# unless ($krbreturn) { |
&logthis("Krb5 Error: ". |
# &logthis("Krb5 Error: ". |
&Authen::Krb5::error()); |
# &Authen::Krb5::error()); |
} |
# } |
$pwdcorrect = ($krbreturn == 1); |
$pwdcorrect = ($krbreturn == 1); |
} else { $pwdcorrect=0; } |
} else { $pwdcorrect=0; } |
} elsif ($howpwd eq 'localauth') { |
} elsif ($howpwd eq 'localauth') { |
Line 815 sub make_new_child {
|
Line 815 sub make_new_child {
|
if ($udom ne $perlvar{'lonDefDomain'}) { |
if ($udom ne $perlvar{'lonDefDomain'}) { |
print $client "not_right_domain\n"; |
print $client "not_right_domain\n"; |
} else { |
} else { |
&make_passwd_file($umode,$npass,$passfilename); |
my $result=&make_passwd_file($umode,$npass, |
|
$passfilename); |
print $client $result; |
print $client $result; |
} |
} |
} else { |
} else { |