And since no one else has mentioned this...some of us don't use /etc/passwd for authentication. So searching /etc/passwd would not work anyway. Isn't there a C function call to check user/group id? Or at least a universal alternative...
t ----- Original Message ----- From: Matt Brookings <m...@inter7.com> To: vchkpw@inter7.com <vchkpw@inter7.com> Sent: Mon Aug 17 09:18:19 2009 Subject: Re: [vchkpw] vpopmail UID/GID hardcoded in config.h -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Itamar Reis Peixoto wrote: > currently vpopmail user and vchkpw group's need's to be created before > running ./configure. > > this is not good for packaging it as rpm, because in rpm the user and > group are created in %post section (after vpopmail installed) I'm pretty sure there are RPMs that handle this situation already. How do they do it? > any chance to improve this with automatic detection uid and gid using > getpwnam function ? I'm not sure if this would be considered an improvement. Parsing /etc/passwd every time a vpopmail binary is invoked could be expensive on some systems. I'm looking at adding a configuration file to vpopmail for the 5.5 branch that will contain all the stuff that usually you have to set at configure time. The UID/GID would be contained here as well, but that's not currently available. Just an OT about the config: It will be compiled so as to be very quick to load. Thoughts anyone? - -- /* Matt Brookings <m...@inter7.com> GnuPG Key FAE0672C Software developer Systems technician Inter7 Internet Technologies, Inc. (815)776-9465 */ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkqJgssACgkQIwet2/rgZyzmXQCeOl04M9MG0QVTyPUpXjxj6AIa wLUAn0LhtOYsOjPaDYLmm27vpMpWaRMp =0abu -----END PGP SIGNATURE----- !DSPAM:4a89c1de32714733445293!