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

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 23 May 2003 07:13:27 -0000


albertel		Fri May 23 03:13:27 2003 EDT

  Modified files:              
    /loncom/auth	lonracc.pm 
  Log:
  - machines multiple have multiple entries in hosts.tab, check if any of them are subscribed before giving up
  
  
Index: loncom/auth/lonracc.pm
diff -u loncom/auth/lonracc.pm:1.7 loncom/auth/lonracc.pm:1.8
--- loncom/auth/lonracc.pm:1.7	Tue Oct 29 13:34:33 2002
+++ loncom/auth/lonracc.pm	Fri May 23 03:13:27 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Access Handler for File Transfers
 #
-# $Id: lonracc.pm,v 1.7 2002/10/29 18:34:33 matthew Exp $
+# $Id: lonracc.pm,v 1.8 2003/05/23 07:13:27 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -69,6 +69,7 @@
           return FORBIDDEN;
        }
        while ($readline=<$fh>) {
+	  my $return;
           my ($id,$domain,$role,$name,$ip)=split(/:/,$readline);
           if ($name =~ /$reqhost/i) {
               my $filename=$r->filename;
@@ -77,12 +78,13 @@
 		  ($filename=~/\.meta$/)) {
 	         return OK;
               } else {
-                 $r->log_reason("$id not subscribed", $r->filename);
-                 return FORBIDDEN;
+                 $return=FORBIDDEN;
               }
           }
        }
-
+       if ($return == FORBIDDEN) {
+	   $r->log_reason("$id not subscribed", $r->filename);
+       }
     }
     $r->log_reason("Invalid request for file transfer from $reqhost", 
                    $r->filename);