From 7104ded04dd22506508a952b063f571d70627318 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Mon, 8 Jan 2001 20:49:52 +0000 Subject: [PATCH] Changed the ACL code to use the configured locations of the list's ACL file rather than the hard-coded one. --- acl.y | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/acl.y b/acl.y index ed72b2c..c13e441 100644 --- a/acl.y +++ b/acl.y @@ -237,7 +237,7 @@ int checkACL(struct Mail * MailStruct, char ** parameter_ptr) { const struct PD_Config * MasterConfig; - char * filename; + const struct List_Config * ListConfig; int rc; assert(MailStruct != NULL); @@ -245,6 +245,7 @@ int checkACL(struct Mail * MailStruct, assert(parameter_ptr != NULL); MasterConfig = getMasterConfig(); + ListConfig = getListConfig(listname); g_MailStruct = MailStruct; g_parameter = NULL; @@ -298,15 +299,14 @@ check_local_acl_file: if (listname == NULL) goto finished; - filename = text_easy_sprintf("lists/%s/acl", listname); - yyin = fopen(filename, "r"); + yyin = fopen(ListConfig->acl_file, "r"); if (yyin == NULL) { switch(errno) { case ENOENT: /* no list acl file */ goto finished; default: - syslog(LOG_ERR, "Couldn't open \"~petidomo/%s\" file: %m", filename); + syslog(LOG_ERR, "Couldn't open acl file \"%s\": %m", ListConfig->acl_file); return -1; } }