--- loncom/lonnet/perl/lonnet.pm 2017/08/07 20:22:54 1.1347 +++ loncom/lonnet/perl/lonnet.pm 2017/08/08 15:33:13 1.1348 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.1347 2017/08/07 20:22:54 raeburn Exp $ +# $Id: lonnet.pm,v 1.1348 2017/08/08 15:33:13 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1598,52 +1598,6 @@ sub internet_dom_servers { return %uniqservers; } -sub notcallable { - my ($cmdtype,$calldom) = @_; - if (&domain($calldom) eq '') { - return 1; - } - unless ($cmdtype =~ /^(content|shared|enroll|coaurem|domroles|catalog|reqcrs|msg)$/) { - return 1; - } - my @machinedoms = ¤t_machine_domains(); - if (grep(/^\Q$calldom\E$/,@machinedoms)) { - return; - } - my $reject; - my $intdom = &internet_dom($perlvar{'lonHostID'}); - if ($intdom eq '') { - return 1; - } - my $callprimary = &domain($calldom,'primary'); - my $intcalldom = &Apache::lonnet::internet_dom($callprimary); - unless ($intdom eq $intcalldom) { - my ($trustconfig,$cached)=&Apache::lonnet::is_cached_new('trust',$calldom); - unless (defined($cached)) { - my %domconfig = &Apache::lonnet::get_dom('configuration',['trust'],$calldom); - &Apache::lonnet::do_cache_new('trust',$calldom,$domconfig{'trust'},3600); - $trustconfig = $domconfig{'trust'}; - } - if (ref($trustconfig)) { - if (ref($trustconfig->{$cmdtype}) eq 'HASH') { - if (ref($trustconfig->{$cmdtype}->{'exc'}) eq 'ARRAY') { - if (grep(/^\Q$intdom\E$/,@{$trustconfig->{$cmdtype}->{'exc'}})) { - $reject = 1; - } - } - if (ref($trustconfig->{$cmdtype}->{'inc'}) eq 'ARRAY') { - if (grep(/^\Q$intdom\E$/,@{$trustconfig->{$cmdtype}->{'inc'}})) { - $reject = 0; - } else { - $reject = 1; - } - } - } - } - } - return $reject; -} - sub trusted_domains { my ($cmdtype,$calldom) = @_; my (%trusted,%untrusted);