home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.linux
- Path: sparky!uunet!munnari.oz.au!metro!extro.ucc.su.OZ.AU!shanea
- From: shanea@extro.ucc.su.OZ.AU (Shane Alderton)
- Subject: Re: PATCH: (0.98.6) allow root to link/unlink directories
- Message-ID: <shanea.724812259@extro.ucc.su.OZ.AU>
- Keywords: kernel,patch,0.98.6,fs,link,unlink,root,directory,namei,standard,fix
- Sender: news@ucc.su.OZ.AU
- Nntp-Posting-Host: extro.ucc.su.oz.au
- Organization: Sydney University Computing Service, Sydney, NSW, Australia
- References: <1992Dec14.213538.15934@tc.cornell.edu> <1992Dec14.224916.21859@klaava.Helsinki.FI>
- Date: Sun, 20 Dec 1992 00:44:19 GMT
- Lines: 36
-
- torvalds@klaava.Helsinki.FI (Linus Torvalds) writes:
-
- >I just wanted to say that while the patch may work (I didn't look at it
- >closer, but it should be simple enough), this is a feature that the
- >current kernel forbids for a very good reason: linking/unlinking
- >directories is generally a very bad idea, even if it's restricted to
- >root. It's available in some unixes due to the way they implement
- >moving of directories, but it's unsafe. All versions of linux have
- >explicitly checked for directories, and not allowed links/unlinks to
- >them.
-
- >Is there anybody out there that actually needs this? I'm just warning
- >you that this patch won't get into the standard kernel unless somebody
- >can come up with a truly good reason for it (I doubt there is any).
-
- Well, I don't know whether or not you would consider it a good reason,
- but it is something I have needed to do in the past when file system
- corruption caused a directory with an entry that I couldn't delete and
- that the efsck of the time could not handle. This of course meant that
- I could not rmdir the directory in question, as it appeared to contain
- a file. Perhaps being able to unlink the directory would have solved
- the problem, albeit in a messy fashion.
-
- I agree that it is a very dangerous thing to do, but one of the things
- I like about Unix in general is its power and the small number of
- assumptions it makes. GNU's rm does protect you from accidentally
- unlinking a directory - and even if I could not think of a reason for
- being able to do this, that just means that my imagination is limited,
- not that it could never be necessary.
-
- Incidentally, I will add my voice to all those others who have said:
- THANK YOU! for the best thing to hit PCs - Linux.
-
- Regards,
- Shane Alderton
- shanea@extro.ucc.su.oz.au
-