From owner-freebsd-current Sat Dec 21 09:53:08 1996 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id JAA18257 for current-outgoing; Sat, 21 Dec 1996 09:53:08 -0800 (PST) Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.freebsd.org (8.8.4/8.8.4) with SMTP id JAA18247 for ; Sat, 21 Dec 1996 09:52:58 -0800 (PST) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id SAA22219 for ; Sat, 21 Dec 1996 18:51:09 +0100 Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id SAA09650 for freebsd-current@FreeBSD.org; Sat, 21 Dec 1996 18:51:09 +0100 Received: (from j@localhost) by uriah.heep.sax.de (8.8.4/8.6.9) id SAA11294 for freebsd-current@FreeBSD.org; Sat, 21 Dec 1996 18:44:39 +0100 (MET) From: J Wunsch Message-Id: <199612211744.SAA11294@uriah.heep.sax.de> Subject: Re: group(5) limits To: freebsd-current@FreeBSD.org (FreeBSD-current users) Date: Sat, 21 Dec 1996 18:44:39 +0100 (MET) Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: from David Nugent at "Dec 21, 96 02:36:50 pm" X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E X-Mailer: ELM [version 2.4ME+ PL17 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk As David Nugent wrote: > Try running your code with /etc/malloc.conf -> AJ and using getgrent(). > I fixed a similar bug in getttyent() a week ago. With these malloc > options, getttynam() always returned junk, and without the usual > side-effects when someone allocated/reused the freed block would > appear. I should note that the getttyent() bug has been introduced by me on a similar occasion, when replacing the static line buffer for ttys(5) by a dynamically allocated one. (I.e., it's not a genuine 4.4BSD bug.) > I'd suggest just leaving these three lines out. This turned out to be the best sollution for ttyname() as well. Both files, ttys(5) and group(5) tend to change only slowly, so it's a win in the end to reuse the buffer. > BTW, is this a 2.2 candidate? Hardly. It's not even committed to the HEAD yet, and as you've just proven, still might experience bugs. The problem with this kind of fixes is that they are naturally rather bug fixes than feature enhancements, but for any release cycle, you gotta draw the line somewhere. The BETA is due on sunday, so this submission will likely miss the deadline for this time. Don't panic, the next release will come for sure, and it's certainly a candidate for 2.2-stable later. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)