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