version 1.134, 2003/08/12 03:28:31
|
version 1.136, 2003/08/12 19:46:04
|
Line 50
|
Line 50
|
# population). Since the time averaged connection rate is close to zero |
# population). Since the time averaged connection rate is close to zero |
# because lonc's purpose is to maintain near continuous connnections, |
# because lonc's purpose is to maintain near continuous connnections, |
# preforking is not really needed. |
# preforking is not really needed. |
|
# 08/xx/2003 Ron Fox: Add management requests. Management requests |
|
# will be validated via a call to ValidateManager. At present, this |
|
# is done by simple host verification. In the future we can modify |
|
# this function to do a certificate check. |
|
# Management functions supported include: |
|
# - pushing /home/httpd/lonTabs/hosts.tab |
|
# - pushing /home/httpd/lonTabs/domain.tab |
### |
### |
|
|
use strict; |
use strict; |
Line 1726 sub make_new_child {
|
Line 1733 sub make_new_child {
|
} |
} |
if ($ulsout eq '') { $ulsout='empty'; } |
if ($ulsout eq '') { $ulsout='empty'; } |
print $client "$ulsout\n"; |
print $client "$ulsout\n"; |
|
# ----------------------------------------------------------------- setannounce |
|
} elsif ($userinput =~ /^setannounce/) { |
|
my ($cmd,$announcement)=split(/:/,$userinput); |
|
chomp($announcement); |
|
$announcement=&unescape($announcement); |
|
if (my $store=IO::File->new('>'.$perlvar{'lonDocRoot'}. |
|
'/announcement.txt')) { |
|
print $store $announcement; |
|
close $store; |
|
print $client "ok\n"; |
|
} else { |
|
print $client "error: ".($!+0)."\n"; |
|
} |
# ------------------------------------------------------------------ Hanging up |
# ------------------------------------------------------------------ Hanging up |
} elsif (($userinput =~ /^exit/) || |
} elsif (($userinput =~ /^exit/) || |
($userinput =~ /^init/)) { |
($userinput =~ /^init/)) { |
Line 2381 Send along temporarily stored informatio
|
Line 2401 Send along temporarily stored informatio
|
|
|
List part of a user's directory. |
List part of a user's directory. |
|
|
|
=item pushtable |
|
|
|
Pushes a file in /home/httpd/lonTab directory. Currently limited to: |
|
hosts.tab and domain.tab. The old file is copied to *.tab.backup but |
|
must be restored manually in case of a problem with the new table file. |
|
pushtable requires that the request be encrypted and validated via |
|
ValidateManager. The form of the command is: |
|
enc:pushtable tablename <tablecontents> \n |
|
where pushtable, tablename and <tablecontents> will be encrypted, but \n is a |
|
cleartext newline. |
|
|
=item Hanging up (exit or init) |
=item Hanging up (exit or init) |
|
|
What to do when a client tells the server that they (the client) |
What to do when a client tells the server that they (the client) |
Line 2391 are leaving the network.
|
Line 2422 are leaving the network.
|
If B<lond> is sent an unknown command (not in the list above), |
If B<lond> is sent an unknown command (not in the list above), |
it replys to the client "unknown_cmd". |
it replys to the client "unknown_cmd". |
|
|
|
|
=item UNKNOWN CLIENT |
=item UNKNOWN CLIENT |
|
|
If the anti-spoofing algorithm cannot verify the client, |
If the anti-spoofing algorithm cannot verify the client, |