Re: Making a dynamically-linked root

From: Sebastian Lederer (sl_at_linast.de)
Date: 06/04/03

  • Next message: Daniel C. Sobral: "Re: Making a dynamically-linked root"
    Date: Wed, 4 Jun 2003 10:38:01 +0200
    To: Tim Kientzle <kientzle@acm.org>
    
    
    

    On Tue, Jun 03, 2003 at 09:45:53AM -0700, Tim Kientzle wrote:
    [...]
    > My reasoning is correct. The point here is that /bin/sh is not
    > minimalist, as evidenced by the fact that it calls getpwnam(). (Yes,
    > this implies that 'ps', 'ls', 'date', and even 'cat' are not "minimalist,"
    > either, since they require pluggable library features.) If you want to
    > remove features from /bin/sh to make it truly minimal, or add a new static
    > shell to the base system, that's a different issue.
    >
    > The current /bin/sh must be dynamically linked because it relies on NSS.

    One could implement an NSS proxy/cache daemon like lookupd in Mac OS X
    (or nscd in Linux/Solaris, although the general impression seems to be
    that "nscd sucks"). This way static binaries could use dynamic NSS
    plugins.

    The cache daemon can be dynamically linked and make full use of all
    NSS plugins.

    A small NSS module that can talk to the daemon can be included into
    all statically linked programs.

    So when the daemon is not running, programs just use the default
    static NSS modules (files, NIS, dns, hesiod). When the daemon IS
    running, all programs, statically or dynamically linked, can utilize
    all NSS modules which can be loaded dynamically by the daemon.

    I think this will also improve performance in certain cases, mostly
    when using LDAP, because not every invocation of "ls" will need to
    make a new connection to the LDAP server to resolve the uids/gids.

    - Sebastian Lederer

    
    



  • Next message: Daniel C. Sobral: "Re: Making a dynamically-linked root"