chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4e67ddd
)
automount: refuse automounts for the root file system
author
Lennart Poettering
<lennart@poettering.net>
Sat, 10 Jul 2010 00:41:25 +0000
(
02:41
+0200)
committer
Lennart Poettering
<lennart@poettering.net>
Sat, 10 Jul 2010 00:41:25 +0000
(
02:41
+0200)
src/automount.c
patch
|
blob
|
history
diff --git
a/src/automount.c
b/src/automount.c
index b5003b3a756babf4a5f77979dd67662cbbf3ade2..26fec45107b35ad0e95aa9f0714a86b3ed11d79f 100644
(file)
--- 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;