Re: Shadow Passwords

Miquel van Smoorenburg (miquels@cistron.nl)
Sun, 31 Aug 1997 19:33:56 +0200

According to Jon Lewis:
> > >Is there really much point in caching 1 passwd entry?
> >
> > Well, the code in the radiusd calls getpwnam potentially more then one time
> > for the same username. It makes sense to cache this, and I took the
> > easy way out by using rad_getpwnam in all places I'd normally use getpwnam.
>
> I hadn't looked that closely. Why does the code call getpwnam repeatedly?

Well, it used to. It now only calls it twice if it has to check the
Group = attribute too. Or more times if you have multiple DEFAULT entries
with Group = (it needs pw->pw_gid).

Mike.

-- 
| Miquel van Smoorenburg |                                                    |
| miquels@cistron.nl     | Owners of digital watches, your days are numbered. |
|     PGP fingerprint: FE 66 52 4F CD 59 A5 36  7F 39 8B 20 F1 D6 74 02       |