-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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
configure-time options
and settings.
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,
considering the
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.
- -Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
iD8DBQFKizqBve7eT9VwhJURAo3GAJ0bvRwBCEINbHu1Aajl4oDNwTjnbACaAtMP
gtLjiLcK09pkh34A6qBFGBI=
=472+
-----END PGP SIGNATURE-----
!DSPAM:4a8b3a9032712083014635!