Should take an FD to the executable
Should take an FD to the executable
Posted Aug 4, 2026 14:27 UTC (Tue) by chris_se (subscriber, #99706)In reply to: Should take an FD to the executable by bluca
Parent article: The beginning of a process-builder API
> > The path field is a pointer to a string containing the path to the executable that the new process should run
>
> This really should also take an FD to the executable...
>
> This really should also take an FD to the executable...
I tend to agree with this - but should that be restricted to only O_PATH fds referencing existing files on disk, or could one also consider e.g. a memfd (possibly requiring it to be sealed) where e.g. a JIT previously put the result of a run-time compilation? The latter could be quite useful in some circumstances (but also quite useful for hiding malware in non-obvious ways, so YMMV).
