#include <linux/sched.h>
#include <linux/mm.h>
#include <linux/smp_lock.h>
+#ifdef HAVE_SELINUX_IS_ENABLED
+#include <linux/selinux.h>
+#endif
#define DEBUG_SUBSYSTEM S_LLITE
!(sbi->ll_flags & LL_SBI_ACL))
return -EOPNOTSUPP;
+ if (xattr_type == XATTR_SECURITY_T && !selinux_is_enabled())
+ return -EOPNOTSUPP;
if (xattr_type == XATTR_USER_T && !(sbi->ll_flags & LL_SBI_USER_XATTR))
return -EOPNOTSUPP;
if (xattr_type == XATTR_TRUSTED_T && !cfs_capable(CFS_CAP_SYS_ADMIN))