diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-04-05 23:39:21 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-04-05 23:39:21 +0200 |
commit | 33ff02c9fe84394c34c3a50c6dab85c1847a6fc7 (patch) | |
tree | 2f113b171e60cc800aa7d82eab6ecad1f06dcbcc /src/mount.c | |
parent | 33bd08a97a5bf64e0a1ac72190dc3a8e1231e7f2 (diff) |
mount: block creation of mount units for API file systems
Diffstat (limited to 'src/mount.c')
-rw-r--r-- | src/mount.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mount.c b/src/mount.c index 2d8542d9df..49bfd079a6 100644 --- a/src/mount.c +++ b/src/mount.c @@ -476,6 +476,11 @@ static int mount_verify(Mount *m) { return -EINVAL; } + if (mount_point_is_api(m->where) || mount_point_ignore(m->where)) { + log_error("Cannot create mount unit for API file system %s. Refusing.", m->where); + return -EINVAL; + } + if (m->meta.fragment_path && !m->parameters_fragment.what) { log_error("%s's What setting is missing. Refusing.", m->meta.id); return -EBADMSG; @@ -1300,9 +1305,7 @@ static int mount_add_one( /* Ignore API mount points. They should never be referenced in * dependencies ever. */ - if (mount_point_is_api(where)) - return 0; - if (mount_point_ignore(where)) + if (mount_point_is_api(where) || mount_point_ignore(where)) return 0; if (streq(fstype, "autofs")) |