Skip to content

Commit

Permalink
SELinux: do not handle seclabel as a special flag
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Paris committed Jul 25, 2013
1 parent f936c6e commit 308ab70
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions security/selinux/hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion security/selinux/include/security.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 308ab70

Please sign in to comment.