[LON-CAPA-cvs] cvs: loncom /auth lontokacc.pm

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 03 Mar 2005 05:44:51 -0000


albertel		Thu Mar  3 00:44:51 2005 EDT

  Modified files:              
    /loncom/auth	lontokacc.pm 
  Log:
  - tokacc was trying to compares lon-capa host ids and DNS name, silly tokacc
  
  
Index: loncom/auth/lontokacc.pm
diff -u loncom/auth/lontokacc.pm:1.14 loncom/auth/lontokacc.pm:1.15
--- loncom/auth/lontokacc.pm:1.14	Thu Feb 10 17:30:56 2005
+++ loncom/auth/lontokacc.pm	Thu Mar  3 00:44:51 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Access Handler for User File Transfers
 #
-# $Id: lontokacc.pm,v 1.14 2005/02/10 22:30:56 albertel Exp $
+# $Id: lontokacc.pm,v 1.15 2005/03/03 05:44:51 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -59,14 +59,15 @@
 	   $readline=~s/\s*$//;
 	   my ($id,$domain,$role,$name)=split(/:/,$readline);
 	   foreach my $hostid (@{$hostids}) {
-	       if ($name =~ /^\Q$hostid\E$/i) {
+	       my $hostname=$Apache::lonnet::hostname{$hostid};
+	       if ($name =~ /^\Q$hostname\E$/i) {
 		   return OK; 
 	       }
 	   }
        }
 
     }
-    $r->log_reason("Invalid request for user file transfer from $reqhost", 
+    $r->log_reason("Invalid request for user file transfer from $reqhost (".join(",",@{$hostids}).")", 
                    $r->filename); 
     return FORBIDDEN;
 }