Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!adm!oread::barbanis@CS-UMASS.arpa From: "oread::barbanis"@CS-UMASS.arpa Newsgroups: comp.unix.wizards Subject: Bug in Ultrix2.0? Message-ID: <10570@brl-adm.ARPA> Date: Sun, 29-Nov-87 02:22:23 EST Article-I.D.: brl-adm.10570 Posted: Sun Nov 29 02:22:23 1987 Date-Received: Tue, 1-Dec-87 03:55:22 EST Sender: news@brl-adm.ARPA Lines: 33 Subject: Bug in Ultrix 2.0 ? If you are a superuser and do unlink("foo"), it always unlinks, even if foo is a directory, and even if this directory is not empty. I wondered what happened to the directory contents, so I did some experimenting: $ mkdir foo $ cat > foo/bar ksadkjashdkjahdkaskjda ^D $ ls -l foo/bar (one link to foo/bar) $ ln foo/bar baz $ ls -l foo/bar baz (2 links to foo/bar and baz) $ run program that does unlink("foo") -- runs ok. $ ls -l foo baz (foo does not exist, but baz is reported as having *two* links to it) $ cat baz ksadkjashdkjahdkaskjda After this amazing feat of Ultrix prestidigitation, I tried the same on Sun (as root on the file server). Of course it exited with [EPERM], which is as it should be. And they say DEC software is dull... George Barbanis Computer & Information Science Univ. of Mass. -- Amherst barbanis@cs.umass.edu