]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/unit.c
core: mount namespaces: Remove auxiliary bind mounts directory after unit termination
authorMichal Koutný <mkoutny@suse.com>
Wed, 18 Jan 2023 22:20:31 +0000 (23:20 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 19 Jan 2023 20:58:10 +0000 (21:58 +0100)
commitb9f976fb45635e09cd709dbedd0afb03d4b73c05
tree875222f711269e9a16f61ca95b7924f6584dd278
parent2f7fe6199c498ba95b473e7c933b2cc63e7a29a8
core: mount namespaces: Remove auxiliary bind mounts directory after unit termination

Unit that requires its own mount namespace creates a temporary directory
to implement dynamic bind mounts (org.freedesktop.systemd1.Manager.BindMountUnit).
However, this directory is never removed and they will accumulate for
each unique unit (e.g. templated units of systemd-coredump@).

Attach the auxiliary runtime directory existence to lifetime of other
"runtime" only per-unit directories.
src/core/execute.c
src/core/execute.h
src/core/unit.c