🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.bugs
Article #11

Bug with pathinit and notify file in 2.10.3 beta.

#11
From: tim
Date: Wed, 18 Dec 1985 20:45
69 lines
2846 bytes
Description:
        When pathinit reads  the "notify"  file the newline  at the  end
        never gets stripped off.  This  causes a problem when running  a
        checkgroups message.  The newline causes the checkgroup  command
        to never receive the newsgroup list from standard in.

							Newline here |
								     V
	Dec 18 10:48	local	system(/usr/lib/news/checkgroups news
	 < /teldata/news/.in027858) status 0

	This problem could be in other versions of 2.10.3.

	(News version: B 2.10.3 4.3bsd-beta 6/6/85)

Repeat-by:
        Make sure NOTIFY is defined then create a "notify" file (if  one
        doesn't exist) and  run any  of the checkgroup  reports sent  by
        Gene Spafford  in  net.news.group.   You  should get  a  message
        saying all groups are invalid and  an entry in the logfile  like
        the one above.

Fix-by:
	The following context diff shows the fix.

*** pathinit.c	Wed Dec 18 11:15:14 1985
--- pathinit.c.new	Wed Dec 18 11:22:22 1985
***************
*** 86,91
  {
  #if defined(INEW) && defined(NOTIFY)
  	FILE	*nfd;		/* notify file descriptor		*/
  #endif /* INEW && NOTIFY */
  #ifndef ROOTID
  	struct passwd	*pw;	/* struct for pw lookup			*/

--- 86,92 -----
  {
  #if defined(INEW) && defined(NOTIFY)
  	FILE	*nfd;		/* notify file descriptor		*/
+ 	char	*p;
  #endif /* INEW && NOTIFY */
  #ifndef ROOTID
  	struct passwd	*pw;	/* struct for pw lookup			*/
***************
*** 170,175
  	if (nfd != NULL) {
  		bfr[0] = '\0';
  		(void) fgets(bfr, BUFLEN, nfd);
  		TELLME = AllocCpy(bfr);
  		(void) fclose(nfd);
  	} else

--- 171,178 -----
  	if (nfd != NULL) {
  		bfr[0] = '\0';
  		(void) fgets(bfr, BUFLEN, nfd);
+ 		if ((p = rindex(bfr,'\n')) != 0)  /* Strip off any newline */
+ 			*p = '\0';
  		TELLME = AllocCpy(bfr);
  		(void) fclose(nfd);
  	} else
-- 
-----
                                        Tim Rosmus
...uw-beaver_____!tikal!tim             Teltone Corporation
.......fluke___/                        120th Ave. N.E.
...microsoft__/                         Kirkland, WA  98033
                                        (206) 827-9626
Technical Details
Message-ID: <563@teldata.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxn!ihnp4!houxm!vax135!cornell!uw-beaver!tikal!teldata!tim

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site teldata.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxn!ihnp4!houxm!vax135!cornell!uw-beaver!tikal!teldata!tim
From: tim@teldata.UUCP
Newsgroups: net.bugs,net.news.b
Subject: Bug with pathinit and notify file in 2.10.3 beta.
Message-ID: <563@teldata.UUCP>
Date: Wed, 18-Dec-85 15:45:31 EST
Article-I.D.: teldata.563
Posted: Wed Dec 18 15:45:31 1985
Date-Received: Fri, 20-Dec-85 04:39:29 EST
Reply-To: tim@teldata.UUCP (Tim Rosmus)
Organization: Teltone Corp., Kirkland, WA
Lines: 69
Keywords: pathinit notify checkgroups