From 6d313367d9ef780560e117e886502a99fa220eac Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 5 Jun 2014 21:35:35 +0200 Subject: namespace: when setting up an inaccessible mount point, unmounting everything below This has the benefit of not triggering any autofs mount points unnecessarily. --- src/core/namespace.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/core/namespace.c') diff --git a/src/core/namespace.c b/src/core/namespace.c index b6deab7081..fcbfd87d47 100644 --- a/src/core/namespace.c +++ b/src/core/namespace.c @@ -284,6 +284,12 @@ static int apply_mount( return mount_dev(m); case INACCESSIBLE: + + /* First, get rid of everything that is below if there + * is anything... Then, overmount it with an + * inaccessible directory. */ + umount_recursive(m->path, 0); + what = "/run/systemd/inaccessible"; break; -- cgit v1.2.3-54-g00ecf