From: Lennart Poettering Date: Sat, 10 Jul 2010 00:41:25 +0000 (+0200) Subject: automount: refuse automounts for the root file system X-Git-Tag: v3~65 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41e450596adebf7f74e4a7e66c1d0466ea4e323c;p=systemd automount: refuse automounts for the root file system --- 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;