From: Eamon Walsh <ewalsh@tycho.nsa.gov>
To: Ted X Toth <txtoth@gmail.com>
Cc: SELinux List <selinux@tycho.nsa.gov>
Subject: Re: X in MLS enforcing problem
Date: Wed, 11 Jun 2008 17:47:56 -0400 [thread overview]
Message-ID: <4850480C.1040406@tycho.nsa.gov> (raw)
In-Reply-To: <484FD7A5.5070806@gmail.com>
Ted X Toth wrote:
> If I were to do this I'd use either SetSelectionCreateContext or
> SetSelectionUseContext, could you explain the difference between them
> and which I should use?
>
>
SetSelectionCreateContext is for setting the context on the clipboard
_data_. This is how an SELinux-aware application could specify what
type of data the user has made available for pasting. The
"x_application_data" security class represents the "object" labeled by
this context, and the selection manager is responsible for checking
permission on it. The X server doesn't perform any checks on this
context. See earlier message [1].
SetSelectionUseContext is for setting the context of the selection
object itself. It was intended to be used by a selection manager that
supports polyinstantiation. It sets the context of the selection object
that the client wants to "use". So for example if there are three
PRIMARY selections labeled foo_t, bar_t, and baz_t the selection manager
can choose the one to operate on using SetSelectionUseContext.
In the non-polyinstantiated case, SetSelectionUseContext can be used to
override the value from x_contexts and set the label on the one object
that will be seen by everyone (which is what we want to do with
dbus_launch). This only works if the selection doesn't already exist
because there's currently no way to change the label on an existing object.
So in summary:
Clipboard data - x_application_data object class
SetSelectionCreateContext / GetSelectionDataContext
checked by selection manager
Clipboard object - x_selection object class
SetSelectionUseContext / GetSelectionContext
checked by X server
One more note: the clipboard data context currently defaults to the
selection's context (e.g. clipboard_xselection_t), but I think it might
be more logical to default it to the client program's context (user_t).
This would require a change to the X server.
[1] http://marc.info/?l=selinux&m=120701081703490&w=2
--
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.
next prev parent reply other threads:[~2008-06-11 21:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-09 21:30 X in MLS enforcing problem Xavier Toth
2008-06-09 21:49 ` Chad Hanson
2008-06-09 22:35 ` Xavier Toth
2008-06-10 0:03 ` Eamon Walsh
2008-06-10 14:12 ` Ted X Toth
2008-06-10 19:20 ` Ted X Toth
2008-06-11 13:48 ` Ted X Toth
2008-06-11 21:42 ` Xavier Toth
2008-06-11 21:59 ` Eamon Walsh
2008-06-11 22:06 ` Eamon Walsh
2008-06-12 18:24 ` Xavier Toth
2008-06-11 21:47 ` Eamon Walsh [this message]
2008-06-10 11:41 ` Stephen Smalley
2008-06-11 13:40 ` MLS constraint interfaces Ted X Toth
2008-06-11 18:01 ` Chad Hanson
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=4850480C.1040406@tycho.nsa.gov \
--to=ewalsh@tycho.nsa.gov \
--cc=selinux@tycho.nsa.gov \
--cc=txtoth@gmail.com \
/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.