From owner-freebsd-arch@FreeBSD.ORG Wed Oct 29 12:37:39 2008 Return-Path: Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE7591065670; Wed, 29 Oct 2008 12:37:39 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from falcon.cybervisiontech.com (falcon.cybervisiontech.com [217.20.163.9]) by mx1.freebsd.org (Postfix) with ESMTP id 92E858FC19; Wed, 29 Oct 2008 12:37:39 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from localhost (localhost [127.0.0.1]) by falcon.cybervisiontech.com (Postfix) with ESMTP id E5949744175; Wed, 29 Oct 2008 14:37:36 +0200 (EET) X-Virus-Scanned: Debian amavisd-new at falcon.cybervisiontech.com Received: from falcon.cybervisiontech.com ([127.0.0.1]) by localhost (falcon.cybervisiontech.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tWfdVxYu6Jao; Wed, 29 Oct 2008 14:37:36 +0200 (EET) Received: from [10.2.1.87] (gateway.cybervisiontech.com.ua [91.198.50.114]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by falcon.cybervisiontech.com (Postfix) with ESMTP id 34749744005; Wed, 29 Oct 2008 14:37:33 +0200 (EET) Message-ID: <4908590C.1030904@icyb.net.ua> Date: Wed, 29 Oct 2008 14:37:32 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.17 (X11/20080929) MIME-Version: 1.0 To: Edward Tomasz Napierala , freebsd-arch@FreeBSD.ORG References: <20081027193545.GA95872@pin.if.uz.zgora.pl> <20081028161855.GA45129@zim.MIT.EDU> In-Reply-To: <20081028161855.GA45129@zim.MIT.EDU> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Subject: Re: Directory rename semantics. X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Oct 2008 12:37:40 -0000 on 28/10/2008 18:18 David Schultz said the following: > On Mon, Oct 27, 2008, Edward Tomasz Napierala wrote: >> Let's say we have two directories, "A/" and "B/". We also have a >> file, "A/F". To remove that file, we need write access to "A/". >> To move that file to "B/", we need write access to both "A/" and >> "B/". Now, assume we have a directory, "A/D". To remove that >> directory, we need write access to "A/". To move that directory >> to "B/", we need write access to "A/", "B/", _and "A/D"_. >> >> I'd like to remove the last check (requirement to have write access >> to a directory we want to move somewhere else). Reason for this >> is that it doesn't seem very logical, and many systems - including >> SunOS, and our ZFS - behave differently. In other words, we have >> different semantics on UFS and ZFS. > > No comment on other operating systems or standards, but I wanted > to point out that there is some logic to FreeBSD's present behavior: > When you move A/D, you must be able to write to D, because you are > modifying D's ".." entry to point to B instead of A. > >>From a practical point of view, I think either behavior is fine, > but we should consider whether any security-critical applications > rely on the current behavior before changing it. Control this check by a sysctl under security.bsd? -- Andriy Gapon