From c9033a31a7a1d5921f8913b735bcd29cde75906d Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Fri, 19 Jan 2001 16:08:51 +0000 Subject: [PATCH] - 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. --- acl.y | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/acl.y b/acl.y index 7de977b..42d33ac 100644 --- a/acl.y +++ b/acl.y @@ -261,6 +261,7 @@ int checkACL(struct Mail * MailStruct, 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 @@ int checkACL(struct Mail * MailStruct, 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) {