[net.bugs] Nasty bug in unbatch 2.10.3

edward@ukecc.UUCP (Edward C. Bennett) (02/08/86)

	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@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."