Re: PAM and the pwd.h interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andrew Morgan wrote:
> 
> Chris Jaeger wrote:
> > 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.
> 

	While I might write such a patch for my own use, I'm not 
sure submitting it will be worthwhile. The half-way fix is simply 
to separate pam_unix's struct passwd buffer from the one used by 
libc's getpwnam. Sufficient for my needs, but it doesn't solve any
fundamental problems. Making pam_unix reentrant would be more 
useful in general, but that would require a bit more work. Or maybe 
I'll just fall back on pam_pwdb, which is also sufficient. If
anyone wants the half-way "fix", let me know.

Just mumbling to myself... (in case someone cares to point out
something that I've missed/something idiotic I've said)

Thanks,
Chris

	Things that would need to be done to make pam_unix
completely reentrant (items may be missing):

unix_chkpwd.c: getuidname returns a static local pointer.
support.c: PAM_getlogin contains a static local
pam_unix_passwd.c: contains several static local vars
bigcrypt.c: static storage area (but this appears to be by
            mandate)
*.c: several calls to getpwnam





[Index of Archives]     [Fedora Users]     [Kernel]     [Red Hat Install]     [Linux for the blind]     [Gimp]

  Powered by Linux