fexecve(2): call out a scenario where you want !O_EXEC
We note a reason why you might need it, but there's an equally important reason you may need to omit it: interpreted programs. Add a note accordingly, along with the workaround configuration if there's reason you can't help it. PR: 294780 Reviewed by: Jan Bramkamp <crest_freebsd_rlwinm.de>, kib Differential Revision: https://reviews.freebsd.org/D56704
This commit is contained in:
+12
-1
@@ -25,7 +25,7 @@
|
||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.Dd July 02, 2025
|
||||
.Dd April 29, 2026
|
||||
.Dt EXECVE 2
|
||||
.Os
|
||||
.Sh NAME
|
||||
@@ -232,6 +232,17 @@ is to use the
|
||||
.Dv O_EXEC
|
||||
flag when opening
|
||||
.Fa fd .
|
||||
Opening without
|
||||
.Dv O_EXEC
|
||||
may be necessary in the case of executing an interpreted program, as the
|
||||
interpreter will not be able to acquire a descriptor to the script for reading
|
||||
without mounting
|
||||
.Xr fdescfs 4
|
||||
on
|
||||
.Pa /dev/fd
|
||||
with the
|
||||
.Cm nodup
|
||||
option.
|
||||
Note that the file to be executed can not be open for writing.
|
||||
.Sh RETURN VALUES
|
||||
As the
|
||||
|
||||
Reference in New Issue
Block a user