[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Q: --with-getpwnam-library="-L.. -l.." ?



> At the moment I am undecided onto which programs that library
> should be linked when it is used in production.  "mailbox" is
> definitely one, but router could be another ?  Hold and vacation
> should not need it (should not be run!) in our systems, but
> you may envision some other uses yourselves.
> 
> In case of router we do have a problem, though.  For some uses
> (like finding "nobody" user) it needs  /etc/passwd  related
> getpwnam(), but for others it needs customer-related database.
> In fact same is at least partially true with "mailbox", I think.

Personally I compile router, mailbox and (for no good reason) smtpserver
with a replacement getpwnam/getpwuid.  My custom library does take care
of `special' uids like `nobody' etc.  As long as the same custom library
is used with POP and FTP that are not aware of it, it (the library)
have to supply `special' uids anyway.  Thus, I do not see any good point
in special handling in the application program.  What *I* need is a
way to include context like

	-L/usr/abs/lib -labs_pwd -labs_access -labs_mail

to the linker command line, that's all.  Currently, I am doing this with
a small sed script run on Makefiles.

Eugene

OFFTOPIC: actually, this replacement library is a part of the system
wide customer authentication and accounting database; it uses Oracle
as backend, has `agent daemons' running on all involved machines that
are connected to the backend daemon over SSL and responding to local
queries over UNIX domain sockets.  Although complicated, the system
seems to work ;), getpwnam type query takes 70+ ms right now.