Skip to content

Commit

Permalink
selinux: Fix regression for Xorg
Browse files Browse the repository at this point in the history
Commit 6f5317e 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" <justinmattock@gmail.com>
Signed-off-by:  Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
  • Loading branch information
stephensmalley authored and James Morris committed Mar 28, 2011
1 parent 036a982 commit 85cd6da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/selinux/ss/services.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 85cd6da

Please sign in to comment.