From: Steve VanDevender (stevev@miser.uoregon.edu)
Date: 04/14/93


From: stevev@miser.uoregon.edu (Steve VanDevender)
Subject: Re: The dangers of playing with shared libraries
Date: 14 Apr 1993 00:51:53

In article <1qfot4$tin@hal.gnu.ai.mit.edu>
ericy@hal.gnu.ai.mit.edu (Eric Youngdale) writes:

   In article <1993Apr13.161616.24954@kf8nh.wariat.org>
   bsa@kf8nh.wariat.org (Brandon S. Allbery) writes:

>(2) A statically-linked shell has been suggested. Of the
>currently available ones, I would have to suggest rc just
>because it's compact... the concept of a statically linked
>"bash" makes me think of a "bashdisk" containing nothing
>*but* bash because nothing else will fit :-)

   This is what the bootable rootdisk is for. I have yet to see
   a good argument for why the bootable rootdisk cannot be used
   instead of specially staticly linked binaries to fix screwups
   with the sharable libraries.

A good argument: If you trash the shared libraries you can't even
run sync! If you use a bootable rootdisk you have to shut the
system down, but you risk filesystem damage because you couldn't
sync first. shutdown or halt won't work with the shared
libraries gone either.

Ideally, if you haven't panicked the kernel then you really
shouldn't have to reboot the machine. Something simple like
mashing the shared library links doesn't destroy the system to
the point of unusability _except_ that absolutely nothing will
run, including the commands you could have used to get things
going again without a reboot. If only I had thought of using a
while/read/echo loop in one of the shells I still had running to
copy libc.so.4.3.3 over the top of libc.so.4 . . .

Perhaps I am harping on this point too much, since I have now
recovered from my mistake and I managed to sleep off the
incredible fit of anger I experienced when I discovered that I
had made it. I am simply recommending that the basic set of
Linux utilities have a few critical statically linked members
(like 'ln'), so that some common mistakes can be recovered from
more quickly and conveniently.