Commit 41e45059 authored by Lennart Poettering's avatar Lennart Poettering
Browse files

automount: refuse automounts for the root file system

parent 4e67ddd6
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment