[LON-CAPA-cvs] cvs: loncom / lond

foxr lon-capa-cvs@mail.lon-capa.org
Thu, 17 Jun 2004 22:37:53 -0000


foxr		Thu Jun 17 18:37:53 2004 EDT

  Modified files:              
    /loncom	lond 
  Log:
  Add connection mode info (ssl, local, insecure) to status.
  
  
Index: loncom/lond
diff -u loncom/lond:1.197 loncom/lond:1.198
--- loncom/lond:1.197	Thu Jun 17 14:48:05 2004
+++ loncom/lond	Thu Jun 17 18:37:52 2004
@@ -2,7 +2,7 @@
 # The LearningOnline Network
 # lond "LON Daemon" Server (port "LOND" 5663)
 #
-# $Id: lond,v 1.197 2004/06/17 18:48:05 raeburn Exp $
+# $Id: lond,v 1.198 2004/06/17 22:37:52 foxr Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -56,7 +56,7 @@
 my $status='';
 my $lastlog='';
 
-my $VERSION='$Revision: 1.197 $'; #' stupid emacs
+my $VERSION='$Revision: 1.198 $'; #' stupid emacs
 my $remoteVERSION;
 my $currenthostid;
 my $currentdomainid;
@@ -69,6 +69,8 @@
 my $server;
 my $thisserver;			# DNS of us.
 
+my $keymode;
+
 # 
 #   Connection type is:
 #      client                   - All client actions are allowed
@@ -1218,13 +1220,13 @@
     {
     my $fh=IO::File->new(">>$docdir/lon-status/londstatus.txt");
     print $fh $$."\t".$clientname."\t".$currenthostid."\t"
-	.$status."\t".$lastlog."\n";
+	.$status."\t".$lastlog."\t $keymode\n";
     $fh->close();
     }
     &status("Finished londstatus.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();
     }
     &status("Finished logging");
@@ -1556,6 +1558,7 @@
 			print $client "ok:local\n";
 			&logthis('<font color="green"'
 				 . "Successful local authentication </font>");
+			$keymode = "local"
 		    } else {
 			Debug("Failed to get local key");
 			$clientok = 0;
@@ -1570,6 +1573,7 @@
 			$cipher       = new IDEA($cipherkey);
 			&logthis('<font color="green">'
 				 ."Successfull ssl authentication with $clientname </font>");
+			$keymode = "ssl";
 	     
 		    } else {
 			$clientok = 0;
@@ -1583,6 +1587,7 @@
 			&logthis('<font color="green">'
 				 ."Successful insecure authentication with $clientname </font>");
 			print $client "ok\n";
+			$keymode = "insecure";
 		    } else {
 			&logthis('<font color="yellow">'
 				  ."Attempted insecure connection disallowed </font>");
@@ -3195,7 +3200,7 @@
 		}
 # -------------------------------------------------------------------- complete
 		alarm(0);
-		&status('Listening to '.$clientname);
+		&status('Listening to '.$clientname." ($keymode)");
 	    }
 # --------------------------------------------- client unknown or fishy, refuse
 	} else {