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: 0.git+20100605+dfd8ee-1~11^2^2~30 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8cbef76075910864ed31879c9fb193c127adc20d;p=systemd mount: refuse mount units that have not been loaded from any source --- diff --git a/src/mount.c b/src/mount.c index 921984c1..3b160806 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;