Date: Wed, 4 Aug 1999 13:08:43 +0700 (NSS) From: Max Khon <fjoe@iclub.nsu.ru> To: Oscar Bonilla <obonilla@fisicc-ufm.edu> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: NSS Project Message-ID: <Pine.BSF.4.05.9908041303330.11151-100000@iclub.nsu.ru> In-Reply-To: <19990803095333.A14120@fisicc-ufm.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
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 majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9908041303330.11151-100000>