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

foxr lon-capa-cvs@mail.lon-capa.org
Wed, 08 May 2002 02:31:04 -0000


foxr		Tue May  7 22:31:04 2002 EDT

  Modified files:              
    /loncom	lond 
  Log:
  Include fixed version of GetAuthType.
  
  
Index: loncom/lond
diff -u loncom/lond:1.78 loncom/lond:1.79
--- loncom/lond:1.78	Thu May  2 23:21:25 2002
+++ loncom/lond	Tue May  7 22:31:04 2002
@@ -2,7 +2,7 @@
 # The LearningOnline Network
 # lond "LON Daemon" Server (port "LOND" 5663)
 #
-# $Id: lond,v 1.78 2002/05/03 03:21:25 foxr Exp $
+# $Id: lond,v 1.79 2002/05/08 02:31:04 foxr Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -549,6 +549,7 @@
 # ------------------------------------------------------------ Process requests
               while (my $userinput=<$client>) {
                 chomp($userinput);
+		Debug("Request = $userinput\n");
                 &status('Processing '.$hostid{$clientip}.': '.$userinput);
                 my $wasenc=0;
                 alarm(120);
@@ -604,7 +605,7 @@
 		   } elsif ($userinput =~ /^currentauth/) {
 		     if ($wasenc==1) {
                        my ($cmd,$udom,$uname)=split(/:/,$userinput);
-		       my $result = GetAuthType($udom, $user);
+		       my $result = GetAuthType($udom, $uname);
 		       if($result eq "nouser") {
 			   print $client "unknown_user\n";
 		       }
@@ -1500,20 +1501,25 @@
     my $domain = shift;
     my $user   = shift;
 
+    Debug("GetAuthType( $domain, $user ) \n");
     my $proname    = &propath($domain, $user); 
     my $passwdfile = "$proname/passwd";
     if( -e $passwdfile ) {
 	my $pf = IO::File->new($passwdfile);
 	my $realpassword = <$pf>;
 	chomp($realpassword);
+	Debug("Password info = $realpassword\n");
 	my ($authtype, $contentpwd) = split(/:/, $realpassword);
+	Debug("Authtype = $authtype, content = $contentpwd\n");
 	my $availinfo = '';
 	if($authtype eq 'krb4') {
 	    $availinfo = $contentpwd;
 	}
+
 	return "$authtype:$availinfo";
     }
     else {
+	Debug("Returning nouser");
 	return "nouser";
     }