From owner-freebsd-bugs Sun Nov 11 9:30:13 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id E219A37B42A for ; Sun, 11 Nov 2001 09:30:00 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id fABHU0G11871; Sun, 11 Nov 2001 09:30:00 -0800 (PST) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id BA22A37B419 for ; Sun, 11 Nov 2001 09:24:58 -0800 (PST) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id fABHOwd11413; Sun, 11 Nov 2001 09:24:58 -0800 (PST) (envelope-from nobody) Message-Id: <200111111724.fABHOwd11413@freefall.freebsd.org> Date: Sun, 11 Nov 2001 09:24:58 -0800 (PST) From: Harald Hanche-Olsen To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: bin/31913: isdnd may be unable to run logging tasks during startup Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 31913 >Category: bin >Synopsis: isdnd may be unable to run logging tasks during startup >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Nov 11 09:30:00 PST 2001 >Closed-Date: >Last-Modified: >Originator: Harald Hanche-Olsen >Release: 4.4-RELEASE >Organization: Norwegian University of Science and Technology >Environment: FreeBSD thoth 4.4-RELEASE FreeBSD 4.4-RELEASE #0: Sat Nov 10 23:02:42 CET 2001 root@:/usr/src/sys/compile/THOTH i386 >Description: Isdnd tries to read the rates file, and does not find it. (That's all right - I have no rates file, since the price structure of my telco doesn't really fit the isdnd model.) Isdnd generates a message to that effect, then tries to run the program associated with my catch-all regexp. Now, useacctfile is true but acctfp is NULL, so after forking, the child process tries to run fclose(NULL). Poof. (See the patch, in the Fix section below, to make sense of this description.) >How-To-Repeat: Have no rates file, but specify an account file in isdnd.rc. >Fix: The following patch fixes the problem. I believe it is necessary and sufficient to fix the problem, and certainly it can do no harm. --- /usr/src/usr.sbin/i4b/isdnd/exec.c~ Wed Aug 1 19:45:03 2001 +++ /usr/src/usr.sbin/i4b/isdnd/exec.c Sun Nov 11 16:20:16 2001 @@ -147,9 +147,9 @@ * 3. /var/log/isdnd.log (or similar, when used) */ close(isdnfd); - if(useacctfile) + if(useacctfile && acctfp) fclose(acctfp); - if(uselogfile) + if(uselogfile && logfp) fclose(logfp); >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message