Bug in the [non-]propagation of control messages

Julien ÉLIE julien at trigofacile.com
Fri Sep 14 20:06:06 UTC 2007


Hi,

There is a bug when I send a newgroup control article to local.example:
if the newsfeeds pattern of a site is "*, at local.*", the control article
is sent to that site!  Such a leak is not very good...

I tried to fix the bug (and, meanwhile, to add the support of accepting
checkgroups posted to newsgroups not carried -- which could be of help
for instance to the upstream server for ftp.isc.org).
But I am not entirely happy with the solution.  As a matter of fact,
there is a strange behaviour with that:  newgroup/rmgroup/checkgroups
posted to local.example will still be sent with the newsfeeds pattern
"*,!local.*" but not with "*, at local.*".  It is perhaps OK if I do
that.
However, they will not also be sent with "@local.*,control.*", which is
a bit weird.

I do not know how to properly parse that.  Do you have an idea?
Or do you think it is OK too?  (Then, I would just tell the fact
in innd.pod).



Index: art.c
===================================================================
--- art.c       (révision 7651)
+++ art.c       (copie de travail)
@@ -2014,6 +2014,9 @@
       if (data->Followcount == 0)
        data->Followcount = data->Groupcount;
     }
+
+    LikeNewgroup = (LikeNewgroup || strcmp(ControlWord, "checkgroups") == 0);
+
     /* Control messages to "foo.ctl" are treated as if they were
      * posted to "foo".  I should probably apologize for all the
      * side-effects in the if. */
@@ -2034,15 +2037,16 @@
   for (GroupMissing = Accepted = false; (p = *groups) != NULL; groups++) {
     if ((ngp = NGfind(p)) == NULL) {
       GroupMissing = true;
+      /* Newgroup/rmgroup/checkgroups being sent to a group that doesn't
+       * exist.  Assume it is being sent to the group being created or
+       * removed (or to the admin group in case of a checkgroups message),
+       * and send it to all sites that would or would have had the group
+       * if it were created. */
       if (LikeNewgroup && Approved) {
-       /* Newgroup/rmgroup being sent to a group that doesn't exist.  Assume
-        * it is being sent to the group being created or removed, nd send the
-        * group to all sites that would or would have had the group if it were
-        * created. */
-       ARTsendthegroup(*groups);
-       Accepted = true;
+        ARTsendthegroup(*groups);
+        Accepted = true;
       } else
-       NonExist = true;
+        NonExist = true;
       ARTpoisongroup(*groups);

       if (innconf->mergetogroups) {
@@ -2147,7 +2151,12 @@
     for (isp = ngp->Sites, i = ngp->nSites; --i >= 0; isp++) {
       if (*isp >= 0) {
        sp = &Sites[*isp];
-       SITEmark(sp, ngp);
+        /* Newgroup/rmgroup/checkgroups posted to local.example
+         * will still be sent with the newsfeeds pattern
+         * "control.*,!local.*" but not with "control.*, at local.*".
+         * Neither with "@local.*,control.*" by the way. */
+        if (!LikeNewgroup || !sp->Poison)
+          SITEmark(sp, ngp);
       }
     }
   }

-- 
Julien ÉLIE

« Comme un vol de gerfauts hors du charnier natal. » (José-Maria de Heredia) 



More information about the inn-workers mailing list