🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
3 messages
3 total messages Started by Shane Davis Wed, 01 Sep 1993 16:13
Re: trn 3.3 released
#2112
Author: Shane Davis
Date: Wed, 01 Sep 1993 16:13
90 lines
4325 bytes
George Baltz (gwb@falstaff.umd.edu) wrote:
> In article <CCA0G5.G59@borland.com>, Wayne Davison <davison@borland.com> wrote:
> >New features:
> >
> > o  Trn's newsetup script now supports the NEWSLIB/subscriptions file as a
> >    default set of groups to use in a new user's subscription.  Newsetup will
> >    attempt to get the subscriptions file via NNTP if your NNTP server
> >    supports "LIST SUBSCRIPTIONS" (INN and my NNTP t4 release do).
> >
> Does INN 1.4 really support "list subscriptions"?  I tried telneting to my 
> SMTP port and got an error on it, and it's not in the help menu.  And
> yet, I've seen complaints(in the distant past) in the daily.sh output
> about trying to open /some/path/subscriptions.  I now have
> /usr/local/news/subscriptions, but it didn't make any difference.

> Then I looked at the nnrpd source, and no joy again.  It doesn't look
> too difficult to add, but I thought I'd check if anyone has a patch 
> before I started hacking.

> Sure would like to have this before the students get back.

I just patched it Friday...it was simple. In addition to the patch I'm posting
below, you need to add this line to config.data:

##  Where the NNRP automatic subscriptions file is (for tin)
#### =()<_PATH_NNRPSUBS         @<_PATH_NNRPSUBS>@>()=
_PATH_NNRPSUBS          /usr/lib/news/subscriptions

and this to paths.h:

    /* =()<#define _PATH_NNRPSUBS       "@<_PATH_NNRPSUBS>@">()= */

(Sorry I don't have a FULL patch together, just the patch for the C program
in nnrpd that needed changing...)

Here's nnrpd.patch.tin; apply it and rerun make nnrpd.

*** commands.c  Thu Mar 18 15:04:42 1993
--- commands.c  Fri Aug 27 16:52:32 1993
***************
*** 25,30 ****
--- 25,34 ----
      _PATH_NNRPDIST, "newsgroup distributions",
      "Distributions in form \"area description\""
  };
+ STATIC LISTINFO               INFOsubs = {
+     _PATH_NNRPSUBS, "automatic group subscriptions",
+     "Subscriptions in form \"group\""
+ };
  STATIC LISTINFO               INFOdistribpats = {
      _PATH_DISTPATS, "distribution patterns",
      "Default distributions in form \"weight:pattern:value\""
***************
*** 141,146 ****
--- 145,152 ----
        lp = &INFOactivetimes;
      else if (caseEQ(p, "distributions"))
        lp = &INFOdistribs;
+     else if (caseEQ(p, "subscriptions"))
+       lp = &INFOsubs;
      else if (caseEQ(p, "distrib.pats"))
        lp = &INFOdistribpats;
      else if (caseEQ(p, "newsgroups"))
***************
*** 170,176 ****

      /* Read lines, ignore long ones. */
      while ((p = QIOread(qp)) != NULL) {
!       if (lp == &INFOdistribs || lp == &INFOdistribpats) {
            Printf("%s\r\n", p);
            continue;
        }
--- 176,182 ----

      /* Read lines, ignore long ones. */
      while ((p = QIOread(qp)) != NULL) {
!       if (lp == &INFOdistribs || lp == &INFOdistribpats || lp ==
&INFOsubs) {
            Printf("%s\r\n", p);
            continue;
        }

[end of patch]

--Shane
--
Network Systems Software            I needed a new vice after I quit smoking;
Univ. of Texas at Dallas            so, after 7 .signature-free years...
"This is side 5...follow along in your book and repeat after me as we learn 3
new words in Turkish...towel...bath...border...May I see your passport, please?"
Re: INN 1.4 list subscriptions patch
#2114
Author: Wayne Davison
Date: Wed, 01 Sep 1993 18:04
28 lines
1626 bytes
According to Shane Davis <shane@utdallas.edu>:
> ***************
> *** 170,176 ****
> 
>       /* Read lines, ignore long ones. */
>       while ((p = QIOread(qp)) != NULL) {
> !       if (lp == &INFOdistribs || lp == &INFOdistribpats) {
>             Printf("%s\r\n", p);
>             continue;
>         }
> --- 176,182 ----
> 
>       /* Read lines, ignore long ones. */
>       while ((p = QIOread(qp)) != NULL) {
> !       if (lp == &INFOdistribs || lp == &INFOdistribpats || lp ==
> &INFOsubs) {
>             Printf("%s\r\n", p);
>             continue;
>         }
> 

I don't agree with this bit.  If you leave this code alone nnrp will check
each group's authorization and only send the ones in the list that the user
is authorized to receive.  Your patch allows unauthorized groups to slip
through.
-- 
Wayne Davison
davison@borland.com
Re: INN 1.4 list subscriptions patch
#2116
Author: Shane Davis
Date: Thu, 02 Sep 1993 15:10
56 lines
3383 bytes
Wayne Davison (davison@borland.com) wrote:
> According to Shane Davis <shane@utdallas.edu>:
> > ***************
> > *** 170,176 ****
> > 
> >       /* Read lines, ignore long ones. */
> >       while ((p = QIOread(qp)) != NULL) {
> > !       if (lp == &INFOdistribs || lp == &INFOdistribpats) {
> >             Printf("%s\r\n", p);
> >             continue;
> >         }
> > --- 176,182 ----
> > 
> >       /* Read lines, ignore long ones. */
> >       while ((p = QIOread(qp)) != NULL) {
> > !       if (lp == &INFOdistribs || lp == &INFOdistribpats || lp ==
> > &INFOsubs) {
> >             Printf("%s\r\n", p);
> >             continue;
> >         }
> > 

> I don't agree with this bit.  If you leave this code alone nnrp will check
> each group's authorization and only send the ones in the list that the user
> is authorized to receive.  Your patch allows unauthorized groups to slip
Subject: Re: INN 1.4 list subscriptions patch
Newsgroups: news.software.readers,news.software.b,news.software.nntp
Followup-To: news.software.readers,news.software.b,news.software.nntp
References: <CCA0G5.G59@borland.com> <25ga9d$aio@falstaff.umd.edu> <262hn9$ofd@news.utdallas.edu> <CCosvA.L3r@borland.com>
X-Newsreader: TIN [version 1.2 PL1]

Wayne Davison (davison@borland.com) wrote:
> According to Shane Davis <shane@utdallas.edu>:
> > ***************
> > *** 170,176 ****
[...patch...]

> I don't agree with this bit.  If you leave this code alone nnrp will check
> each group's authorization and only send the ones in the list that the user
> is authorized to receive.  Your patch allows unauthorized groups to slip
> through.

That's a good point...my thinking went, "subscriptions is a plain file with
one field, like distributions, so duplicating the logic should do the trick"
since it was 5:30 pm on Friday and I was sort of under the gun to get tin
available. I didn't even notice what the rest of that code did, I just knew
that what worked for distributions would work for subscriptions...

Thanks for pointing it out!

--Shane
--
Network Systems Software            I needed a new vice after I quit smoking;
Univ. of Texas at Dallas            so, after 7 .signature-free years...
"This is side 5...follow along in your book and repeat after me as we learn 3
new words in Turkish...towel...bath...border...May I see your passport, please?"
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads