Subject: Re: kern/1043: unlink(2) should not let superuser remove directories
To: None <netbsd-bugs@NetBSD.ORG>
From: Rob Windsor <windsor@punk.weru.ksu.edu>
List: netbsd-bugs
Date: 05/11/1995 23:44:19
Verily did John Kohl write:

> I know it's historical practice. (I probably should have stated that;
> other folks have pointed it out in private mail).

> In my 10 years of using UNIX or UNIX-like systems, every time root has
> unlinked a directory it has been accidental or inadvertent, and resulted
> in much gnashing of teeth and pulling of hair.  I have _never_ had
> occasion to intentionally unlink a directory with unlink(2).

Oddly enough, exactly two weeks ago, I had to unlink a directory to
get a partition limping along enough to get the system to boot multi-user
so that I could pull backup-tape data in from another machine.

It wasn't NetBSD, and it wasn't a software or OS problem.  The drive on
our 386i (the NIS server even) that contains /,  /var, and /usr blew the
partition that contained /var and half of /usr (yeah, lovely SunOS 4.0.2
symlink hell in /usr).  To make it fun, we back everything up on the
Solaris machine with the exabyte drive, therefore I had to get the 386i
up enough to be able to retrieve data from the other machine.

Yeah, yeah.. there's a -lot- of "you could do this", or "you could do that"
involved here, but the fastest way was to unlink chunked directories and
boot multi-user.

obtw, when is NetBSD going to be ported to the Sun 386i?  :>

If my employer wasn't U.S. Dept of Ag, we could probably just -donate-
a machine or two, but the US Gov't has interesting policies wrt old
hardware about what to do before you "throw it away" (which is the same
thing on paper as donating/giving them out).

-- Rob
----------------------------------------
Internet: windsor@pobox.com      Life: Rob@Manhattan.Kansas.USA.Earth

"Life's a journey, not a destination."  -- Aerosmith (1993), 'Amazing'