All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karl MacMillan <kmacmillan@mentalrootkit.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Joshua Brindle <jbrindle@tresys.com>,
	Todd Miller <tmiller@tresys.com>,
	selinux@tycho.nsa.gov
Subject: RE: [patch 0/4] libsemanage: genhomedircon replacement
Date: Wed, 15 Aug 2007 15:16:18 -0400	[thread overview]
Message-ID: <1187205378.2838.12.camel@localhost.localdomain> (raw)
In-Reply-To: <1187198560.20485.45.camel@moss-spartans.epoch.ncsc.mil>

On Wed, 2007-08-15 at 13:22 -0400, Stephen Smalley wrote:
> On Wed, 2007-08-15 at 11:57 -0400, Joshua Brindle wrote:
> > Karl MacMillan wrote:
[...]
> > > Perhaps it would be better to set it explicitly rather than
> > > based on the user. Either by giving people a way to set MLS
> > > file contexts separately from the type (which might help with
> > > MLS customization in general) or just doing a chcon on the
> > > containing home directory and having that be inherited (and
> > > not set on relabel for home directories).
> > > 
> > 
> > So... Right now its based on the policy because the home directory
> > contexts are regenerated when the policy changes, you are suggesting
> > making it more difficult to use? Right now you can change someones level
> > with semanage and restorecon -R their home directory which is fairly
> > easy. Setting the contexts explicitly seems like much more burden on the
> > local admin.
> 
> I thought genhomedircon wasn't setting the level at all (just using
> whatever is in the template, i.e. s0), and then they were using
> pam_namespace to instantiate per-level subdirs.
> 

Which sounds better (and safer - relabeling the level would be
questionable). However, having a mechanism to set levels separate from
type (and potentially user) sounds helpful. That way an admin could
specify, for example, that a log file should be Secret without having to
specify the type.

> I'm trying to understand whether the issue here is limited in scope to
> home directory labels or actually extends to the entire notion of
> per-role types (tmp files, ttys, derived program domains, etc).  I know
> that has long been an area of concern, not only for file relabeling but
> also for e.g. modules (requires templating that would go beyond even
> simple interfaces).
> 

I wonder too. I think that we need a means to create limited-privilege
login sessions and control movement between privileged domains (and
related domains through transitions). This can be done with much of the
current role infrastructure (see Dan's work on guest_t and xguest_t). We
can keep the process domains without instantiating corresponding file
types.

However, the problem with the current per-role templates is that they
are instantiated for _every_ role, which is clearly wrong for certain
types of locked-down roles. If I want a git-role that only allows a user
to login to a bash shell, execute git, and read / write certain file
types having a git_firefox_t is not desirable.

> genhomedircon does serve another purpose, btw - setting the SELinux user
> identity for the user's home directory.  So if you want to do separation
> based on SELinux user via constraints, you still need a mechanism for
> getting the user home directories to have the right SELinux user
> identity.
>   

I have two suggestions (which may be totally off-base):

1) Remove the selinux user concept entirely and merge it with the DAC
user identities. We would simply preserve the role authorizations and
allow constraints on the dac users (there are some interesting details
in there I know). The constraints could be limited to user equality /
inequality and not refer to specific users to simplify things.

2) The above separated file contexts that allow mapping of only the user
portion to a regex. This would allow us to have admin specified mappings
of users, but default to the same user. I'm hesitant about this one -
remember part of the problem is that we don't want to enumerate every
user in an LDAP database to do file system labeling.

Karl


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

  parent reply	other threads:[~2007-08-15 19:16 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-15 20:44 [patch 0/4] libsemanage: genhomedircon replacement tmiller
2007-08-15 15:10 ` Karl MacMillan
2007-08-15 15:29   ` Joshua Brindle
2007-08-15 15:47     ` Karl MacMillan
2007-08-15 15:57       ` Joshua Brindle
2007-08-15 17:22         ` Stephen Smalley
2007-08-15 17:37           ` Joshua Brindle
2007-08-15 19:21             ` Karl MacMillan
2007-08-15 19:16           ` Karl MacMillan [this message]
2007-08-15 19:56             ` Stephen Smalley
2007-08-15 20:17               ` Karl MacMillan
2007-08-15 20:31                 ` Stephen Smalley
2007-08-15 20:41                   ` Karl MacMillan
2007-08-15 20:47                     ` Joshua Brindle
2007-08-15 21:09                       ` Karl MacMillan
2007-08-15 21:12                         ` Joshua Brindle
2007-08-15 21:40                           ` Joshua Brindle
2007-08-17 13:33                           ` Karl MacMillan
2007-08-16 16:01                         ` Stephen Smalley
2007-08-17 13:31                           ` Karl MacMillan
2007-08-17 18:20                             ` Joshua Brindle
2007-08-27 17:50                           ` Daniel J Walsh
2007-08-28 14:21                             ` Joshua Brindle
2007-08-28 14:30                               ` Stephen Smalley
2007-08-28 14:46                               ` Karl MacMillan
2007-08-28 16:37                                 ` Daniel J Walsh
2007-09-06 18:51                                   ` Stephen Smalley
2007-09-06 18:56                                     ` Karl MacMillan
2007-09-06 20:33                                       ` Daniel J Walsh
2007-09-07 13:48                                         ` Karl MacMillan
2007-08-15 20:44                   ` Joshua Brindle
2007-08-15 20:44 ` [patch 1/4] libsemanage: genhomedircon initial cleanup tmiller
2007-08-15 20:44 ` [patch 2/4] libsemanage: genhomedircon replacement tmiller
2007-08-16 19:31   ` Stephen Smalley
2007-08-15 20:44 ` [patch 3/4] libsemanage: test functions tmiller
2007-08-15 20:44 ` [patch 4/4] libsemanage: remove genhomedircon python script tmiller
  -- strict thread matches above, loose matches on Subject: below --
2007-09-06 19:16 [patch 0/4] libsemanage: genhomedircon replacement Todd C. Miller

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=1187205378.2838.12.camel@localhost.localdomain \
    --to=kmacmillan@mentalrootkit.com \
    --cc=jbrindle@tresys.com \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@tycho.nsa.gov \
    --cc=tmiller@tresys.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.