Article View: net.bugs
Article #489Bug with checkgroups msg in News B 2.10.3
From: Superuser
Date: Wed, 13 Nov 1985 05:49
Date: Wed, 13 Nov 1985 05:49
91 lines
3172 bytes
3172 bytes
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.
Technical Details
Message-ID:
<534@aaec.OZ>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbosgd!ulysses!allegra!mit-eddie!think!harvard!seismo!munnari!basser!aaec!rootShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 alpha 4/15/85; site aaec.OZ Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbosgd!ulysses!allegra!mit-eddie!think!harvard!seismo!munnari!basser!aaec!root From: root@aaec.OZ (Superuser) Newsgroups: net.bugs,net.news.b Subject: Bug with checkgroups msg in News B 2.10.3 Message-ID: <534@aaec.OZ> Date: Wed, 13-Nov-85 00:49:29 EST Article-I.D.: aaec.534 Posted: Wed Nov 13 00:49:29 1985 Date-Received: Thu, 14-Nov-85 08:23:46 EST Organization: Australian Atomic Energy Commission Lines: 91 Keywords: checkgroups control.c news