Article View: comp.bugs.sys5
Article #525Re: Unlinking "."
From: davidsen
Date: Mon, 06 Apr 1987 15:52
Date: Mon, 06 Apr 1987 15:52
20 lines
1635 bytes
1635 bytes
In article <709@brl-sem.ARPA> ron@brl-sem.ARPA (Ron Natalie <ron>) writes:
>...
>rm/rmdir will not let you remove dot. It is not a good idea to that
>and they avoid this pitfall. But if you are root, and you bypass their
>protection by using the link/unlink system calls you can unlink the "."
>entries and link directories as well. This can make an unholy mess
>out of your filesystem.
Once upon a time I wrote a routine to do sort of a "symbolic link",
putting one directory in another such that directory C seemed to be a
subdirectory of both A nd B. Obviously the value of .. was not
consistant, but I avoided rewriting a large BSD application. Someone
later used this to link a directory in itself (I assume by stupidity
rather than malace). Then they tried to run a dump... You're right, it
DOES make a mess.
--
bill davidsen sixhub \
ihnp4!seismo!rochester!steinmetz -> crdos1!davidsen
chinet /
ARPA: davidsen%crdos1.uucp@ge-crd.ARPA (or davidsen@ge-crd.ARPA)
Technical Details
Message-ID:
<1395@steinmetz.steinmetz.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!lll-lcc!ptsfa!ihnp4!chinet!steinmetz!davidsenReferences:
<1059@cci632.UUCP> <709@brl-sem.ARPA>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!lll-lcc!ptsfa!ihnp4!chinet!steinmetz!davidsen From: davidsen@steinmetz.UUCP Newsgroups: comp.bugs.sys5 Subject: Re: Unlinking "." Message-ID: <1395@steinmetz.steinmetz.UUCP> Date: Mon, 6-Apr-87 10:52:10 EST Article-I.D.: steinmet.1395 Posted: Mon Apr 6 10:52:10 1987 Date-Received: Sat, 11-Apr-87 04:46:54 EST References: <1059@cci632.UUCP> <709@brl-sem.ARPA> Reply-To: davidsen@kbsvax.steinmetz.UUCP (William E. Davidsen Jr) Organization: General Electric CRD, Schenectady, NY Lines: 20 Keywords: unlink