mirror of
https://github.com/flatpak/flatpak.git
synced 2026-01-31 19:11:25 -05:00
In general libglnx has expanded a lot to have a good set of low-level wrappers for things like writing a buffer to a fd. Also, we should use `O_TMPFILE` if available - I think the code reduction speaks for itself here. Writing this patch as a result of looking at what fds flatpak injects. However, *really* we want to use sealed memfds. I'll likely copy the systemd wrappers for that into libglnx too. Also, it took me a while to figure out the reason the `--args` code worked before was because we were leaking the fd. (Updated by Alexander Larsson <alexl@redhat.com> to use O_TMPFILE in more places, like for the seccomp code, and rebased on some preparatory cleanups) Closes: #1060 Approved by: alexlarsson