chiark / gitweb /
mount: block creation of mount units for API file systems
authorLennart Poettering <lennart@poettering.net>
Tue, 5 Apr 2011 21:39:21 +0000 (23:39 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 5 Apr 2011 21:39:21 +0000 (23:39 +0200)
TODO
src/mount.c

diff --git a/TODO b/TODO
index fe516c5ee74ec5c28ac80659f3eec8741ced2df3..e6c2ee56778f4318676c014c517728c0cab5d7c8 100644 (file)
--- a/TODO
+++ b/TODO
@@ -26,8 +26,6 @@ F15:
 
 * reload-or-try-restart man page blurb uses word "fail"
 
-* explicitly block creation of mount units for API file systems
-
 Features:
 
 * write blog stories about:
index 2d8542d9dfd330795feaf67bf5a5da470b52916a..49bfd079a61c6eeba4eff28de0453620a1b6467a 100644 (file)
@@ -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"))