[net.news] inews fix to kill Lines: 0 articles

grr@cbmvax.cbm.UUCP (George Robbins) (05/22/86)

Since the munged articles with 0 lines issuing from hpislx are
still drifting in, I worked up the following simple patch to
inews.c to reject articles with Lines: 0.

In any news group but control, these articles represent either a
goofed posting, a software problem, or somebody trying to be clever.
I think it better to reject them, and hope that a better version
comes in through an alternate path...

Patch to inews.c for news 2.10.3.beta - others are probably similar
patch goes just before the call to insert at the tail end of main


		ctlcheck();
	}

	if (mode == CREATENG)
		createng();
	/* Determine input. */
	if (mode != PROC)
		input();

>	/* Now see if there were any lines of text in the article */
>	if (header.intnumlines == 0 && !is_ctl)
>		xerror("%s rejected - no text lines",header.ident);

	/* Do the actual insertion. */
	insert();
}

/*
 *	Create a newsgroup
 */
createng()
{



Oh, be sure that when you are done, that inews still has appropriate
user, group, and su/sgid bits set, and that inews and rnews are still
linked together - could be embarressing otherwise...

-- 
George Robbins - now working with,	uucp: {ihnp4|seismo|caip}!cbmvax!grr
but no way officially representing	arpa: cbmvax!grr@seismo.css.GOV
Commodore, Engineering Department	fone: 215-431-9255 (only by moonlite)