From: James Morris The patch below allows all types of filesystems to specify the fscreate mount option (which is used to specify the security context of the filesystem itself). This was previously only available for filesystems with full xattr security labeling, but is also potentially required for filesystems with e.g. psuedo xattr labeling such as devpts and tmpfs. An example of use is to specify at mount time the fs security context of a tmpfs filesystem, overriding the default specified in policy for that filesystem. This patch has been in the Fedora kernel for some weeks with no problems. Signed-off-by: James Morris Signed-off-by: Stephen Smalley Signed-off-by: Andrew Morton --- 25-akpm/security/selinux/hooks.c | 7 ------- 1 files changed, 7 deletions(-) diff -puN security/selinux/hooks.c~allow-all-filesystems-to-specify-fscreate-mount security/selinux/hooks.c --- 25/security/selinux/hooks.c~allow-all-filesystems-to-specify-fscreate-mount 2004-09-23 00:09:04.972198688 -0700 +++ 25-akpm/security/selinux/hooks.c 2004-09-23 00:09:04.978197776 -0700 @@ -387,13 +387,6 @@ static int try_context_mount(struct supe break; case Opt_fscontext: - if (sbsec->behavior != SECURITY_FS_USE_XATTR) { - rc = -EINVAL; - printk(KERN_WARNING "SELinux: " - "fscontext option is invalid for" - " this filesystem type\n"); - goto out_free; - } if (seen & (Opt_context|Opt_fscontext)) { rc = -EINVAL; printk(KERN_WARNING SEL_MOUNT_FAIL_MSG); _