From: Daniel J Walsh <dwalsh@redhat.com>
To: Ken YANG <spng.yang@gmail.com>
Cc: Stephen Smalley <sds@tycho.nsa.gov>,
"Christopher J. PeBenito" <cpebenito@tresys.com>,
SELinux List <selinux@tycho.nsa.gov>
Subject: Re: three problems about normal user login in strict policy
Date: Wed, 20 Jun 2007 06:37:47 -0400 [thread overview]
Message-ID: <4679037B.7090908@redhat.com> (raw)
In-Reply-To: <4678C6A4.4070306@gmail.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=gb18030; format=flowed, Size: 3571 bytes --]
Ken YANG wrote:
> Stephen Smalley wrote:
>
>> On Tue, 2007-06-19 at 15:57 +0800, Ken YANG wrote:
>>
>>> Christopher J. PeBenito wrote:
>>>
>>>> On Thu, 2007-06-07 at 09:54 -0400, Stephen Smalley wrote:
>>>>
>>>>> On Thu, 2007-06-07 at 13:47 +0000, Christopher J. PeBenito wrote:
>>>>>
>>>>>> On Thu, 2007-06-07 at 09:34 -0400, Stephen Smalley wrote:
>>>>>>
>>>>>>> On Thu, 2007-06-07 at 20:22 +0800, Ken YANG wrote:
>>>>>>>
>>>>>>>> i studied the point from walsh about non-root X login,
>>>>>>>> see details in following thread:
>>>>>>>>
>>>>>>>> http://marc.info/?l=selinux&m=118050940823692&w=2
>>>>>>>>
>>>>>>>> when i login with normal user(user_u), i have some questions:
>>>>>>>> (i'm in fc7 with strict-mcs policy at svn version 2301)
>>>>>>>>
>>>>>>>> 1
>>>>>>>> when i login as user_u, i find i can not switch to staff_u through su,
>>>>>>>> but i notice that there is corresponding line in "default_contexts" file:
>>>>>>>>
>>>>>>> The su / pam_selinux integration was reverted a while ago, so su no
>>>>>>> longer changes contexts at all, just like in the original SELinux.
>>>>>>> Thus, the SELinux user identity is once again stable for the entire
>>>>>>> session, and you have to use newrole to switch roles. And user_r isn't
>>>>>>> generally allowed to switch to staff_r; you need to map your Linux user
>>>>>>> identity to staff_u via semanage.
>>>>>>>
>>> sorry for reply so late, i just covered walsh's blog, and
>>> reviewed some points about selinux user, but i still had 2
>>> questions:
>>>
>>> now that su/pam_selinux will not change selinux user id,
>>> and user_r cannt switch to staff_r, what is the function
>>> of "user_r:user_su_t:s0 staff_r:staff_t:s0..." line in
>>> "default_context", and where is it used?
>>>
>> They are obsolete and can be removed, unless they are just being left
>> for compatibility in case someone wants to re-insert pam_selinux
>> into /etc/pam.d/su.
>>
>
> thanks, smalley and pebenito.
>
> BTW, as you know, i am not English-native, and know little about
> english culture, so i'm not sure is it appropriate to call your
> first name directly? if impolite, please correct me
>
>
First names are fine.
>
>>> another question is:
>>>
>>> i declared a user in policy:
>>>
>>> gen_user(ken, user, user_r, s0, s0)
>>>
>> Unnecessary - you should be mapping Linux usernames to SELinux users via
>> semanage login. The mapping is then stored
>> in /etc/selinux/$SELINUXTYPE/seusers. It is not necessary anymore to
>> add the Linux usernames to the kernel policy; you can just map them to
>> SELinux users already defined in the kernel policy, where those SELinux
>> users are generic ways of identifying authorized role sets.
>>
>
> i understand what you mean, originally, i want to validate my guess,
> but as you said, it is unnecessary. anyway, thanks
>
>
>>> "ken" is my linux login user, i think if login program find the
>>> same SELinux user and linux user identity, it will use the "ken"
>>> in the context for the initial shell process, but after i login
>>> through tty2, and execute "id -Z", i found my user in context
>>> was still user_u, i.e. user_u:user_r:user_t:s0.
>>>
>>> is there something i missing?
>>>
>> Yes, seusers.
>>
>>
>
>
--
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-20 10:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-07 12:22 three problems about normal user login in strict policy Ken YANG
2007-06-07 13:34 ` Stephen Smalley
2007-06-07 13:47 ` Christopher J. PeBenito
2007-06-07 13:54 ` Stephen Smalley
2007-06-07 18:48 ` Christopher J. PeBenito
2007-06-13 2:32 ` Ken YANG
2007-06-19 7:57 ` Ken YANG
2007-06-19 11:51 ` Stephen Smalley
2007-06-19 12:09 ` Christopher J. PeBenito
2007-06-20 6:18 ` Ken YANG
2007-06-20 10:37 ` Daniel J Walsh [this message]
2007-06-20 11:40 ` Ken YANG
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=4679037B.7090908@redhat.com \
--to=dwalsh@redhat.com \
--cc=cpebenito@tresys.com \
--cc=sds@tycho.nsa.gov \
--cc=selinux@tycho.nsa.gov \
--cc=spng.yang@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.