🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
1 messages
1 total messages Started by Alexandre Vorobiev Wed, 08 Nov 1995 00:00
problems with nntpclnt-1.6.1
#3941
Author: Alexandre Vorobiev
Date: Wed, 08 Nov 1995 00:00
66 lines
3207 bytes
I have the source for nntpclnt-1.6.1.  I run Solaris 2.4 on SparcStations.

Configure does not find getpwent (which exists); this is not the problem,
since there is a built-in support in case getpwent is absent. 
When I compiled the source the first time (compiles fine with
-traditional on gcc 2.6.3), it would not let me post with error
"The name appears to be invalid". I found the problem and fixed it.
Here is the patch:
---------------------------snip--------------------------
*** inews.c-orig        Wed Oct 11 13:49:01 1995
--- inews.c     Tue Oct 10 00:06:34 1995
***************
*** 105,112 ****
                    while (fgets(passwd,sizeof passwd,pfp) != NULL) {
                        if (strncmp(username,passwd,strlen(username)))
                                continue;
!                       if (passwd[(strlen(username)-1)] != ':')
!                               continue;
                        foundit = 1;
                        break;
                        }
--- 105,112 ----
                    while (fgets(passwd,sizeof passwd,pfp) != NULL) {
                        if (strncmp(username,passwd,strlen(username)))
                                continue;
!                       if (passwd[strlen(username)] != ':')
!                               continue; 
                        foundit = 1;
                        break;
                        }
----------------------snip----------------------------
I patched the source, but now inews started segfaulting on me.  I 
narrowed the problem down to one line, however I can't make sense of 
that part of the code:
  file inews.c
  ------------
        cp++;
        for (fullname=cp, i=4; i; i--) { /* magic cookie XXX */
                if (fullname)
                                fullname = index(s,':')+1;
        }
--->>>>        cp = index(fullname,':');
This is the line that segfaults, line 129 (I think).


Next thing I did I compiled it with -DGETPWENT; compiled fine 
but I got a segfault in a different place, also one line:
   file nntpclnt.c
   ---------------
line 160
----->>>>>>    if (cp = getenv("NNTPSERVER")) {
                (void) strcpy(buf, cp);
                return (buf);
        }
 
 the cp = getenv("NNTPSERVER") statement segfaults, which I do not know how
 to fix. I think at this point, if I can get around the last problem, I 
 will be fine.

 Any suggestions would be appreciated.
 Please respond to sasha@cs.swarthmore.edu

 Sasha / sasha@cs.swarthmore.edu


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