mount: refuse mount units that have not been loaded from any source

This commit is contained in:
Lennart Poettering
2010-05-21 03:32:21 +02:00
parent 9726b29e98
commit 8cbef76075
+4 -1
View File
@@ -267,9 +267,12 @@ static int mount_verify(Mount *m) {
char *e;
assert(m);
if (UNIT(m)->meta.load_state != UNIT_LOADED)
if (m->meta.load_state != UNIT_LOADED)
return 0;
if (!m->from_etc_fstab && !m->from_fragment && !m->from_proc_self_mountinfo)
return -ENOENT;
if (!(e = unit_name_from_path(m->where, ".mount")))
return -ENOMEM;