OSSP CVS Repository

ossp - Difference in ossp-pkg/petidomo/hermes.c versions 1.15 and 1.16
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/petidomo/hermes.c 1.15 -> 1.16

--- hermes.c     2001/01/19 16:02:22     1.15
+++ hermes.c     2001/01/19 16:46:25     1.16
@@ -1,6 +1,6 @@
 /*
    $Source: /v/ossp/cvs/ossp-pkg/petidomo/hermes.c,v $
-   $Revision: 1.15 $
+   $Revision: 1.16 $
 
    Copyright (C) 2000 by CyberSolutions GmbH, Germany.
 
@@ -92,27 +92,37 @@
     if (FindBodyPassword(MailStruct) != 0)
         exit(1);
 
-    if (checkACL(MailStruct, listname, &operation, &parameter) != 0)
-        {
-        syslog(LOG_ERR, "checkACL() failed with an error.");
-        exit(1);
-        }
-    rc = handleACL(MailStruct, listname, operation, parameter);
-    switch(rc)
+    if (isValidPostingPassword(MailStruct->Approve, listname) == FALSE)
         {
-        case -1:
-            syslog(LOG_ERR, "handleACL() failed with an error.");
+        /* If no valid posting password has been provided, the mail is
+           subject to the ACL mechanism. Please note that the ACL may
+           actually set a correct posting password via the 'approve'
+           command. So just because there wasn't a valid posting
+           password here, it doesn't mean there might not be after ACL
+           processing is over. That's why we check the posting
+           password again below. */
+
+        if (checkACL(MailStruct, listname, &operation, &parameter) != 0)
+            {
+            syslog(LOG_ERR, "checkACL() failed with an error.");
             exit(1);
-        case 0:
-            break;
-        case 1:
-            return 0;
+            }
+        rc = handleACL(MailStruct, listname, operation, parameter);
+        switch(rc)
+            {
+            case -1:
+                syslog(LOG_ERR, "handleACL() failed with an error.");
+                exit(1);
+            case 0:
+                break;
+            case 1:
+                return 0;
+            }
         }
 
     if (isValidPostingPassword(MailStruct->Approve, listname) == FALSE)
         {
-        /* No valid password found. Reject the article, if the list is
-           of type 'moderated'. */
+        /* Reject the article, if the list is of type 'moderated'. */
 
         if (ListConfig->listtype == LIST_MODERATED)
             {

CVSTrac 2.0.1