contrib: memfd-bind: add helper for memfd-sealed-bind trick

This really isn't ideal but it can be used to avoid the largest issues
with the memfd-based runc binary protection. There are several caveats
with using this tool, see the help page for the new binary for details.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
This commit is contained in:
Aleksa Sarai
2023-07-11 22:20:48 +10:00
parent dac4171746
commit b9a4727f54
6 changed files with 330 additions and 8 deletions
@@ -0,0 +1,11 @@
[Unit]
Description=Manage memfd-bind of %I
Documentation=https://github.com/opencontainers/runc
[Service]
Type=simple
ExecStart=memfd-bind "%I"
ExecStop=memfd-bind --cleanup "%I"
[Install]
WantedBy=multi-user.target