z@rocksvax.UUCP (Jim Ziobro) (12/27/84)
I looked at how 2.10.2 attempted to distribute news. It comes real close to doing it right versus 2.10.1. The following patch will make sure it does it right. These patches to 2.10.2 will prevent an article like the following from slipping out on the entire net: Newsgroups: net.news,wny.unix-wizards Distribution: wny Enjoy! *** #ifuncs.c Thu Dec 27 01:43:40 1984 --- ifuncs.c Thu Dec 27 02:44:00 1984 *************** *** 3,9 */ #ifndef lint ! static char *SccsId = "@(#)ifuncs.c 2.35 9/12/84"; #endif !lint #include "iparams.h" --- 3,9 ----- */ #ifndef lint ! static char *SccsId = "@(#)ifuncs.c 2.36 12/27/84"; #endif !lint #include "iparams.h" *************** *** 64,69 } if (ngmatch(h.nbuf, srec.s_nbuf)) { if (h.distribution[0] == '\0' || ngmatch(h.distribution, srec.s_nbuf) || ngmatch(h.nbuf, h.distribution)) { if (transmit(&srec, xfopen(ARTICLE, "r"), 1)) { --- 64,72 ----- } if (ngmatch(h.nbuf, srec.s_nbuf)) { if (h.distribution[0] == '\0' || + /* We must test for subscription both ways + since ngmatch assumes only second arg is a + subscription list. */ ngmatch(h.distribution, srec.s_nbuf) || ngmatch(srec.s_nbuf, h.distribution)) { if (transmit(&srec, xfopen(ARTICLE, "r"), 1)) { *************** *** 65,71 if (ngmatch(h.nbuf, srec.s_nbuf)) { if (h.distribution[0] == '\0' || ngmatch(h.distribution, srec.s_nbuf) || ! ngmatch(h.nbuf, h.distribution)) { if (transmit(&srec, xfopen(ARTICLE, "r"), 1)) { if (nsent) strcat(sentbuf, ", "); --- 68,74 ----- since ngmatch assumes only second arg is a subscription list. */ ngmatch(h.distribution, srec.s_nbuf) || ! ngmatch(srec.s_nbuf, h.distribution)) { if (transmit(&srec, xfopen(ARTICLE, "r"), 1)) { if (nsent) strcat(sentbuf, ", "); -- //Z\\ James M. Ziobro Ziobro.Henr@Xerox.ARPA {rochester,amd,sunybcs,allegra}!rocksvax!z