Date: Sun, 11 Nov 2001 09:24:58 -0800 (PST) From: Harald Hanche-Olsen <hanche@math.ntnu.no> To: freebsd-gnats-submit@FreeBSD.org Subject: bin/31913: isdnd may be unable to run logging tasks during startup Message-ID: <200111111724.fABHOwd11413@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200111111724.fABHOwd11413>