From: Ted X Toth <txtoth@gmail.com>
To: Stephen Smalley <sds@tycho.nsa.gov>, selinux@tycho.nsa.gov
Subject: Re: launching apps at level (MLS) and polyinstantiation
Date: Mon, 30 Apr 2007 09:41:51 -0500 [thread overview]
Message-ID: <4636002F.5000100@gmail.com> (raw)
In-Reply-To: <1177934887.16232.7.camel@moss-spartans.epoch.ncsc.mil>
Stephen Smalley wrote:
> On Sat, 2007-04-28 at 09:56 -0500, Ted X Toth wrote:
>
>> Stephen Smalley wrote:
>>
>>> On Fri, 2007-04-27 at 15:01 -0400, Stephen Smalley wrote:
>>>
>>>
>>>> On Fri, 2007-04-27 at 13:41 -0500, Ted X Toth wrote:
>>>>
>>>>
>>>>> I'm working on an application that launches other applications at a
>>>>> specified level. I have also configured polyinstantiation for a some
>>>>> directories. What I have found is that I had to make this application
>>>>> pam aware in order for the child process to get polyinstantiated
>>>>> directories. One issue is the reauthentication I've already
>>>>> authenticated why should I have to reauthenticate so that a child
>>>>> process can use polyinstantiated directories? Currently this app works
>>>>> when run as root but not as other users because the unshare call in
>>>>> pam_namespace fails for lack of permissions (CAP_SYS_ADMIN?). What do I
>>>>> need to do so that the application has this capability? I tried making
>>>>> the app setuid but that didn't help.
>>>>>
>>>>>
>>>> First, your application sounds similar to newrole -l, so hopefully you
>>>> can draw from it.
>>>>
>>>>
>>> In fact, newrole -l <level> -- -c <app> will run an application in a
>>> given level.
>>>
>>>
>>>
>>>> What precisely requires your app to perform authentication? You control
>>>> your app's pam config, so you can define those modules as you see fit,
>>>> including using trivial ones like pam_permit.so. And you control
>>>> whether your app calls pam_authenticate(). Possibly you may need to set
>>>> up state to make pam_open_session() happy.
>>>>
>>>> newrole has the same issue wrt needing capabilities, so look to it as an
>>>> example - look at the NAMESPACE_PRIV code. It needs to be suid but also
>>>> needs to run in a domain that is allowed those capabilities.
>>>>
>>>>
>>>>
>> Would it be reasonable to extend newrole by adding a parameter for the
>> pam service name so that different authentication strategies could be
>> employed?
>>
>
> That would be dangerous - a user could then pick any pam service name he
> wants and run newrole with that, e.g. to bypass some aspect of the
> newrole pam stack.
>
> But you are certainly free to customize /etc/pam.d/newrole on your
> systems as you like.
>
We wouldn't want to change newroles pam configuration across the board like that we're looking to be able to reuse its capability in more flexible ways. You could limit which pam configurations that could be used by defining a policy attribute and only allowing newrole access to files with that attribute, right? Another idea is to have a configuration file that would map service names to applications being run under newrole.
--
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-04-30 14:41 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-27 18:41 launching apps at level (MLS) and polyinstantiation Ted X Toth
2007-04-27 19:01 ` Stephen Smalley
2007-04-27 19:05 ` Stephen Smalley
[not found] ` <463360B0.7020106@gmail.com>
[not found] ` <1177934887.16232.7.camel@moss-spartans.epoch.ncsc.mil>
2007-04-30 14:41 ` Ted X Toth [this message]
2007-04-30 14:52 ` Stephen Smalley
2007-05-02 15:49 ` Xavier Toth
2007-05-02 16:57 ` Stephen Smalley
2007-05-02 21:42 ` Xavier Toth
2007-05-03 12:35 ` Stephen Smalley
2007-05-03 13:11 ` Xavier Toth
2007-05-03 13:40 ` Stephen Smalley
2007-05-03 13:51 ` Xavier Toth
2007-05-03 13:49 ` Stephen Smalley
2007-05-03 19:18 ` Stephen Smalley
2007-05-03 21:09 ` Darrel Goeddel
2007-05-08 17:54 ` Stephen Smalley
2007-05-04 18:56 ` Ted X Toth
2007-05-04 19:23 ` Stephen Smalley
2007-05-04 20:15 ` Ted X Toth
2007-05-08 19:11 ` [PATCH -trunk] newrole: enable use of alternate pam configurations for running applications in a different context (Was: Re: launching apps at level (MLS) and polyinstantiation) Stephen Smalley
2007-05-08 19:54 ` Karl MacMillan
2007-05-11 18:42 ` Karl MacMillan
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=4636002F.5000100@gmail.com \
--to=txtoth@gmail.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.