From owner-freebsd-hackers Sat Feb 3 12:46:58 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from gw.gbch.net (gw.gbch.net [203.24.22.66]) by hub.freebsd.org (Postfix) with SMTP id 43FF837B4EC for ; Sat, 3 Feb 2001 12:46:39 -0800 (PST) Received: (qmail 4444 invoked by uid 1001); 4 Feb 2001 06:46:32 +1000 X-Posted-By: GJB-Post 2.11 18-Jan-2001 X-Operating-System: FreeBSD 4.1-RELEASE i386 X-URL: http://www.gbch.net/gjb/ X-Image-URL: http://www.gbch.net/gjb/img/gjb-auug048.gif X-PGP-Fingerprint: 5A91 6942 8CEA 9DAB B95B C249 1CE1 493B 2B5A CE30 X-PGP-Public-Key: http://www.gbch.net/gjb/gjb-pgpkey.asc Message-Id: Date: Sun, 04 Feb 2001 06:46:32 +1000 From: Greg Black To: hackers@freebsd.org Subject: Trailing slashes and rmdir - POLA broken Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Observe the following: $ uname -rs FreeBSD 4.1-RELEASE $ ls -l $ mkdir foo $ ln -s foo bar $ rmdir bar rmdir: bar: Not a directory So far, so good -- but look at this: $ 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. 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? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message