-----BEGIN PGP SIGNED MESSAGE-----
On Aug 17, 2009, at 4:03 PM, Matt Brookings wrote:
Itamar Reis Peixoto wrote:
storing uid / gid in a config file will be light
Lighter than accessing an authentication database, agreed. Like I
said, I'm hoping
to add configuration API to vpopmail that will replace all the
The vusage client and daemon use some admittedly rather older and
hastily put together
configuration code, that really isn't as efficient as it should be,
vusage client is built for speed.
How often does the code actually reference the UID/GID? Could you
have a function to look it up and cache it in a static once found?
A quick check and it looks like it's only referenced when adding a
user or updating the tcp.smtp.cdb file. There are a few other
references, but the common things (like vchkpw and vdelivermail)
don't appear to make use of it.
Probably not a big deal to use getpwnam.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
-----END PGP SIGNATURE-----