--- loncom/lonnet/perl/lonnet.pm	2001/12/22 21:46:02	1.193
+++ loncom/lonnet/perl/lonnet.pm	2001/12/28 19:48:42	1.195
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.193 2001/12/22 21:46:02 www Exp $
+# $Id: lonnet.pm,v 1.195 2001/12/28 19:48:42 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -64,7 +64,7 @@
 # 12/5 Guy Albertelli
 # 12/6,12/7,12/12 Gerd Kortemeyer
 # 12/18 Scott Harrison
-# 12/21,12/22 Gerd Kortemeyer
+# 12/21,12/22,12/27,12/28 Gerd Kortemeyer
 #
 ###
 
@@ -84,6 +84,7 @@ use GDBM_File;
 use Apache::Constants qw(:common :http);
 use HTML::TokeParser;
 use Fcntl qw(:flock);
+my $readit;
 
 # --------------------------------------------------------------------- Logging
 
@@ -1554,7 +1555,7 @@ sub allowed {
    if ($thisallowed=~/C/) {
        my $rolecode=(split(/\./,$ENV{'request.role'}))[0];
        if ($ENV{'course.'.$ENV{'request.course.id'}.'.'.$priv.'.roles.denied'}
-	   =~/\,$rolecode\,/) {
+	   =~/$rolecode/) {
            &log($ENV{'user.domain'},$ENV{'user.name'},$ENV{'user.host'},
                 'Denied by role: '.$priv.' for '.$uri.' as '.$rolecode.' in '.
                 $ENV{'request.course.id'});
@@ -2555,6 +2556,7 @@ sub goodbye {
 
 BEGIN {
 # ------------------------------------------------------------ Read access.conf
+    unless ($readit) {
 {
     my $config=Apache::File->new("/etc/httpd/conf/access.conf");
 
@@ -2640,6 +2642,8 @@ $dumpcount=0;
 
 &logtouch();
 &logthis('<font color=yellow>INFO: Read configuration</font>');
+$readit=1;
+}
 }
 
 1;