Date: 27 Nov 1995 19:00:24 +0800 From: peter@haywire.dialix.com (Peter Wemm) To: freebsd-hackers@freebsd.org Subject: Re: How can I remove hard links between directories? Message-ID: <49c5o8$cjc$1@haywire.DIALix.COM> References: <199511270822.JAA03924@uriah.heep.sax.de>, <199511270945.BAA00128@corbin.Root.COM>
next in thread | previous in thread | raw e-mail | index | archive | help
davidg@Root.COM (David Greenman) writes: >>As A boy and his worm gear wrote: >>> >>> > Help! An apparently buggy version of afio that I was running has >>> > created some hard links between a couple of directories on my system >> >>David? Didn't we nuke the ability to hard-link directories some day >>in 1.1.5.1? Should we nuke this again? > I endured a significant amount of pain from all of the criticism of that >change. While I think it's bogus to allow hard directory links in FFS, some >other people disagree. ...but I think the other people are wrong, so yes, I >think we should "nuke" them again. :-) I personally think we should "nuke" all directory link/unlink ability and rename of "." or ".." ability within the kernel. Otherwise, we get bogons like netscape2 doing 'rename(".netscape/", ".netscape.bak");' or something bogus like that, and the namei() lookup is or was converting ".netscape/" to mean ".netscape/." and was pulling "." out of the .netscape directory in root's home (assuming somebody was insane enough to run netscape as root.. :-) or some bogon inside "rdistd" running as root, renaming the "." files if you gave it a bogus distfile.. or things like inn's fastrm program that have to test if the euid == 0, and if so, it has to stat() every single file it's processing to make sure it's not about to unlink a directory and running much slower from the extra overhead.. (side note, always expire news as uid "news" for this very reason). It's traditional unix behavior to support the old setuid mkdir executables doing a mknod to create a directory "node" and all the link/unlinks, and to support emulated rename() in really old binaries... ugh... We dont have binary compatability that far back to try and support... (thank god!) -Peter >-DG
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49c5o8$cjc$1>