This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: nscd caching getpwent() and getgrent()


On Thu, 03 Aug 2006 09:11:30 +0200, Petter Reinholdtsen wrote:

> [Ulrich Drepper]
>> Don't bother.  That is one of the most stupid ideas I've read in a
>> while and it won't be added.
> 
> Can you explain why?  Caching a bit more in nscd do not appear like
> one of the stupid ideas I've read, so I wonder why it appear so stupid
> to you.

If I had to guess, I'd say that getpwent() and getgrent() are terribly
designed interfaces that aren't threadsafe, aren't generally usable for
systems with more than a handful of accounts accessed via nss_files, and
are only included because POSIX requires them and ugly old code expects
them to exist. Furthermore, they aren't ever (or certainly shouldn't be)
used in performance critical situations.

Adding caching support to nscd increases complexity with
basically no gain, especially considering that nscd is designed for fast
random read-only access to specific datums, and not writable linear
traversals over an entire dataset.

For the kinds of things that getpwent() and getgrent() are used for,
you're better off using your directory service's native interface (LDAP,
Kerberos, BigTable?, etc.) or something generic like libuser (assuming
that has a sensible interface).


> 
> BTW: Are you aware that your message appear very hostile?  Reading
>   your messages make me wonder if my time would be better spend
>   elsewhere.  Is this intended?  It is not the first message from you
>   having this effect on me, so I thought it best to make you aware of
>   it.
> 
> Friendly,



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]