All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel J Walsh <dwalsh@redhat.com>
To: Dennis Wronka <linuxweb@gmx.net>
Cc: "Remmolt G. Zwartsenberg" <remmolt@zwartsenberg.eu>,
	selinux@tycho.nsa.gov
Subject: Re: I cannot change my shell context
Date: Fri, 04 Sep 2009 09:02:32 -0400	[thread overview]
Message-ID: <4AA10FE8.7040109@redhat.com> (raw)
In-Reply-To: <200909032259.29605.linuxweb@gmx.net>

First off sysadm_r:sysadm_t is only used by people trying to run in a strict policy mode.   Most people use targeted and login as unconfined_t.  If your system has you logging in as something other then unconfined_t then you might have a bug in your configuration.

When using SELinux, you usually do not change your "context" manually.  You usually write transition rules.  A transition rules says something like, when unconfined_t domain executes a file labeled firefox_exec_t it will transition to firefox_t.

So the user does not need to do something like runcon -t firefox_t /usr/bin/firefox.

If you are using commands like runcon to change the context of applications, there are rules in policy that govern what labels you can transition to, and what roles you can change too.

If you are running as unconfined_r, and you try to run an app with a role of sysadm_r, this might get denied.

Finally only certain types can be assigned to a process, you are not allow to assign a file type to a process.  So something like 

rucon -t firefox_exec_t /usr/bin/firefox

Would be rejected since firefox_exec_t is a file type not a process type.


--
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:[~2009-09-04 13:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CIEOKAFOMGPNJIPMMMAHAEDJCCAA.remmolt@zwartsenberg.eu>
2009-09-03 14:59 ` I cannot change my shell context Dennis Wronka
2009-09-04 13:02   ` Daniel J Walsh [this message]
2009-09-02  3:07 zheyeung
2009-09-02 13:59 ` Dennis Wronka

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=4AA10FE8.7040109@redhat.com \
    --to=dwalsh@redhat.com \
    --cc=linuxweb@gmx.net \
    --cc=remmolt@zwartsenberg.eu \
    --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.