From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Cox Subject: Re: [RFC/PATCH] revoke/frevoke system calls V2 Date: Thu, 27 Jul 2006 19:34:22 +0100 Message-ID: <1154025262.13509.93.camel@localhost.localdomain> References: <20060727180634.GA28962@pasky.or.cz> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: Pekka J Enberg , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, akpm@osdl.org, viro@zeniv.linux.org.uk, tytso@mit.edu, tigran@veritas.com Return-path: Received: from outpipe-village-512-1.bc.nu ([81.2.110.250]:41600 "EHLO lxorguk.ukuu.org.uk") by vger.kernel.org with ESMTP id S1751919AbWG0SQG (ORCPT ); Thu, 27 Jul 2006 14:16:06 -0400 To: Petr Baudis In-Reply-To: <20060727180634.GA28962@pasky.or.cz> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Ar Iau, 2006-07-27 am 20:06 +0200, ysgrifennodd Petr Baudis: > Well, except that you can revoke the log file before the shadow file is > opened, at which point open() probably reuses the fd and the program > conveniently logs to /etc/shadow. revoke() kills *access* by that handle, it does not kill the fd. The BSD designers thought of that one. Instead you end up with a handle that reports -ENXIO (from memory) for I/O accesses, ioctl etc until you close it when it goes away as expected. Alan