From owner-freebsd-stable@FreeBSD.ORG Wed Sep 26 17:27:35 2007 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03BA416A417 for ; Wed, 26 Sep 2007 17:27:35 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.freebsd.org (Postfix) with ESMTP id D470E13C447 for ; Wed, 26 Sep 2007 17:27:34 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.1/8.14.1) id l8QHF4h0094166; Wed, 26 Sep 2007 12:15:04 -0500 (CDT) (envelope-from dan) Date: Wed, 26 Sep 2007 12:15:03 -0500 From: Dan Nelson To: Oliver Fromme Message-ID: <20070926171503.GC3062@dan.emsphone.com> References: <54db43990709251838q68bdba95iefefb43029761c34@mail.gmail.com> <200709261447.l8QElua3058752@lurza.secnetix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200709261447.l8QElua3058752@lurza.secnetix.de> X-OS: FreeBSD 7.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Cc: freebsd-stable@freebsd.org Subject: Re: rm(1) bug, possibly serious X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Sep 2007 17:27:35 -0000 In the last episode (Sep 26), Oliver Fromme said: > Bob Johnson wrote: > > Oliver Fromme wrote: > > > By the way, an additional confusion is that ".." and "../" > > > are handled differently. Specifying ".." always leads to > > > this message: > > > > > > rm: "." and ".." may not be removed > > > > > > and nothing is actually removed. It is confusing that adding a > > > slash leads to a different error message _and_ removal of the > > > contents of the parent directory. Clearly a POLA violation. > > > > Maybe. But I expect that the behavior for "rm -rf .." is there so > > that things don't get REALLY astonishing when you do "rm -rf *". > > The expansion of "*" does not include "." or "..". Under /bin/sh, ".*" does match "." and "..", so be careful :) -- Dan Nelson dnelson@allantgroup.com