Date: Wed, 10 Jun 2026 04:01:13 +0000 From: Kyle Evans <kevans@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: dc0cc22a8981 - stable/15 - fexecve(2): call out a scenario where you want !O_EXEC Message-ID: <6a28e189.27493.430f9de9@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/15 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=dc0cc22a898198a21bd58109351d2c2b2ec5410f commit dc0cc22a898198a21bd58109351d2c2b2ec5410f Author: Kyle Evans <kevans@FreeBSD.org> AuthorDate: 2026-05-01 03:02:55 +0000 Commit: Kyle Evans <kevans@FreeBSD.org> CommitDate: 2026-06-10 04:00:36 +0000 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 (cherry picked from commit 9c18d55a768a3e60ecaba1325e9a3e00a25dee26) --- lib/libsys/execve.2 | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/libsys/execve.2 b/lib/libsys/execve.2 index dc85b9321e48..5562e198239a 100644 --- a/lib/libsys/execve.2 +++ b/lib/libsys/execve.2 @@ -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 thehome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a28e189.27493.430f9de9>
