aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2012-08-24 15:59:21 -0400
committerEric Paris <eparis@redhat.com>2013-07-25 13:03:12 -0400
commit308ab70c465d97cf7e3168961dfd365535de21a6 (patch)
tree36c14a71bf0dade0d63e6f9d32407364ccc29b8b
parentf936c6e502d3bc21b87c9830b3a24d1e07e6b6e1 (diff)
SELinux: do not handle seclabel as a special flag
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>
-rw-r--r--security/selinux/hooks.c3
-rw-r--r--security/selinux/include/security.h2
2 files changed, 1 insertions, 4 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index ca0a1c671f0e..5596dc51e21b 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -474,9 +474,6 @@ static int selinux_get_mnt_opts(const struct super_block *sb,
474 opts->num_mnt_opts++; 474 opts->num_mnt_opts++;
475 tmp >>= 1; 475 tmp >>= 1;
476 } 476 }
477 /* Check if the Label support flag is set */
478 if (sbsec->flags & SBLABEL_MNT)
479 opts->num_mnt_opts++;
480 477
481 opts->mnt_opts = kcalloc(opts->num_mnt_opts, sizeof(char *), GFP_ATOMIC); 478 opts->mnt_opts = kcalloc(opts->num_mnt_opts, sizeof(char *), GFP_ATOMIC);
482 if (!opts->mnt_opts) { 479 if (!opts->mnt_opts) {
diff --git a/security/selinux/include/security.h b/security/selinux/include/security.h
index 20830be6b61f..1a73fcd51d56 100644
--- a/security/selinux/include/security.h
+++ b/security/selinux/include/security.h
@@ -43,7 +43,7 @@
43#endif 43#endif
44 44
45/* Mask for just the mount related flags */ 45/* Mask for just the mount related flags */
46#define SE_MNTMASK 0x0f 46#define SE_MNTMASK 0x1f
47/* Super block security struct flags for mount options */ 47/* Super block security struct flags for mount options */
48/* BE CAREFUL, these need to be the low order bits for selinux_get_mnt_opts */ 48/* BE CAREFUL, these need to be the low order bits for selinux_get_mnt_opts */
49#define CONTEXT_MNT 0x01 49#define CONTEXT_MNT 0x01