Date: Tue, 24 Dec 2002 09:42:46 -0500 (EST) From: Garrett Wollman <wollman@lcs.mit.edu> To: Poul-Henning Kamp <phk@FreeBSD.ORG> Cc: current@FreeBSD.ORG Subject: revoke(2) redux... Message-ID: <200212241442.gBOEgkU5034854@khavrinen.lcs.mit.edu> In-Reply-To: <30917.1040730025@critter.freebsd.dk> References: <30917.1040730025@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
<<On Tue, 24 Dec 2002 12:40:25 +0100, Poul-Henning Kamp <phk@FreeBSD.ORG> said: > Isn't there a pretty obvious race between the revoke() and the open() ? To the extent that the race matters, it is obviated by making sure that only the current user has permission to open the device. If the user somehow manages to open a device that he owns anyway, it's his problem if doing so screws it up. revoke() was a POSIX invention; it replaces the older vhangup(). The problem with vhangup() was that it merely signalled the previous openers -- if they had a SIGHUP handler installed, they did not actually lose access to the device. AIX has an extension such as you suggest (they call it frevoke()). AIX also implements it for all vnodes, not just device-specials, so it is somewhat more general-purpose. The POSIX function was introduced for only one reason: to provide a secure replacement for vhangup() in the POSIX tty model. Thus, it is not fully general. -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200212241442.gBOEgkU5034854>