From: Lennart Poettering Date: Fri, 21 May 2010 01:32:21 +0000 (+0200) Subject: mount: refuse mount units that have not been loaded from any source X-Git-Tag: v1~286 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=8cbef76075910864ed31879c9fb193c127adc20d;hp=9726b29e9811d12c0800a53f0a34dc26fe9b915c mount: refuse mount units that have not been loaded from any source --- diff --git a/src/mount.c b/src/mount.c index 921984c1c..3b1608060 100644 --- a/src/mount.c +++ b/src/mount.c @@ -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;