aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorJames Morris <jmorris@redhat.com>2004-10-18 18:17:18 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-10-18 18:17:18 -0700
commitd99520c3eb23dcbf0cc39302ee499f140d45e057 (patch)
tree0c8ed540c1688e819e24bdd84300815ec452a1a0 /security
parentdfca7b2165ab74442b0a0e2058d268615d61d4d4 (diff)
downloadhistory-d99520c3eb23dcbf0cc39302ee499f140d45e057.tar.gz
[PATCH] SELinux: allow all filesystems to specify fscreate mount option
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 <jmorris@redhat.com> Signed-off-by: Stephen Smalley <sds@epoch.ncsc.mil> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'security')
-rw-r--r--security/selinux/hooks.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index bd931774882324..40b6911892d4c3 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -387,13 +387,6 @@ static int try_context_mount(struct super_block *sb, void *data)
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);