From owner-freebsd-hackers Mon Jan 6 18:34:26 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 41E1037B401 for ; Mon, 6 Jan 2003 18:34:25 -0800 (PST) Received: from prioris.mini.pw.edu.pl (prioris.mini.pw.edu.pl [194.29.178.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id A0D3D43E4A for ; Mon, 6 Jan 2003 18:34:24 -0800 (PST) (envelope-from P.Dawidek@prioris.mini.pw.edu.pl) Received: from localhost (localhost.mini.pw.edu.pl [127.0.0.1]) by prioris.mini.pw.edu.pl (Postfix) with ESMTP id 119747D32C; Tue, 7 Jan 2003 03:34:23 +0100 (CET) Received: by prioris.mini.pw.edu.pl (Postfix, from userid 1091) id ADF8A7D32A; Tue, 7 Jan 2003 03:34:18 +0100 (CET) Date: Tue, 7 Jan 2003 03:34:18 +0100 From: Pawel Jakub Dawidek To: Julian Elischer Cc: freebsd-hackers@freebsd.org Subject: Re: Caching [sugestion]. Message-ID: <20030107023418.GH6825@prioris.mini.pw.edu.pl> References: <20030107003613.GG6825@prioris.mini.pw.edu.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i X-PGP-Key-URL: http://garage.freebsd.pl/jules.pgp X-OS: FreeBSD 4.7-STABLE i386 X-Virus-Scanned: by AMaViS (prioris) 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 On Mon, Jan 06, 2003 at 04:58:16PM -0800, Julian Elischer wrote: +> > We want to permit those operations: +> > - opening file /etc/master.passwd for read only, +> > - opening files that match to /tmp/temp.* for write, +> > - changing mode of files /tmp/temp.* to '0666', BUT via fchmod(2). +> > +> > How to do that correct? +> > There is no chance to do this in simple, clean way. +> +> you would have to attach a 'chmod capability' to the file descriptor +> when you open it.. in other words it would be pre-decided at open time. +> +> Even if you remembered what name was used when you openned it you would +> have no proof that it still had that name when you do the chmod. Right! But that's ok. Look at rules - I just nedd to know file name when file was opened. I was thinking to add to my ugly way catching rename(2) and changing cached file name, but this is really unnecessary. It's even better that file name isn't updated on rename(2). -- Pawel Jakub Dawidek UNIX Systems Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message