chiark / gitweb /
mount-setup: fix counting of early mounts without SMACK
authorLennart Poettering <lennart@poettering.net>
Wed, 13 Aug 2014 18:01:19 +0000 (20:01 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 13 Aug 2014 18:01:21 +0000 (20:01 +0200)
http://lists.freedesktop.org/archives/systemd-devel/2014-August/021772.html

src/core/mount-setup.c

index 206f89a30f189b40a0272892a026d443403abe3c..cc2633e3bd2c02d1e09a2dd9a2628b830d536f39 100644 (file)
@@ -63,8 +63,13 @@ typedef struct MountPoint {
 
 /* The first three entries we might need before SELinux is up. The
  * fourth (securityfs) is needed by IMA to load a custom policy. The
- * other ones we can delay until SELinux and IMA are loaded. */
+ * other ones we can delay until SELinux and IMA are loaded. When
+ * SMACK is enabled we need smackfs, too, so it's a fifth one. */
+#ifdef HAVE_SMACK
 #define N_EARLY_MOUNT 5
+#else
+#define N_EARLY_MOUNT 4
+#endif
 
 static const MountPoint mount_table[] = {
         { "sysfs",      "/sys",                      "sysfs",      NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV,