Nasty bug in unbatch 2.10.3

Edward C. Bennett edward at ukecc.UUCP
Sat Feb 8 08:38:15 AEST 1986


	Recently I moved our news around and put things in some non-
standard places. I rebuilt the news software to reflect the changes
and installed it.
	When the first batches of news came in, uuxqt logged the
execution of rnews, but THE NEWS HAD DISAPPEARED! (/dev/blackhole
strikes again!)
	After much tracing I discovered the problem in unbatch. When
unbatch runs, it picks apart the batch and feeds the pieces to rnews.
The problem was that our rnews is in a wierd place not covered by
whatever PATH was in effect and the rnews was exec'ed without a full
pathname. Sloppy.
	The fix was simply to build the full pathname of rnews. Here
is the diff:

*** unbatch.c.orig	Fri Feb  7 17:24:11 1986
--- unbatch.c	Fri Feb  7 17:22:10 1986
***************
*** 89,95
  			(void) sprintf(buf, "%s/%s/rnews", logdir(HOME), LIBDIR);
  			execlp(buf, "rnews", (char *)0);
  #else
! 			execlp("rnews", "rnews", (char *)0);
  #endif
  			perror("rnews");
  			exit(1);

--- 89,100 -----
  			(void) sprintf(buf, "%s/%s/rnews", logdir(HOME), LIBDIR);
  			execlp(buf, "rnews", (char *)0);
  #else
! 			/*
! 			 * CHANGE - [Feb 7, edward at ukecc] Made the first
! 			 * arguement of execlp() the full pathname of rnews.
! 			 */
! 			(void) sprintf(buf, "%s/rnews", BINDIR);
! 			execlp(buf, "rnews", (char *)0);
  #endif
  			perror("rnews");
  			exit(1);
-- 
Edward C. Bennett

UUCP: ihnp4!cbosgd!ukma!ukecc!edward

Kentucky: The state that is being dragged, kicking and screaming,
	  into the 20th century.

"Goodnight M.A."



More information about the Net.bugs mailing list