Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 03 Jun 2003 09:45:53 -0700
From:      Tim Kientzle <kientzle@acm.org>
To:        Jan Grant <Jan.Grant@bristol.ac.uk>
Cc:        Dag-Erling Smorgrav <des@ofug.org>
Subject:   Re: Making a dynamically-linked root
Message-ID:  <3EDCD0C1.1020300@acm.org>
References:  <Pine.GSO.4.44.0306031123461.13279-100000@mail.ilrt.bris.ac.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
Jan Grant wrote:

> On Mon, 2 Jun 2003, Tim Kientzle wrote:
>>Dag-Erling Smorgrav wrote:
>>>Was /bin/sh dynamically linked?  It shouldn't be.
>>
>>Sorry, but /bin/sh calls 'getpwnam()', which means
>>/bin/sh should use NSS, and thus needs to be
>>dynamically linked.
> 
> I don't think this reasoning is completely sound. A functional (but
> minimalist) static /bin/sh (or /sbin/sh) will still let you run
> /usr/local/bells-and-whistles/sh if you need ~user.


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.

Tim

P.S. I personally doubt that a static /bin/sh would actually impact
the boot performance much at all.



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