All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Smalley <sds@tycho.nsa.gov>
To: "c.r.madhusudhanan@gmail.com" <c.r.madhusudhanan@gmail.com>
Cc: selinux@tycho.nsa.gov
Subject: Re: Regarding SELinux User mapping
Date: Fri, 27 May 2011 09:00:14 -0400	[thread overview]
Message-ID: <1306501214.1432.10.camel@moss-pluto> (raw)
In-Reply-To: <BANLkTikr=mJPfq5FJUkL9=s5e4Xn6+WMsw@mail.gmail.com>

On Fri, 2011-05-27 at 18:20 +0530, c.r.madhusudhanan@gmail.com wrote:
> I am trying to map Linux user to different SELinux user (user_u,
> guest_u, xguest_u), but when I login it shows only as
> system_u:system_r:local_login_t for all users.   I used semanage to
> map. 
> 
> # semange login -l
> 
> Login Name     SELinux User
> 
> __default__     user_u
> root                root
> system_u       system_u 
> 
> 
> I am using selinux enabled kernel in Meego 1.2 , built user space
> packages 
> from http://userspace.selinuxproject.org and using
> refpolicy-2.20101213.

Do you have pam_selinux in your pam configuration for login?  Fedora has
the following session modules in /etc/pam.d/login:

# pam_selinux.so close should be the first session rule
session    required     pam_selinux.so close
session    required     pam_loginuid.so
session    optional     pam_console.so
# pam_selinux.so open should only be followed by sessions to be executed
in the user context
session    required     pam_selinux.so open
session    required     pam_namespace.so
session    optional     pam_keyinit.so force revoke
session    include      system-auth

Note that they call pam_selinux twice in the stack, once with 'close'
and once with 'open', in order to distinguish what session modules
should run with the login program's context vs what session modules
should run with the user's context.

-- 
Stephen Smalley
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.

  reply	other threads:[~2011-05-27 13:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-27 12:50 Regarding SELinux User mapping c.r.madhusudhanan
2011-05-27 13:00 ` Stephen Smalley [this message]
2011-05-27 13:01 ` Dominick Grift
2011-05-27 13:30   ` c.r.madhusudhanan
2011-05-27 15:09     ` c.r.madhusudhanan
2011-05-27 22:45     ` Russell Coker

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=1306501214.1432.10.camel@moss-pluto \
    --to=sds@tycho.nsa.gov \
    --cc=c.r.madhusudhanan@gmail.com \
    --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.