]> Pileus Git - ~andy/linux/commitdiff
SELinux: do not handle seclabel as a special flag
authorEric Paris <eparis@redhat.com>
Fri, 24 Aug 2012 19:59:21 +0000 (15:59 -0400)
committerEric Paris <eparis@redhat.com>
Thu, 25 Jul 2013 17:03:12 +0000 (13:03 -0400)
Instead of having special code around the 'non-mount' seclabel mount option
just handle it like the mount options.

Signed-off-by: Eric Paris <eparis@redhat.com>
security/selinux/hooks.c
security/selinux/include/security.h

index ca0a1c671f0ea466a0abcb85881ae9db5bdcf214..5596dc51e21ba22724a68e48629a0be98f7bdb1e 100644 (file)
@@ -474,9 +474,6 @@ static int selinux_get_mnt_opts(const struct super_block *sb,
                        opts->num_mnt_opts++;
                tmp >>= 1;
        }
-       /* Check if the Label support flag is set */
-       if (sbsec->flags & SBLABEL_MNT)
-               opts->num_mnt_opts++;
 
        opts->mnt_opts = kcalloc(opts->num_mnt_opts, sizeof(char *), GFP_ATOMIC);
        if (!opts->mnt_opts) {
index 20830be6b61f46ae0fef03c47bd92cd0d7d860f5..1a73fcd51d5635de72f190d02f6f1926f617ca28 100644 (file)
@@ -43,7 +43,7 @@
 #endif
 
 /* Mask for just the mount related flags */
-#define SE_MNTMASK     0x0f
+#define SE_MNTMASK     0x1f
 /* Super block security struct flags for mount options */
 /* BE CAREFUL, these need to be the low order bits for selinux_get_mnt_opts */
 #define CONTEXT_MNT    0x01