This commit is contained in:
Alex David 2025-10-18 22:44:45 -07:00
commit 5c3e611da7

View file

@ -26,23 +26,25 @@ in
See BWRAP(1) for more information.
'';
impl = path: compose [
(helpers.pushState "seccompPermissions" (escape path))
(include-once "seccomp" (
defer (
state:
add-runtime ''
declare -a SECCOMP_FILTERS=(${toString (state.seccompPermissions)})
for FILTER in "''${SECCOMP_FILTERS[@]}"; do
if [[ -x "$FILTER" ]]; then
exec {FILTER_FD}< <("$FILTER")
else
exec {FILTER_FD}<"$FILTER"
fi
RUNTIME_ARGS+=(--add-seccomp-fd "$FILTER_FD")
done
'' state
)
))
];
impl =
path:
compose [
(helpers.pushState "seccompPermissions" (escape path))
(include-once "seccomp" (
defer (
state:
add-runtime ''
declare -a SECCOMP_FILTERS=(${toString (state.seccompPermissions)})
for FILTER in "''${SECCOMP_FILTERS[@]}"; do
if [[ -x "$FILTER" ]]; then
exec {FILTER_FD}< <("$FILTER")
else
exec {FILTER_FD}<"$FILTER"
fi
RUNTIME_ARGS+=(--add-seccomp-fd "$FILTER_FD")
done
'' state
)
))
];
}