Diff for /loncom/lond between versions 1.197 and 1.201

version 1.197, 2004/06/17 18:48:05 version 1.201, 2004/06/21 14:08:20
Line 69  my $clientname;   # LonCAPA name of clie Line 69  my $clientname;   # LonCAPA name of clie
 my $server;  my $server;
 my $thisserver; # DNS of us.  my $thisserver; # DNS of us.
   
   my $keymode;
   
 #   # 
 #   Connection type is:  #   Connection type is:
 #      client                   - All client actions are allowed  #      client                   - All client actions are allowed
Line 1218  sub logstatus { Line 1220  sub logstatus {
     {      {
     my $fh=IO::File->new(">>$docdir/lon-status/londstatus.txt");      my $fh=IO::File->new(">>$docdir/lon-status/londstatus.txt");
     print $fh $$."\t".$clientname."\t".$currenthostid."\t"      print $fh $$."\t".$clientname."\t".$currenthostid."\t"
  .$status."\t".$lastlog."\n";   .$status."\t".$lastlog."\t $keymode\n";
     $fh->close();      $fh->close();
     }      }
     &status("Finished londstatus.txt");      &status("Finished londstatus.txt");
     {      {
  my $fh=IO::File->new(">$docdir/lon-status/londchld/$$.txt");   my $fh=IO::File->new(">$docdir/lon-status/londchld/$$.txt");
         print $fh $status."\n".$lastlog."\n".time;          print $fh $status."\n".$lastlog."\n".time."\n$keymode";
         $fh->close();          $fh->close();
     }      }
     &status("Finished logging");      &status("Finished logging");
Line 1556  sub make_new_child { Line 1558  sub make_new_child {
  print $client "ok:local\n";   print $client "ok:local\n";
  &logthis('<font color="green"'   &logthis('<font color="green"'
  . "Successful local authentication </font>");   . "Successful local authentication </font>");
    $keymode = "local"
     } else {      } else {
  Debug("Failed to get local key");   Debug("Failed to get local key");
  $clientok = 0;   $clientok = 0;
Line 1570  sub make_new_child { Line 1573  sub make_new_child {
  $cipher       = new IDEA($cipherkey);   $cipher       = new IDEA($cipherkey);
  &logthis('<font color="green">'   &logthis('<font color="green">'
  ."Successfull ssl authentication with $clientname </font>");   ."Successfull ssl authentication with $clientname </font>");
    $keymode = "ssl";
             
     } else {      } else {
  $clientok = 0;   $clientok = 0;
Line 1583  sub make_new_child { Line 1587  sub make_new_child {
  &logthis('<font color="green">'   &logthis('<font color="green">'
  ."Successful insecure authentication with $clientname </font>");   ."Successful insecure authentication with $clientname </font>");
  print $client "ok\n";   print $client "ok\n";
    $keymode = "insecure";
     } else {      } else {
  &logthis('<font color="yellow">'   &logthis('<font color="yellow">'
   ."Attempted insecure connection disallowed </font>");    ."Attempted insecure connection disallowed </font>");
Line 3028  sub make_new_child { Line 3033  sub make_new_child {
  Reply($client, "refused\n", $userinput);   Reply($client, "refused\n", $userinput);
             
     }      }
   # ----------------------------------------- portfolio directory list (portls)
                   } elsif ($userinput =~ /^portls/) {
                       if(isClient) {
                           my ($cmd,$uname,$udom)=split(/:/,$userinput);
                           my $udir=propath($udom,$uname).'/userfiles/portfolio';
                           my $dirLine='';
                           my $dirContents='';
                           if (opendir(LSDIR,$udir.'/')){
                               while ($dirLine = readdir(LSDIR)){
                                   $dirContents = $dirContents.$dirLine.'<br />';
                               }
                           } else {
                               $dirContents = "No directory found\n";
                           }
                           print $client $dirContents."\n";
                       } else {
                           Reply($client, "refused\n", $userinput);
                       }
 # -------------------------------------------------------------------------- ls  # -------------------------------------------------------------------------- ls
  } elsif ($userinput =~ /^ls/) {   } elsif ($userinput =~ /^ls/) {
     if(isClient) {      if(isClient) {
Line 3195  sub make_new_child { Line 3218  sub make_new_child {
  }   }
 # -------------------------------------------------------------------- complete  # -------------------------------------------------------------------- complete
  alarm(0);   alarm(0);
  &status('Listening to '.$clientname);   &status('Listening to '.$clientname." ($keymode)");
     }      }
 # --------------------------------------------- client unknown or fishy, refuse  # --------------------------------------------- client unknown or fishy, refuse
  } else {   } else {

Removed from v.1.197  
changed lines
  Added in v.1.201


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>