Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Apr 2003 09:59:47 -0500
From:      "Jacques A. Vidrine" <nectar@FreeBSD.org>
To:        "Michael A. Bushkov" <bushman@rsu.ru>
Cc:        and@rsu.ru
Subject:   Re: Re: nsswitch implementation
Message-ID:  <20030414145947.GA56580@madman.celabo.org>
In-Reply-To: <F62F7D8D-6E7F-11D7-BFAE-000393BC13C6@rsu.ru>
References:  <F62F7D8D-6E7F-11D7-BFAE-000393BC13C6@rsu.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Apr 14, 2003 at 05:49:50PM +0400, Michael A. Bushkov wrote:
> >
> >>The daemon (level 2) should be able do dynamically open modules - we
> >>can't call dlopen() directly from libc.
> >
> >Sure we can.  You just can't if you are a statically-linked
> >executable.  [The implementation that will be committed shortly allows
> >for building an NSS module with world so that statically-linked
> >binaries are also supported.]
> 
> Do you want to statically compile nss-modules in libc? If you do that, 
> you'll have to statically link a lot of stuff into libc (for example, 
> if we have nss_ldap module - we must compile whole ldap implementation 
> into libc). And if we do it that way, libc will grow and grow... 
> Besides, if you want to change a module code, you'll have to recompile 
> whole libc.
> We are very interested to know your way of solving these problems...

I don't solve them.  I expect people who want to use 3rd party NSS
modules to use a completely dynamically-linked system.

You are correct, I would not want to compile PADL.COM's nss_ldap into
libc.  However, Samba's winbind module is not so heavy-weight and
possibly not so problematic from the code-size perspective.  As I
said, it is already partioned into a module and a daemon.

Keep in mind why one wants nsswitch: in order to use already existing
NSS modules.  Most existing NSS modules are written for Solaris and/or
Linux.  These platforms follow an in-process model.  An IPC model is
quite different, and would require significant porting effort for each
NSS module.  (There is quite some distance between existing APIs and
semantics versus the APIs and semantics of an IPC model.)  I think it
is presumptuous to believe that NSS module writers are going to invest
significant effort to develop FreeBSD-specific NSS modules.


Cheers,
-- 
Jacques A. Vidrine <nectar@celabo.org>          http://www.celabo.org/
NTT/Verio SME          .     FreeBSD UNIX     .       Heimdal Kerberos
jvidrine@verio.net     .  nectar@FreeBSD.org  .          nectar@kth.se



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030414145947.GA56580>