From owner-freebsd-hackers Wed Feb 17 10:51:18 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp02.primenet.com (smtp02.primenet.com [206.165.6.132]) by hub.freebsd.org (Postfix) with ESMTP id E5140113E6 for ; Wed, 17 Feb 1999 10:51:13 -0800 (PST) (envelope-from tlambert@usr07.primenet.com) Received: (from daemon@localhost) by smtp02.primenet.com (8.8.8/8.8.8) id LAA14782; Wed, 17 Feb 1999 11:51:13 -0700 (MST) Received: from usr07.primenet.com(206.165.6.207) via SMTP by smtp02.primenet.com, id smtpd014542; Wed Feb 17 11:50:57 1999 Received: (from tlambert@localhost) by usr07.primenet.com (8.8.5/8.8.5) id LAA21086; Wed, 17 Feb 1999 11:50:37 -0700 (MST) From: Terry Lambert Message-Id: <199902171850.LAA21086@usr07.primenet.com> Subject: Re: getpwnam and getpwnam_r To: wes@softweyr.com (Wes Peters) Date: Wed, 17 Feb 1999 18:50:36 +0000 (GMT) Cc: dave@jetcafe.org, freebsd-hackers@FreeBSD.ORG In-Reply-To: <36CA6F15.58EB82DF@softweyr.com> from "Wes Peters" at Feb 17, 99 00:26:13 am X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > Where are the thread-safe, reentrant versions of this routine in > > FreeBSD 3.1? No additions to the list (I'm too tight for time to look at my CDROM at the moment). The routines getpwnam, getspnam are problematic, in general. A number of the cron-triggered VM bugs have to do with the dbm routines mmap'ping the password database (COW), and cron modifying the contents of the fields, as if they were static buffers in libc. It seems to me that the use of a static structure with pointers to the relevent "return data" will be problematic for threads based, reentrant versions of these routines. I am loathe to suggest TLS (thread local storage) as a soloution, since it could easily interfere with marshalling data between kernel threads (as it does on Windows 95/98/NT) due to it being outside the common address space as an implementation detail. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message