From: Stephen Smalley Date: Fri, 25 Mar 2011 14:13:43 +0000 (-0400) Subject: selinux: Fix regression for Xorg X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=85cd6da53a8073d3f4503f56e4ea6cddccbb1c7f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git selinux: Fix regression for Xorg Commit 6f5317e730505d5cbc851c435a2dfe3d5a21d343 introduced a bug in the handling of userspace object classes that is causing breakage for Xorg when XSELinux is enabled. Fix the bug by changing map_class() to return SECCLASS_NULL when the class cannot be mapped to a kernel object class. Reported-by: "Justin P. Mattock" Signed-off-by: Stephen Smalley Signed-off-by: James Morris --- diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index 3e7544d2a07b..ea7c01f4a2bf 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c @@ -213,7 +213,7 @@ static u16 map_class(u16 pol_value) return i; } - return pol_value; + return SECCLASS_NULL; } static void map_decision(u16 tclass, struct av_decision *avd,