From owner-freebsd-hackers Mon Jan 6 15:58:38 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 03E4B37B405 for ; Mon, 6 Jan 2003 15:58:37 -0800 (PST) Received: from puffin.mail.pas.earthlink.net (puffin.mail.pas.earthlink.net [207.217.120.139]) by mx1.FreeBSD.org (Postfix) with ESMTP id 76B9043EDC for ; Mon, 6 Jan 2003 15:58:36 -0800 (PST) (envelope-from tlambert2@mindspring.com) Received: from pool0412.cvx40-bradley.dialup.earthlink.net ([216.244.43.157] helo=mindspring.com) by puffin.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 18Vh8a-0006Uw-00; Mon, 06 Jan 2003 15:58:32 -0800 Message-ID: <3E1A17D9.48F7CFF1@mindspring.com> Date: Mon, 06 Jan 2003 15:57:13 -0800 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Pawel Jakub Dawidek Cc: David Schultz , freebsd-hackers@freebsd.org Subject: Re: Caching [sugestion]. References: <20030105215024.GB99855@prioris.mini.pw.edu.pl> <3E18B97A.32ABAE7@mindspring.com> <20030106074005.GB6825@prioris.mini.pw.edu.pl> <20030106163723.GA721@HAL9000.homeunix.com> <20030106233427.GC6825@prioris.mini.pw.edu.pl> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a41558361fd16675f5c9987d872ea634f4a2d4e88014a4647c350badd9bab72f9c350badd9bab72f9c Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Pawel Jakub Dawidek wrote: > Not always is chance to operate only on vnodes. When You (for example) > want to denied mode changes for some file, You can do this through catching > chmod(2), but when someone open this file how You get file name when You want > create policy rules for fchmod(2)? Remember that files could have temporary > names, so You can't compare vnode from file descriptor with some file that > You're expecting. In fact, that is the *only* thing you can compare, because that's the key value in the name cache, and that's the last point at which there's a 1:1 relationship between on disk and in core structures; above that, hard links cause your references to be ambiguous. The policies you want to implement are impossible to enforce for something like fchmod(2), unless you enforce against hard links, or change the object relationship in the kernel so that hard links do not result in ambiguities. See other posting, for details. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message