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

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





On Thu, 9 Apr 1998 mea@nic.funet.fi wrote:

> Return-Path: <zmailer-owner@nic.funet.fi>
> Delivered-To: ip@madhaus.utcs.utoronto.ca
> Received: (qmail 21857 invoked from network); 9 Apr 1998 12:24:02 -0400
> Received: from bureau7.utcc.utoronto.ca (128.100.132.17)
>   by madhaus.utcs.utoronto.ca with SMTP; 9 Apr 1998 12:24:02 -0400
> Received: from NO-IDENT-SERVICE@nic.funet.fi (port 3104 [128.214.248.6]) by bureau7.utcc.utoronto.ca with ESMTP id <81165-14895>; Thu, 9 Apr 1998 12:24:00 -0400
> Received: by nic.funet.fi id <6912-660>; Thu, 9 Apr 1998 19:23:04 +0300
> From:	mea@nic.funet.fi
> To:	zmailer@nic.funet.fi
> Subject: Q: --with-getpwnam-library="-L.. -l.." ?
> Message-Id: <19980409162305Z6912-660+354@nic.funet.fi>
> Date:	Thu, 9 Apr 1998 19:23:04 +0300
> 
> Hello,
> 
> I wrote a few words of document before doing actual code:
> 
> \item[\tt ---with-getpwnam-library="-L... -l..."] \mbox{} \\
> Certain sites have expressed wishes to use their own libraries
> to replace the standard {\tt getpwnam()} routines.
> These are used in router, mailbox, hold, and vacation
> programs.
> 
> The thing behind this question is that at my work we have our
> own special databases to handle email customer username mappings.
> 
> Essentially it works by replaceing "/etc/passwd" file and related
> libaries with its own interfaces.  It is very fast at finding
> user specific data when it gets username, and it does not at all
> find username, if given a numeric uid -- it is not UNIX passwd
> database at all.
> 
> 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.
> 
> Any ideas folks ?
> Remember, what ever I use, you have to adapt your libraries to it.
> 
> /Matti Aarnio <mea@nic.funet.fi>
> 

What we do at UofT is have a custom getpwnam library that first looks
in /etc/passwd, and if no match is found, looks in our custom database.
We've compiled router, mailbox, and vacation with it.  We need it
in vacation because the code runs getpwnam and returns an error if
it can't find the user. Similarly with hold.

Peter
_____________________________________________________
Peter Ip, PhD
Computing and Network Services, University of Toronto
email: peter.ip@utoronto.ca