Chris Jaeger wrote: > > Hi all, > > Well, after having written my nice NSS library, I started > trying it out with some applications. All was going wonderfully > until I noticed that pam_unix uses getpwnam() internally, which > has the nasty side effect of overwriting the static buffer that > was returned by that function previously. So my orignal username > was blown away again. Is there some particular reason that pam_unix > uses getpwnam over the reentrant version, getpwnam_r()? There seems > to be some uncertainty re: getpwent_r(), but the #ifdefs would > indicate that getpwnam_r is standardized. Would a patch > substituting getpwnam_r for getpwnam be accepted? I think I'd like to see an autoconf test for this, and something to ensure that any module that uses it can fall back to the non _r function if its not available at compile time. I'd also draw your attention to this: http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/pam_appl-4.html#ss4.1 Cheers Andrew > > Thanks, > Chris > > _______________________________________________ > > Pam-list@redhat.com > https://listman.redhat.com/mailman/listinfo/pam-list