All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eamon Walsh <ewalsh@tycho.nsa.gov>
To: Joe Nall <joe@nall.com>
Cc: SELinux List <selinux@tycho.nsa.gov>
Subject: Re: X in enforcing mode
Date: Mon, 30 Jun 2008 14:18:33 -0400	[thread overview]
Message-ID: <48692379.402@tycho.nsa.gov> (raw)
In-Reply-To: <5B8DD16C-FED5-45C9-8032-9760F2C165C9@nall.com>

Joe Nall wrote:
> In order to get firefox, evolution and xterm to run under twm with the  
> X object manager in enforcing/mls at a single level I had to add the  
> following user policy:
>
>          allow $1_t $1_rootwindow_t:x_drawable { get_property getattr  
> read override hide send destroy remove_child };
>          allow $1_t $1_xserver_t:x_resource write;
>
> Where $1 is user
>
> xinit was started by hand at init 3.
>
> Not being an X guy, I don't really understand what I just allowed.  
> Does this make sense?
>   

I can take a look at it if you send the original AVC's.  I'm assuming 
for the moment that twm is running in $1_t.

At first glance, everything seems normal, although the fact that 
something (hopefully the window manager) is requesting "destroy", 
"hide", and "override" on the root window is kind of odd.  "Read" 
permission should only be granted to the window manager, since it allows 
a screen-shot to be taken.  The x_resource object class is a generic 
fallback for any X object that doesn't have its own object class - I'd 
need to see the AVC to see what's going on there.

The other permissions are normal and safe to grant.  Briefly:

"get_property" allows the app to read properties on the root window.
"getattr" allows the app to query the size of the root window or other 
attributes.
"send" allows the app to send an event to the root window (this is done 
as part of some ICCCM conventions for communicating with the window 
manager).
"remove_child" allows the app to destroy its own windows when it's done.



-- 
Eamon Walsh <ewalsh@tycho.nsa.gov>
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:[~2008-06-30 18:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-29 18:14 X in enforcing mode Joe Nall
2008-06-30 18:18 ` Eamon Walsh [this message]

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=48692379.402@tycho.nsa.gov \
    --to=ewalsh@tycho.nsa.gov \
    --cc=joe@nall.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.