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.
This commit is contained in:
committed by
Lennart Poettering
parent
2f7fe6199c
commit
b9f976fb45
@@ -5765,6 +5765,7 @@ void unit_destroy_runtime_data(Unit *u, const ExecContext *context) {
|
||||
exec_context_destroy_runtime_directory(context, u->manager->prefix[EXEC_DIRECTORY_RUNTIME]);
|
||||
|
||||
exec_context_destroy_credentials(context, u->manager->prefix[EXEC_DIRECTORY_RUNTIME], u->id);
|
||||
exec_context_destroy_mount_ns_dir(u);
|
||||
}
|
||||
|
||||
int unit_clean(Unit *u, ExecCleanMask mask) {
|
||||
|
||||
Reference in New Issue
Block a user