Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0b4bdb35 authored by Eric Paris's avatar Eric Paris
Browse files

Revert "SELinux: do not handle seclabel as a special flag"



This reverts commit 308ab70c.

It breaks my FC6 test box.  /dev/pts is not mounted.  dmesg says

SELinux: mount invalid.  Same superblock, different security settings
for (dev devpts, type devpts)

Cc: Peter Hurley <peter@hurleysoftware.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarEric Paris <eparis@redhat.com>
parent 102aefdd
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -504,6 +504,9 @@ static int selinux_get_mnt_opts(const struct super_block *sb,
			opts->num_mnt_opts++;
			opts->num_mnt_opts++;
		tmp >>= 1;
		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);
	opts->mnt_opts = kcalloc(opts->num_mnt_opts, sizeof(char *), GFP_ATOMIC);
	if (!opts->mnt_opts) {
	if (!opts->mnt_opts) {
+1 −1
Original line number Original line Diff line number Diff line
@@ -43,7 +43,7 @@
#endif
#endif


/* Mask for just the mount related flags */
/* Mask for just the mount related flags */
#define SE_MNTMASK	0x1f
#define SE_MNTMASK	0x0f
/* Super block security struct flags for mount options */
/* Super block security struct flags for mount options */
/* BE CAREFUL, these need to be the low order bits for selinux_get_mnt_opts */
/* BE CAREFUL, these need to be the low order bits for selinux_get_mnt_opts */
#define CONTEXT_MNT	0x01
#define CONTEXT_MNT	0x01