xorg-x11-server/xserver-1.4.99-selinux-fix.patch
Jeremy Katz 0f5f540e9f * Thu Feb 28 2008 Jeremy Katz <katzj@redhat.com> - 1.4.99.1-0.26
- Pull in another SELinux fix from upstream
2008-02-28 21:53:32 +00:00

22 lines
848 B
Diff

From: Eamon Walsh <ewalsh@tycho.nsa.gov>
Date: Thu, 28 Feb 2008 03:29:15 +0000 (-0500)
Subject: xselinux: Don't throw BadAccess if DixUnknownAccess is passed in to a hook.
X-Git-Url: http://gitweb.freedesktop.org/?p=xorg/xserver.git;a=commitdiff;h=e40cc5305bec656108077ab13fcc8e6e82b3707a
xselinux: Don't throw BadAccess if DixUnknownAccess is passed in to a hook.
The avc will still appear, however, so that the callsite can be fixed.
---
--- a/Xext/xselinux.c
+++ b/Xext/xselinux.c
@@ -312,6 +312,8 @@ SELinuxDoCheck(SELinuxSubjectRec *subj,
if (avc_has_perm(subj->sid, obj->sid, class, mode, &subj->aeref,
auditdata) < 0) {
+ if (mode == DixUnknownAccess)
+ return Success; /* DixUnknownAccess requests OK ... for now */
if (errno == EACCES)
return BadAccess;
ErrorF("ServerPerm: unexpected error %d\n", errno);