From: Linda Knippers <linda.knippers@hp.com>
To: James Antill <jantill@redhat.com>
Cc: selinux@tycho.nsa.gov
Subject: Re: User home directory creation with useradd (rhbz#217441)
Date: Fri, 01 Dec 2006 15:47:22 -0500 [thread overview]
Message-ID: <457094DA.4080704@hp.com> (raw)
In-Reply-To: <1165003691.18588.103.camel@code.and.org>
James Antill wrote:
> As some of you know, there's an open BZ about the fact that in a
> strict/MLS environment useradd doesn't create the user's homedir with
> the correct context[1].
> The problem is that matchpathcon() needs semanage to have run, so we
> know what SELinux user the unix user is associated with, but that runs
> separately and after useradd. The four obvious solutions are:
>
> 1. Have an option for useradd to call semanage to add the selinux user,
> and then do the restorecon.
I think useradd should be able to either create the selinux user or map the
linux user to an existing selinux user. Right now you can't create an
selinux user without a linux login but I think I ought to be able to create
the selinux users separate and them map one or more linux login to each one,
or have useradd create a unique linux user for me if I choose. And if I
don't choose, the linux user should end up with the correct home directory
based on the default selinux user.
>
> 2. Have semanage do the equivalent of a restorecon when doing an
> add/modify (or just add) of SELinux user information.
If the semanage is done after the useradd (could be weeks after), the
user could have files that live outside the home directory (I think
Dan pointed this out to me) so what files and directories would you
run restorecon on?
>
> 3. Have some kind of wrapper that does:
> i. useradd
> ii. semanage
> iii. restorecon
I don't like the wrapper idea because if we can do it in a wrapper,
we can do it in useradd.
>
> 4. Document that you need to call the list of programs in #3.
I think we need to document that anytime semanage is used one
might need to run restorecon. There's nothing in the semanage
manpage about that, for example.
>
> Does anyone have comments on which of the above they like/hate?
>
>
> [1] http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=217441
>
-- ljk
--
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:[~2006-12-01 20:48 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-01 20:08 User home directory creation with useradd (rhbz#217441) James Antill
2006-12-01 20:22 ` Karl MacMillan
2006-12-04 2:39 ` David O'Brien
2006-12-04 13:49 ` Karl MacMillan
2006-12-04 23:38 ` David O'Brien
2006-12-01 20:47 ` Linda Knippers [this message]
2006-12-02 0:21 ` Russell Coker
2006-12-02 3:20 ` Joshua Brindle
2006-12-02 4:27 ` Russell Coker
2006-12-02 5:00 ` Joshua Brindle
2006-12-02 19:21 ` Linda Knippers
2006-12-02 19:29 ` Joshua Brindle
2006-12-05 8:42 ` Russell Coker
2006-12-02 23:08 ` Russell Coker
2006-12-04 17:43 ` Casey Schaufler
2006-12-04 18:10 ` Karl MacMillan
2006-12-04 19:34 ` Casey Schaufler
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=457094DA.4080704@hp.com \
--to=linda.knippers@hp.com \
--cc=jantill@redhat.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.