home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / linux / 21131 < prev    next >
Encoding:
Text File  |  1992-12-21  |  2.3 KB  |  50 lines

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