At 3:47 PM +0000 12/5/00, Fergal Daly wrote:
> Hi all,
> I'm using the homedir mail and I was doing some messing about with
> eliminating /etc/passwd when I discovered that every time I log in, genpath
> gets called 4 times, which means that getpwnam is called 4 times, which will
> cause a big hit with a large passwd file (or if you use a DB).
> There are also
> several other places in the code that do passwd file lookups.
>
> It would be nice if qpopper did a single getpwnam call and then cached the
> results somewhere (maybe in the in POP structure). I know genpath doesn't
> have access to this structure (and it shouldn't either) but I think there
> should be a way of passing an already retrieved passwd structure into
> genpath.
>
> A single passwd lookup opens the door for very easy addition of weird and
> wacky custom passwd lookup methods. By the way, you still need to worry
> about passwd lookups even if you're using PAM, Kerberos or APOP as these are
> simply authentication methods and do not handle UID, GID or homedir lookup.
>
> There's a bit of work involved in making this happen and I'm willing to do
> it but only if the maintainers are open to accepting this sort of change.
> So, maintainers, are you?
>
> Fergal
This has been on the to-do list since genpath() was cleaned up in
3.x. If you send a patch we'd be happy to review it for inclusion,
if not, it will probably be addressed in an upcoming release.