This is the mail archive of the
libc-hacker@cygnus.com
mailing list for the glibc project.
Re: nss buffers?
- To: smurf@noris.de (Matthias Urlichs)
- Subject: Re: nss buffers?
- From: Ulrich Drepper <drepper@cygnus.com>
- Date: 12 Jan 1999 07:56:53 -0800
- Cc: libc-hacker@gnu.org
- References: <77fgqv$276$1@smurf.noris.de>
- Reply-To: drepper@cygnus.com (Ulrich Drepper)
smurf@noris.de (Matthias Urlichs) writes:
> I just noticed that a getspnam() call will trash the buffer used by a
> previous getpwnam(). This caused wu-ftpd to break.
>
> Fixing wu-ftpd is simple, but what do the standards say? Is that buffer
> allowed to be shared?
There shouldn't be any problem since nothing from the buffer is read.
Of course you can't use the same buffer in both functions at the same
time.
If there are still problems please investigate them. I really cannot
think about anything which could be wrong but who knows? (BTW:
shouldn't it be getspname_r and getpwnam_r?)
--
---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com `------------------------