namespace: allow ProcSubset=pid with some ProtectKernel options
authorTopi Miettinen <toiwoton@gmail.com>
Sat, 27 Nov 2021 10:51:39 +0000 (12:51 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Sat, 27 Nov 2021 17:36:51 +0000 (17:36 +0000)
commit788e720181aead8c85ba30fc7ec9a1455a865cbe
treed3a0aec234981967e6f11045f8f53f3a2cd32ffb
parentcab35e96729736e5c229a1641eab84f3a2fdafaf
namespace: allow ProcSubset=pid with some ProtectKernel options

In case `/proc` is successfully mounted with pid tree subset only due to
`ProcSubset=pid`, the protective mounts for `ProtectKernelTunables=yes` and
`ProtectKernelLogs=yes` to non-pid `/proc` paths are failing because the paths
don't exist. But the pid only option may have failed gracefully (for example
because of ancient kernel), so let's try the mounts but it's not fatal if they
don't succeed.
src/core/namespace.c