root@aaec.OZ (Superuser) (11/13/85)
Description:
There are two related problems with checkgroup control messages
being processed by "inews".
Initially it reports
sh: $SPOOLDIR/.arXXXXXX/checkgroups: not found
(where XXXXXX is the process id)
When this is fixed and the message is run through inews it reports
all net, mod and fa groups should be removed. It also deletes all
these entries in the newsgroups file.
I think the same problem existed in News B 2.10.2 but because of
other problems with "$LIBDIR/checkgroups" no report was ever
generated.
(News version: B 2.10.3 alpha 4/15/85)
Repeat-by:
Running any of the checkgroup reports sent by Gene Spafford in
net.news.group.
Diagnosis:
The line of code invoking "$LIBDIR/checkgroups" is all wrong.
It has the wrong number of arguments in the wrong order and
with the wrong input file. (See the patch below)
It makes use of the temporary file ("ARTICLE") before it has
copied any of the message to it.
Fix-by:
The following two context diffs show the fixes. The change
to checkgroups is caused by reading the file containing only
the body of the message and not any of the headers.
*** control.c.old Tue Jun 4 05:53:48 1985
--- control.c Wed Nov 13 15:39:31 1985
***************
*** 486,493
int rc;
(void) setuid(geteuid());
! (void) sprintf(bfr, "%s/checkgroups %s",
! ARTICLE, LIB, (TELLME && *TELLME) ? TELLME : NEWSUSR);
rc = system(bfr);
log("system(%s) status %d", bfr, rc);
}
--- 486,493 -----
int rc;
(void) setuid(geteuid());
! (void) sprintf(bfr, "%s/checkgroups %s < %s",
! LIB, (TELLME && *TELLME) ? TELLME : NEWSUSR, INFILE);
rc = system(bfr);
log("system(%s) status %d", bfr, rc);
}
*** checkgroups.sh.old Wed Nov 13 13:34:18 1985
--- checkgroups.sh Wed Nov 13 15:56:02 1985
***************
*** 3,9
# Read first line of stdin. If of the form "-n group", then only check
# for the specified group. Otherwise, assume doing net and fa.
! sed -e '1,/^$/d' -e '/^#/d' | (
read line
case "${line}" in
-n*)
--- 3,9 -----
# Read first line of stdin. If of the form "-n group", then only check
# for the specified group. Otherwise, assume doing net and fa.
! sed -e '/^$/d' -e '/^#/d' | (
read line
case "${line}" in
-n*)
-----
Frank Crawford
ACSnet: root@aaec.OZ
UUCP: {seismo,mcvax,ukc,prlb2,ubc-vision}!munnari!aaec.OZ!root
Australian Atomic Energy Commission Phone: +61 2 543 3094
Private Mailbag,
SUTHERLAND,
N.S.W. 2232
Australia.