From: Dietmar Braun (dietmar@techfak.uni-bielefeld.de)
Date: 04/14/93


From: dietmar@techfak.uni-bielefeld.de (Dietmar Braun)
Subject: Re: The dangers of playing with shared libraries
Date: Wed, 14 Apr 1993 09:26:22 GMT

In article <STEVEV.93Apr14005153@miser.uoregon.edu>, stevev@miser.uoregon.edu (Steve VanDevender) writes:
|> 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.
|>

I suggest to have a bootdisk/rootdisk handy and _sync_ as statically linked
binary. I think it's better to maintain a good list of utilities / files
on a root disk then to discuss some static linking. The reason
is that static linking doesn't help anyway if you make typing errors
and delete something valuable.

Some old Unix hackers might use 'echo *' instead of ls. But I would not
get such an idea. This is the reason, because I tell everybody to
use a good bootdisk, where you find everything you need.

I've made a recovery disk as a rootdisk for my 5.25 '' drive. It contains
no kernel and I could put _everything_ on this disk I need to
install linux. (tar, gzip, rdev, ln, mkdir, dd, beav ...)
And there is enough place left for zcat, less and faq.z :-)

|> 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.
|>
|> --
|> Steve VanDevender stevev@greylady.uoregon.edu
|> "Bipedalism--an unrecognized disease affecting over 99% of the population.
|> Symptoms include lack of traffic sense, slow rate of travel, and the
|> classic, easily recognized behavior known as walking."

=====
Dietmar Braun; University of Bielefeld
                             (finger dietmar@techfac.techfak.uni-bielefeld.de)