summaryrefslogtreecommitdiff
path: root/src/core/namespace.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-06-05 21:35:35 +0200
committerLennart Poettering <lennart@poettering.net>2014-06-05 21:35:35 +0200
commit6d313367d9ef780560e117e886502a99fa220eac (patch)
tree2439c5fa8369919c0617173606e560080be1c100 /src/core/namespace.c
parentc3544e8d2c2d870a2aff0944aff4ab7824b9ae6b (diff)
namespace: when setting up an inaccessible mount point, unmounting everything below
This has the benefit of not triggering any autofs mount points unnecessarily.
Diffstat (limited to 'src/core/namespace.c')
-rw-r--r--src/core/namespace.c6
1 files changed, 6 insertions, 0 deletions
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;