OSSP CVS Repository

ossp - Check-in [331]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 331
Date: 2001-Jan-19 17:08:51 (local)
2001-Jan-19 16:08:51 (UTC)
User:simons
Branch:
Comment: - Added a warning message to be logged when no global ACL file exists.

- Reordered tests in check_local_acl_file: When no listname has been given, we don't need to initialize the lexer at all.

Tickets:
Inspections:
Files:
ossp-pkg/petidomo/acl.y      1.9 -> 1.10     7 inserted, 6 deleted

ossp-pkg/petidomo/acl.y 1.9 -> 1.10

--- acl.y        2001/01/19 14:56:33     1.9
+++ acl.y        2001/01/19 16:08:51     1.10
@@ -1,6 +1,6 @@
 /*
    $Source: /v/ossp/cvs/ossp-pkg/petidomo/acl.y,v $
-   $Revision: 1.9 $
+   $Revision: 1.10 $
 
    Copyright (C) 2000 by CyberSolutions GmbH, Germany.
 
@@ -261,6 +261,7 @@
         switch(errno) {
           case ENOENT:
               /* no master acl file */
+              syslog(LOG_WARNING, "You have no global acl file (%s). This is probably not a good idea.", MasterConfig->acl_file);
               goto check_local_acl_file;
           default:
               syslog(LOG_ERR, "Couldn't open \"%s\" acl file: %s", MasterConfig->acl_file,  strerror(errno));
@@ -289,16 +290,16 @@
 
 check_local_acl_file:
 
-    /* Set up the lex scanner. */
-
-    BEGIN(INITIAL);
-    lineno = 1; operation = ACL_NONE;
-
     /* Do we have a local acl file to test? */
 
     if (listname == NULL)
       goto finished;
 
+    /* Set up the lex scanner. */
+
+    BEGIN(INITIAL);
+    lineno = 1; operation = ACL_NONE;
+
     ListConfig = getListConfig(listname);
     yyin = fopen(ListConfig->acl_file, "r");
     if (yyin == NULL) {

CVSTrac 2.0.1