All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Smalley <sds@tycho.nsa.gov>
To: Eric Paris <eparis@parisplace.org>, James Morris <jmorris@namei.org>
Cc: qingtao.cao@windriver.com,
	"Justin P. Mattock" <justinmattock@gmail.com>,
	selinux@tycho.nsa.gov
Subject: [PATCH] selinux: Fix regression for Xorg
Date: Fri, 25 Mar 2011 10:13:43 -0400	[thread overview]
Message-ID: <1301062423.22099.19.camel@moss-pluto> (raw)
In-Reply-To: <1301056481.22099.8.camel@moss-pluto>

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" <justinmattock@gmail.com>
Signed-off-by:  Stephen Smalley <sds@tycho.nsa.gov>

---

 security/selinux/ss/services.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c
index 3e7544d..ea7c01f 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,

-- 
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

  reply	other threads:[~2011-03-25 14:13 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-21 16:52 SELinux: avc_has_perm: unexpected error 22 Justin P. Mattock
2011-03-21 16:52 ` [refpolicy] " Justin P. Mattock
2011-03-23 18:07 ` Justin P. Mattock
2011-03-23 18:07   ` [refpolicy] " Justin P. Mattock
2011-03-24  2:30   ` Justin P. Mattock
2011-03-24  2:30     ` [refpolicy] " Justin P. Mattock
2011-03-24 13:58     ` Stephen Smalley
2011-03-24 13:58       ` [refpolicy] " Stephen Smalley
2011-03-24 16:26       ` Justin P. Mattock
2011-03-24 16:26         ` [refpolicy] " Justin P. Mattock
2011-03-24 20:13         ` Stephen Smalley
2011-03-24 20:22           ` Justin P. Mattock
2011-03-24 20:24             ` Stephen Smalley
2011-03-24 20:43               ` Justin P. Mattock
2011-03-25  3:18                 ` Harry Ciao
2011-03-25 12:26                   ` Stephen Smalley
2011-03-25 12:34                     ` Stephen Smalley
2011-03-25 14:13                       ` Stephen Smalley [this message]
2011-03-25 18:04                         ` [PATCH] selinux: Fix regression for Xorg Justin P. Mattock
2011-03-26  3:03                         ` Justin P. Mattock
2011-03-28 12:42                           ` Stephen Smalley
2011-03-28 14:24                             ` Stephen Smalley
2011-03-28 16:20                               ` Justin P. Mattock
2011-03-28 22:28                               ` Justin P. Mattock

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1301062423.22099.19.camel@moss-pluto \
    --to=sds@tycho.nsa.gov \
    --cc=eparis@parisplace.org \
    --cc=jmorris@namei.org \
    --cc=justinmattock@gmail.com \
    --cc=qingtao.cao@windriver.com \
    --cc=selinux@tycho.nsa.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.