diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-07-10 02:41:25 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-07-10 02:41:25 +0200 |
commit | 41e450596adebf7f74e4a7e66c1d0466ea4e323c (patch) | |
tree | 4d90489159da025484dd0d631b614e501c298735 /src/automount.c | |
parent | 4e67ddd6b39c2847cc399ab0874427baa7ea8935 (diff) |
automount: refuse automounts for the root file system
Diffstat (limited to 'src/automount.c')
-rw-r--r-- | src/automount.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/automount.c b/src/automount.c index b5003b3a75..26fec45107 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; |