From: Ken YANG <spng.yang@gmail.com>
To: Hasan Rezaul-CHR010 <CHR010@motorola.com>
Cc: Stephen Smalley <sds@tycho.nsa.gov>, selinux@tycho.nsa.gov
Subject: Re: Linux user / SELinux user changes...
Date: Fri, 22 Jun 2007 10:55:30 +0800 [thread overview]
Message-ID: <467B3A22.4080602@gmail.com> (raw)
In-Reply-To: <D06FE0A2807BC145B0D38744789D4F5D03ABC378@de01exm68.ds.mot.com>
Hasan Rezaul-CHR010 wrote:
>
> Hi All,
>
> If I have Linux users "root" and "test" and I have
> SELinux users "staff_u", and "user_u", and
> SELinux roles "staff_r", and "user_r"
>
> If I ssh into the Linux machine as test, my SELinux identity is user_u.
> If I ssh into the Linux machine as root, my SELinux identity is staff_u.
>
> Lets say I ssh into my Linux machine as Linux user "root".
> "id -Z" shows staff_u:staff_r:staff_t
>
> Now if I downgrade my Linux user priviledge to user "test" by using su
> as follows:
>
> su - test
> Pass: test
>
> id -Z => still shows me that I am staff_u , even though I am Linux
> user "test" (Linux user test should ideally be mapped to user_u).
>
> Is there a way for SELinux to automatically adjust/change the SELinux
> user, whenever the Linux user is changed via "su" ???
in original selinux, su can change context, including selinux user,
but now, su can not change selinux user at all, su/pam_selinux
had been reverted for a while. if you want to switch to admin role,
you must use "newrole"
furthermore, user_r can not switch to staff_r, you must map your
linux user identity to staff_u via semanage, before you switch to
admin role. the difference between staff_u and user_u is the former
can switch to admin role, i.e. sysadm_r(root)
http://marc.info/?l=selinux&m=118121922201142&w=2
this thread maybe help you
>
> Thanks in advance,
>
> - Rezaul.
>
> P.S. I can appreciate why first logging in as Linux user test, and then
> su to root, will still keep my SELinux user to user_u. But just curious
> if there is any flexibility in this regard ?
>
>
> --
> 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.
>
--
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:[~2007-06-22 2:57 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-15 14:28 [RFC v2][PATCH] selinux: enable authoritative granting of capabilities Stephen Smalley
2007-06-15 14:42 ` [RFC v2][PATCH] refpolicy: add memprotect and cap_override definitions and interfaces Stephen Smalley
2007-06-19 12:56 ` Christopher J. PeBenito
2007-06-15 15:14 ` [RFC v2][PATCH] selinux: enable authoritative granting of capabilities Casey Schaufler
2007-06-15 15:27 ` Stephen Smalley
2007-06-15 16:05 ` Casey Schaufler
2007-06-15 16:24 ` Karl MacMillan
2007-06-15 19:36 ` Stephen Smalley
2007-06-15 20:50 ` Casey Schaufler
2007-06-18 13:03 ` Stephen Smalley
2007-06-18 15:32 ` Casey Schaufler
2007-06-18 17:03 ` Stephen Smalley
2007-06-21 20:41 ` Casey Schaufler
2007-06-20 18:56 ` Stephen Smalley
2007-06-20 20:13 ` Serge E. Hallyn
2007-06-20 20:52 ` Stephen Smalley
2007-06-20 21:08 ` Serge E. Hallyn
2007-06-21 12:24 ` Stephen Smalley
2007-06-22 1:29 ` Linux user / SELinux user changes Hasan Rezaul-CHR010
2007-06-22 2:55 ` Ken YANG [this message]
2007-06-22 11:36 ` Stephen Smalley
2007-06-20 22:33 ` [RFC v2][PATCH] selinux: enable authoritative granting of capabilities Joshua Brindle
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=467B3A22.4080602@gmail.com \
--to=spng.yang@gmail.com \
--cc=CHR010@motorola.com \
--cc=sds@tycho.nsa.gov \
--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.