modules/programs: sane-sandboxed: invoke "capsh" with the --no-new-privs argument

This commit is contained in:
2024-02-16 05:48:50 +00:00
parent 00e4078300
commit 029ba43bd6

View File

@@ -422,7 +422,7 @@ landlockExec() {
_capsh="$(locate capsh @libcap@/bin/capsh)" _capsh="$(locate capsh @libcap@/bin/capsh)"
LL_FS_RO= LL_FS_RW="$landlockPaths" exec \ LL_FS_RO= LL_FS_RW="$landlockPaths" exec \
"$_sandboxer" \ "$_sandboxer" \
"$_capsh" "--caps=$capshCapsArg" --shell="/usr/bin/env" -- "${extraEnv[@]}" "${cliArgs[@]}" "$_capsh" "--caps=$capshCapsArg" --no-new-privs --shell="/usr/bin/env" -- "${extraEnv[@]}" "${cliArgs[@]}"
} }
@@ -461,7 +461,7 @@ capshonlyIngestCapability() {
capshonlyExec() { capshonlyExec() {
_capsh="$(locate capsh @libcap@/bin/capsh)" _capsh="$(locate capsh @libcap@/bin/capsh)"
exec \ exec \
"$_capsh" "--caps=$capshCapsArg" --shell="/usr/bin/env" -- "${extraEnv[@]}" "${cliArgs[@]}" "$_capsh" "--caps=$capshCapsArg" --no-new-privs --shell="/usr/bin/env" -- "${extraEnv[@]}" "${cliArgs[@]}"
} }