Date: Mon, 31 Mar 2008 19:05:31 +0300 From: Kostik Belousov <kostikbel@gmail.com> To: Ivan Voras <ivoras@freebsd.org> Cc: freebsd-hackers@freebsd.org Subject: Re: Purpose of O_EXEC? Message-ID: <20080331160531.GL21209@deviant.kiev.zoral.com.ua> In-Reply-To: <fsr1su$q8n$1@ger.gmane.org> References: <fsr1su$q8n$1@ger.gmane.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--bX/mw5riLlTkt+Gv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Mar 31, 2008 at 06:01:48PM +0200, Ivan Voras wrote: > Hi, > What is the purpose of O_EXEC ("open file for execution") flag to > open(2)? Just a hint to the VM system on how to cache the file pages or > is there something else that makes it different from O_RDONLY? No, this is the only way to open file that has, for instance, mode 0111. You can get the filedescriptor pointing to this file, that is useful for the fexecve(2). Note that fexecve(2) ignores the open mode of the filedescriptor and checks the vnode access right for the exec. --bX/mw5riLlTkt+Gv Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (FreeBSD) iEYEARECAAYFAkfxC8sACgkQC3+MBN1Mb4i21gCcDWNhEpRo3Sq9M1LL22YmIeMO 2DEAn3BKi7WDfWo6agJbOJK/ggqlc32k =AF8k -----END PGP SIGNATURE----- --bX/mw5riLlTkt+Gv--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080331160531.GL21209>