From owner-freebsd-hackers Tue Aug 3 9:21: 9 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from lion.butya.kz (butya-gw.butya.kz [194.87.112.252]) by hub.freebsd.org (Postfix) with ESMTP id A24B5152FC for ; Tue, 3 Aug 1999 09:20:52 -0700 (PDT) (envelope-from bp@butya.kz) Received: from bp (helo=localhost) by lion.butya.kz with local-esmtp (Exim 2.12 #1) id 11BhI9-000CMH-00; Tue, 3 Aug 1999 23:19:53 +0700 Date: Tue, 3 Aug 1999 23:19:53 +0700 (ALMST) From: Boris Popov To: Oscar Bonilla Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: NSS Project In-Reply-To: <19990803095333.A14120@fisicc-ufm.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 3 Aug 1999, Oscar Bonilla wrote: > > Following on the NSS (Name Service Switch): > > *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. Great. I haven't alnalyse all of the code but this thing looks a little bit limited: > /* 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 } > }; May be I'm totally wrong, but dtab[] array can be constructed (or extended) dynamically, based on configuration file and _*_getpw() functions can be placed in shared libraries (just like PAM modules). In this case it is possible to extend NSS space without disturbing libc code. -- Boris Popov http://www.butya.kz/~bp/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message