From owner-freebsd-hackers Sat Feb 3 13: 2:24 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from guild.plethora.net (guild.plethora.net [205.166.146.8]) by hub.freebsd.org (Postfix) with ESMTP id F1FCA37B491 for ; Sat, 3 Feb 2001 13:02:04 -0800 (PST) Received: from guild.plethora.net (seebs@localhost.plethora.net [127.0.0.1]) by guild.plethora.net (8.10.1/8.10.1) with ESMTP id f13L23P01850 for ; Sat, 3 Feb 2001 15:02:04 -0600 (CST) Message-Id: <200102032102.f13L23P01850@guild.plethora.net> From: seebs@plethora.net (Peter Seebach) Reply-To: seebs@plethora.net (Peter Seebach) To: hackers@freebsd.org Subject: Re: Trailing slashes and rmdir - POLA broken In-reply-to: Your message of "Sun, 04 Feb 2001 06:46:32 +1000." Date: Sat, 03 Feb 2001 15:02:03 -0600 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message , Greg Black writes: > $ rmdir bar/ > $ ls -l > total 0 > lrwxrwx--- 1 gjb wheel 3 Feb 4 06:35 bar -> foo > $ >Oops, "rmdir bar/" ended up as "rmdir foo" and left the useless >symlink bar in place. Yup. >BSD/OS gives that silly "Is a directory" error message for the >"rmdir bar/" case, but at least it does not actually do anything. >I don't think FreeBSD should do what it does. Is there any good >reason to preserve this behaviour? History. In earlier BSD, 'foo/' meant the same thing as 'foo/""', that is to say, "foo/.". ("" => ".", sometimes). So, "bar/" implies a dereferencing of the link. I believe the silly "Is a directory" message will go away, but I don't think we will end up following the link in that case, although it's still being debated. -s To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message