Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Feb 1999 18:50:36 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        wes@softweyr.com (Wes Peters)
Cc:        dave@jetcafe.org, freebsd-hackers@FreeBSD.ORG
Subject:   Re: getpwnam and getpwnam_r
Message-ID:  <199902171850.LAA21086@usr07.primenet.com>
In-Reply-To: <36CA6F15.58EB82DF@softweyr.com> from "Wes Peters" at Feb 17, 99 00:26:13 am

next in thread | previous in thread | raw e-mail | index | archive | help
> > 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199902171850.LAA21086>