All of lore.kernel.org
 help / color / mirror / Atom feed
* PATCH: Access priority
@ 2010-01-25 11:02 Ben Schmidt
  2010-01-25 13:41 ` Ben Schmidt
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: Ben Schmidt @ 2010-01-25 11:02 UTC (permalink / raw)
  To: mlmmj

[-- Attachment #1: Type: text/plain, Size: 639 bytes --]

This patch fixes something that I got bitten by last week, and since I spotted the 
place in the code while I was working on the other stuff, I did this too! It 
applies over 1.2.17.

The problem is that if you have a list that is 'moderated' or 'modnonsubposts', 
the 'allow' access keyword is ineffective, but behaves like 'moderate'. This patch 
fixes that so that access rules have priority, and do what they say.

I think this is more intuitive.

Do others agree? Or could this change cause problems? If not, or the perceived 
problems are minor enough, could this be included in mlmmj?

I have tested it, and it works for me.

Ben.


[-- Attachment #2: mlmmj-access.patch --]
[-- Type: text/x-patch, Size: 781 bytes --]

diff -ru mlmmj-1.2.17/src/mlmmj-process.c mlmmj-1.2.17-mod/src/mlmmj-process.c
--- mlmmj-1.2.17/src/mlmmj-process.c	2010-01-11 00:40:57.000000000 +1100
+++ mlmmj-1.2.17-mod/src/mlmmj-process.c	2010-01-25 02:23:23.000000000 +1100
@@ -851,6 +852,9 @@
 	}
 
 startaccess:
+	if(!moderated)
+		moderated = statctrl(listdir, "moderated");
+
 	noaccessdenymails = statctrl(listdir, "noaccessdenymails");
 
 	access_rules = ctrlvalues(listdir, "access");
@@ -917,11 +921,11 @@
 			myfree(donemailname);
 			myfree(discardname);
                 	exit(EXIT_SUCCESS);
+		} else if (accret == ALLOW) {
+			moderated = 0;
 		}
 	}
 
-	if(!moderated)
-		moderated = statctrl(listdir, "moderated");
 	if(moderated) {
 		mqueuename = concatstr(3, listdir, "/moderation/",
 				       randomstr);

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2010-04-10 19:52 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-25 11:02 PATCH: Access priority Ben Schmidt
2010-01-25 13:41 ` Ben Schmidt
2010-02-16 16:52 ` Morten Shearman Kirkegaard
2010-02-16 21:40 ` Ben Schmidt
2010-02-16 22:03 ` Franky Van Liedekerke
2010-02-17  8:21 ` Mads Martin Jørgensen
2010-02-17 21:40 ` Morten Shearman Kirkegaard
2010-02-17 22:56 ` Franky Van Liedekerke
2010-02-18 10:39 ` Morten Shearman Kirkegaard
2010-02-18 14:27 ` Ben Schmidt
2010-02-18 15:15 ` Morten Shearman Kirkegaard
2010-03-09 22:32 ` [mlmmj] " Ben Schmidt
2010-04-10 19:52 ` Morten Shearman Kirkegaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.