From: Daniel J Walsh <dwalsh@redhat.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Vikram Ambrose <Vikram.Ambrose@windriver.com>,
SE Linux <selinux@tycho.nsa.gov>
Subject: Re: PAM security transitions
Date: Tue, 26 Aug 2008 11:08:23 -0400 [thread overview]
Message-ID: <48B41C67.4080609@redhat.com> (raw)
In-Reply-To: <1219664725.2721.4.camel@moss-spartans.epoch.ncsc.mil>
Stephen Smalley wrote:
> On Fri, 2008-08-22 at 16:29 -0400, Vikram Ambrose wrote:
>> I've been messing around with various modules and installations and I've
>> come across a strange PAM problem. Without any SELinux support in
>> pam.d/login, root's shell gets system_r:local_login_t
>
> Yes, we stopped patching login directly a long time ago, and thus use of
> pam_selinux is required to get login session contexts set properly.
>
>> But then using: pam_selinux.so close/open, root's shell gets
>> root:staff_r:system_chkpwd_t
>>
>> I have another installation with the same pam config, but it gets the
>> correct root:sysadm_r:sysadm_t context. This system uses a different policy.
>>
>> Trying to debug this. Any ideas why one of my boxes gets the wrong
>> domain after login?
>
> Based on your own description, it is presumably a bug in the policy on
> that system. pam_selinux should map the Linux user to a SELinux user
> via the seusers mapping, then ask the kernel for a list of reachable
> security contexts for that SELinux user from the calling context (e.g.
> system_u:system_r:local_login_t), then order that list based on the
> default_contexts file's entry for the calling context.
>
> libselinux/utils/getdefaultcon will let you exercise much the same
> logic, e.g.
> getdefaultcon vikram system_u:system_r:local_login_t
>
This often happens if /etc/selinux/POLICYTYPE/contexts/default_contexts
and /etc/selinux/POLICYTYPE/context/users/SELINUXUSER_U do not map to
any possible value.
The service will just choose the first context it can transition to
--
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.
prev parent reply other threads:[~2008-08-26 15:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-22 20:29 PAM security transitions Vikram Ambrose
2008-08-23 1:50 ` Russell Coker
2008-08-25 13:20 ` Vikram Ambrose
2008-08-25 11:45 ` Stephen Smalley
2008-08-26 15:08 ` Daniel J 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=48B41C67.4080609@redhat.com \
--to=dwalsh@redhat.com \
--cc=Vikram.Ambrose@windriver.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.