hi, there!

On Tue, 3 Aug 1999, Oscar Bonilla wrote:

> *Step One:  I ported the NetBSD implementation of nsdispatch(3) as implemented 
> by Luke Mewburn. See attached patch to libc and new header file. I'm also
> attaching the man page for /etc/nsswitch.conf. Right now it compiles,
> installs, and works for some simple tests I've run.
> 
> *Step Two: make getpwent, getgrent, and friends actually use the nsdispatch
> function. I've already started looking at the source, but am having trouble
> with the NIS part. Maybe someone more knowledgeable could write the NIS
> function.
> 
> Basically we have to reduce each of the functions to a simple nsdispatch 
> call and then implement the real functions... Here's an example from
> getpwent.c
> 
> /* Basically we reduce getpwent to a simple nsdispatch call */
> 
> struct passwd *
> getpwent()
> {
>       int r;
>       static const ns_dtab dtab[] = {
>               NS_FILES_CB(_local_getpw, NULL)
>               NS_DNS_CB(_dns_getpw, NULL)
>               NS_NIS_CB(_nis_getpw, NULL)
>               NS_COMPAT_CB(_compat_getpwent, NULL)
>               { 0 }
>       };
> 
>       r = nsdispatch(NULL, dtab, NSDB_PASSWD, "getpwent", compatsrc,
>           _PW_KEYBYNUM);
>       if (r != NS_SUCCESS)
>               return (struct passwd *)NULL;
>       return &_pw_passwd;
> }
> 
> The we have to implement _local_getpw, _dns_getpw, _nis_getpw, 
> and _compat_getpwent and make them behave as expected.

> NetBSD seems to support having the passwd database on DNS using something
> called HESIOD (I hadn't heard about it before). I don't think FreeBSD  
> *Step Three: Implement _ldap_getpw :)

pam/nss ldap modules are already available (http://www.padl.com)
i think we should implement NSS in that way so we need not recompile if we
want to add third-party nss module. Also compatibility with Solaris is
desirable.

/fjoe




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to