From 8cbef76075910864ed31879c9fb193c127adc20d Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 21 May 2010 03:32:21 +0200 Subject: [PATCH] mount: refuse mount units that have not been loaded from any source --- src/mount.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; -- 2.39.5