🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
4 messages
4 total messages Started by Ron Newman Sat, 14 Dec 1996 00:00
Help - trn and zippo (or other authenticating NNTP servers)
#28379
Author: Ron Newman
Date: Sat, 14 Dec 1996 00:00
31 lines
1454 bytes
Could someone please explain to me how to configure, build,
and run a version of "trn" that can deal with authenticating
(paid access) NNTP servers such as Zippo?

I've looked at the sources for trn 3.6 and 4.0, and I can't
really figure out what to do with either to avoid this:

    Unknown response code 480 from news.zippo.com.

because the function nntp_connect(), in nntpclient.c,
doesn't look for a NNTP_AUTH_NEEDED_VAL (480) response.

Also, in nntp_handle_auth_err() (in nntpauth.c) it's trying
to send the command 

   AUTHINFO GENERIC ${NNTPAUTH}

but I thought the correct command was

   AUTHINFO USER username
   AUTHINFO PASS password

Finally, in trn 4.0, where exactly is it supposed to get
the username and password from?  An environment variable?
A configuraiton file?
-- 
Ron Newman             rnewman@cybercom.net
Web: http://www.cybercom.net/~rnewman/home.html

Re: Help - trn and zippo (or other authenticating NNTP servers)
#28391
Author: Michael Schuster
Date: Sat, 14 Dec 1996 00:00
63 lines
2185 bytes
In article <58v6q1$pr9@shell1.cybercom.net>,
Ron Newman <rnewman@shell1.cybercom.net> wrote:
>Could someone please explain to me how to configure, build,
>and run a version of "trn" that can deal with authenticating
>(paid access) NNTP servers such as Zippo?

Obtain trn4.0 alpha from 

    ftp://ftp.clari.net/private/trn/trn4-test50.tar.gz
    ftp://ftp.uu.net/private/trn/trn4-test50.tar.gz

Unpack using gzip and then tar. It will create a "trn4" directory. Change
to that directory and type "Configure". Things are self-prompting from
thereon in ... the defaults should work for the first try.

>Finally, in trn 4.0, where exactly is it supposed to get
>the username and password from?  An environment variable?
>A configuraiton file?

Your .trn/access file. Here is an extract from mine:. See access.def in
the trn4 package. The current patch level supports Zippo's authentication
arrangement.


[default]
#NNTP Server = local
Active File = /usr/lib/news/active
Active File Refetch = never
Spool Dir = /usr/spool/news
Thread Dir = none
Overview Dir = /usr/spool/newsdb
Active Times = /usr/lib/news/active.times
Group Desc = /usr/lib/news/newsgroups
Group Desc Refetch = never

[zippo]
NNTP Server = news.zippo.com
Auth User = username
Auth Password = mypassword
Active File Refetch = never
Group Desc Refetch = never

#
#

[Group 1]
ID = default
Newsrc = ~/.newsrc
Add Groups = yes

[Group 2]
ID = zippo 
Newsrc= ~/.newsrc-zippo
Add Groups = yes



-- 
Mike Schuster      	|	70346.1745@CompuServe.COM
schuster@panix.com 	|	schuster@mem.po.com 

Re: Help - trn and zippo (or other authenticating NNTP servers)
#28452
Author: Ron Newman
Date: Tue, 17 Dec 1996 00:00
126 lines
4850 bytes
Hello again everyone.

In our last episode, I asked how to make trn 3.6 work with an
authenticating NNTP server such as Zippo.  One helpful reader
suggested that I switch to a beta version of trn 4.0, which I
may eventually do.  In the meantime, however, the Zippo folks
helpfully provided a source patch which they claimed *should*
make trn 3.6 work with Zippo.  (I've appended it to the end
of this message.)

Well, the good news is that the patch does indeed supply
the correct authentication strings to the Zippo NNTp server
(snews.zippo.com).  The bad news is that trn 3.6 seems to
hang forever upon startup.

Upon closer examination (with the Gnu Debugger) I find that trn
is not in fact hanging, but is instead reading the server's entire "active"
file and building a huge hash table -- something that takes
quite a while when the server has as many newsgroups as Zippo.
trn is doing this because, when it starts up, one of the
first things it does is issue the following command to the
NNTP server:

   list active control

(see the function "ngdata_init" in ngdata.c, 
 and the function "nntp_list", in nntp.c).

The Super Zippo server snews.zippo.com, unfortunately, does not
respond properly to this command.  Instead of responding with the
expected 215, it sends back a fatal error:

   501 [active|newsgroups|distributions|schema]

As you'll see when looking at the code, this causes
nntp_list() to return -1, and ngdata_init() to fall
into a case which causes it to call ngdatahash_init(),
which builds the aforementioned hash table.

I assume that the Zippo NNTP server is buggy, rather than
the trn code, but that still leaves me without a useful
trn for this purpose.  Can someone recommend an additional
patch to trn 3.6 for this purpose?   

Two other questions:

Does trn 4.0 somehow avoid this problem?  

Why don't other NNTP clients besides trn run into this?

(Zippo's authentication patch to trn 3.6 follows.)

------------------------------------
----------------------------------------------------------------------------
*** nntpauth.c  Sat Dec 14 19:27:37 1996
--- nntpauth.c.orig     Sat Dec 14 18:57:29 1996
***************
*** 29,57 ****
   
      if (s = getenv("NNTPAUTH"))
        sprintf(ser_line, "%s %s", cmd, s);
-     else if(s = getenv("NNTPUSER"))
-       sprintf(ser_line, "AUTHINFO USER %s", s);
      else
        sprintf(ser_line, "%s any %s", cmd, loginName);
   
      /* issue authentication request */  
      nntp_command(ser_line);

!     if(s = getenv("NNTPPASS")) {
!         char line2[NNTP_STRLEN];
!
!       nntp_gets(line2, sizeof line2);
!       if (atoi(line2) != 381) {
!           ch = NNTP_CLASS_FATAL;
!       } else {
!           sprintf(ser_line, "AUTHINFO PASS %s", s); 
!           nntp_command(ser_line);
!           nntp_gets(line2, sizeof line2);
!           ch = atoi(line2);
!       }
!     }
!     else 
!       ch = (s? nntp_auth(s) : nntp_check(strict)); 
  
      if (ch == NNTP_CLASS_FATAL) {
        char tmpbuf[LBUFLEN];
--- 29,41 ----

      if (s = getenv("NNTPAUTH"))
        sprintf(ser_line, "%s %s", cmd, s);
      else
        sprintf(ser_line, "%s any %s", cmd, loginName);

      /* issue authentication request */
      nntp_command(ser_line);

!     ch = (s? nntp_auth(s) : nntp_check(strict));

      if (ch == NNTP_CLASS_FATAL) {
        char tmpbuf[LBUFLEN];
***************
*** nntpinit.c  Sat Dec 14 20:17:44 1996
--- nntpinit.c.orig     Sat Dec 14 18:57:29 1996
*************** 
*** 87,93 ****
      /* Now get the server's signon message */
      nntp_check(FALSE);
   
!     if (*ser_line == NNTP_CLASS_OK && getenv("NNTPUSER") == NULL) {
        char line2[NNTP_STRLEN];
        /* Send an XMODE READER command to see if this is a compliant
        ** nntpd we're talking to.  If not, try MODE READER just in
--- 87,93 ---- 
      /* Now get the server's signon message */
      nntp_check(FALSE); 

!     if (*ser_line == NNTP_CLASS_OK) {
        char line2[NNTP_STRLEN];
        /* Send an XMODE READER command to see if this is a compliant
        ** nntpd we're talking to.  If not, try MODE READER just in
***************


Re: Help - trn and zippo (or other authenticating NNTP servers)
#28460
Author: Michael Schuster
Date: Wed, 18 Dec 1996 00:00
62 lines
2927 bytes
In article <597oap$mho@lois.zippo.com>,
Ron Newman  <rnewman@cybercom.net> wrote:
>Hello again everyone.
>
>In our last episode, I asked how to make trn 3.6 work with an
>authenticating NNTP server such as Zippo.  One helpful reader
>suggested that I switch to a beta version of trn 4.0, which I
>may eventually do.  In the meantime, however, the Zippo folks
>helpfully provided a source patch which they claimed *should*
>make trn 3.6 work with Zippo.  (I've appended it to the end
>of this message.)

net-link sent me the same patch once; never could get it to work.

>Well, the good news is that the patch does indeed supply
>the correct authentication strings to the Zippo NNTp server
>(snews.zippo.com).  The bad news is that trn 3.6 seems to
>hang forever upon startup.
>
>Upon closer examination (with the Gnu Debugger) I find that trn
>is not in fact hanging, but is instead reading the server's entire "active"
>file and building a huge hash table -- something that takes
>quite a while when the server has as many newsgroups as Zippo.
>trn is doing this because, when it starts up, one of the
>first things it does is issue the following command to the
>NNTP server:
>
>   list active control
>
>(see the function "ngdata_init" in ngdata.c, 
> and the function "nntp_list", in nntp.c).
>
>The Super Zippo server snews.zippo.com, unfortunately, does not
>respond properly to this command.  Instead of responding with the
>expected 215, it sends back a fatal error:
>
>   501 [active|newsgroups|distributions|schema]
>
>As you'll see when looking at the code, this causes
>nntp_list() to return -1, and ngdata_init() to fall
>into a case which causes it to call ngdatahash_init(),
>which builds the aforementioned hash table.
>
>I assume that the Zippo NNTP server is buggy, rather than
>the trn code, but that still leaves me without a useful
>trn for this purpose.  Can someone recommend an additional
>patch to trn 3.6 for this purpose?   
>
>Two other questions:
>
>Does trn 4.0 somehow avoid this problem?  

Yes. I don't know how (perhaps if Wayne is reading) but it works on Zippo
(posting remotely may or may not work). You **REALLY** should try trn4.0
alpha.

-- 
Mike Schuster      	|	70346.1745@CompuServe.COM
schuster@panix.com 	|	schuster@mem.po.com 

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