From 41e450596adebf7f74e4a7e66c1d0466ea4e323c Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 10 Jul 2010 02:41:25 +0200 Subject: [PATCH] automount: refuse automounts for the root file system --- src/automount.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/automount.c b/src/automount.c index b5003b3a..26fec451 100644 --- a/src/automount.c +++ b/src/automount.c @@ -154,6 +154,11 @@ static int automount_verify(Automount *a) { if (a->meta.load_state != UNIT_LOADED) return 0; + if (path_equal(a->where, "/")) { + log_error("Cannot have an automount unit for the root directory. Refusing."); + return -EINVAL; + } + if (!(e = unit_name_from_path(a->where, ".automount"))) return -ENOMEM; -- 2.39.5