mirror of
https://github.com/systemd/systemd.git
synced 2025-03-19 22:50:17 +03:00
automount: refuse automounts for the root file system
This commit is contained in:
parent
4e67ddd6b3
commit
41e450596a
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user