version 1.548, 2018/08/18 22:07:48
|
version 1.550, 2018/10/29 02:57:30
|
Line 792 sub ConfigFileFromSelector {
|
Line 792 sub ConfigFileFromSelector {
|
my $selector = shift; |
my $selector = shift; |
my $tablefile; |
my $tablefile; |
|
|
my $tabledir = $perlvar{'lonTabDir'}.'/'; |
if ($selector eq 'loncapaCAcrl') { |
if (($selector eq "hosts") || ($selector eq "domain") || |
my $tabledir = $perlvar{'lonCertificateDirectory'}; |
($selector eq "dns_hosts") || ($selector eq "dns_domain")) { |
if (-d $tabledir) { |
$tablefile = $tabledir.$selector.'.tab'; |
$tablefile = $tabledir.'/'.$selector.'.pem'; |
|
} |
|
} else { |
|
my $tabledir = $perlvar{'lonTabDir'}.'/'; |
|
if (($selector eq "hosts") || ($selector eq "domain") || |
|
($selector eq "dns_hosts") || ($selector eq "dns_domain")) { |
|
$tablefile = $tabledir.$selector.'.tab'; |
|
} |
} |
} |
return $tablefile; |
return $tablefile; |
} |
} |
Line 819 sub PushFile {
|
Line 826 sub PushFile {
|
my ($command, $filename, $contents) = split(":", $request, 3); |
my ($command, $filename, $contents) = split(":", $request, 3); |
&Debug("PushFile"); |
&Debug("PushFile"); |
|
|
# At this point in time, pushes for only the following tables are |
# At this point in time, pushes for only the following tables and |
# supported: |
# CRL file are supported: |
# hosts.tab ($filename eq host). |
# hosts.tab ($filename eq host). |
# domain.tab ($filename eq domain). |
# domain.tab ($filename eq domain). |
# dns_hosts.tab ($filename eq dns_host). |
# dns_hosts.tab ($filename eq dns_host). |
# dns_domain.tab ($filename eq dns_domain). |
# dns_domain.tab ($filename eq dns_domain). |
|
# loncapaCAcrl.pem ($filename eq loncapaCAcrl); |
# Construct the destination filename or reject the request. |
# Construct the destination filename or reject the request. |
# |
# |
# lonManage is supposed to ensure this, however this session could be |
# lonManage is supposed to ensure this, however this session could be |
Line 845 sub PushFile {
|
Line 853 sub PushFile {
|
|
|
if($filename eq "host") { |
if($filename eq "host") { |
$contents = AdjustHostContents($contents); |
$contents = AdjustHostContents($contents); |
} elsif ($filename eq 'dns_host' || $filename eq 'dns_domain') { |
} elsif (($filename eq 'dns_host') || ($filename eq 'dns_domain') || |
|
($filename eq 'loncapaCAcrl')) { |
if ($contents eq '') { |
if ($contents eq '') { |
&logthis('<font color="red"> Pushfile: unable to install ' |
&logthis('<font color="red"> Pushfile: unable to install ' |
.$tablefile." - no data received from push. </font>"); |
.$tablefile." - no data received from push. </font>"); |
Line 856 sub PushFile {
|
Line 865 sub PushFile {
|
if ($managers{$clientip} eq $clientname) { |
if ($managers{$clientip} eq $clientname) { |
my $clientprotocol = $Apache::lonnet::protocol{$clientname}; |
my $clientprotocol = $Apache::lonnet::protocol{$clientname}; |
$clientprotocol = 'http' if ($clientprotocol ne 'https'); |
$clientprotocol = 'http' if ($clientprotocol ne 'https'); |
my $url = '/adm/'.$filename; |
my $url; |
$url =~ s{_}{/}; |
if ($filename eq 'loncapaCAcrl') { |
|
$url = '/adm/dns/loncapaCRL'; |
|
} else { |
|
$url = '/adm/'.$filename; |
|
$url =~ s{_}{/}; |
|
} |
my $request=new HTTP::Request('GET',"$clientprotocol://$clienthost$url"); |
my $request=new HTTP::Request('GET',"$clientprotocol://$clienthost$url"); |
my $response = LONCAPA::LWPReq::makerequest($clientname,$request,'',\%perlvar,60,0); |
my $response = LONCAPA::LWPReq::makerequest($clientname,$request,'',\%perlvar,60,0); |
if ($response->is_error()) { |
if ($response->is_error()) { |
Line 6896 my $wwwid=getpwnam('www');
|
Line 6910 my $wwwid=getpwnam('www');
|
if ($wwwid!=$<) { |
if ($wwwid!=$<) { |
my $emailto="$perlvar{'lonAdmEMail'},$perlvar{'lonSysEMail'}"; |
my $emailto="$perlvar{'lonAdmEMail'},$perlvar{'lonSysEMail'}"; |
my $subj="LON: $currenthostid User ID mismatch"; |
my $subj="LON: $currenthostid User ID mismatch"; |
system("echo 'User ID mismatch. lond must be run as user www.' |\ |
system("echo 'User ID mismatch. lond must be run as user www.' |". |
mailto $emailto -s '$subj' > /dev/null"); |
" mail -s '$subj' $emailto > /dev/null"); |
exit 1; |
exit 1; |
} |
} |
|
|
Line 8922 is closed and the child exits.
|
Line 8936 is closed and the child exits.
|
=item Red CRITICAL Can't get key file <error> |
=item Red CRITICAL Can't get key file <error> |
|
|
SSL key negotiation is being attempted but the call to |
SSL key negotiation is being attempted but the call to |
lonssl::KeyFile failed. This usually means that the |
lonssl::KeyFile failed. This usually means that the |
configuration file is not correctly defining or protecting |
configuration file is not correctly defining or protecting |
the directories/files lonCertificateDirectory or |
the directories/files lonCertificateDirectory or |
lonnetPrivateKey |
lonnetPrivateKey |