All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joshua Brindle <jbrindle@tresys.com>
To: russell@coker.com.au
Cc: Linda Knippers <linda.knippers@hp.com>,
	James Antill <jantill@redhat.com>,
	selinux@tycho.nsa.gov
Subject: Re: User home directory creation with useradd (rhbz#217441)
Date: Fri, 01 Dec 2006 22:20:25 -0500	[thread overview]
Message-ID: <4570F0F9.7080509@tresys.com> (raw)
In-Reply-To: <200612021121.45703.russell@coker.com.au>

Russell Coker wrote:
> On Saturday 02 December 2006 07:47, Linda Knippers <linda.knippers@hp.com> 
> wrote:
>   
>>> 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
>>     
>
> I think that this is a bug.  You should be able to create SE Linux users 
> without Linux logins, if only for the case of a NIS/LDAP server being down at 
> SE Linux user creation time.
>
>   
You can create them all you want, you just can't log in with a user that 
has a matching selinux user without a login mapping the linux user to 
the selinux user, this is by design, we don't want the implicit mapping.

>> 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.
>>     
>
> I think that part of the solution is to have semanage call useradd.
>
>   
no. semanage is managing selinux and selinux resources, not logins, not 
system resources.
>>> 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?
>>     
>
> Also for a MLS environment you can't just relabel the files unless the new 
> sensitivity label dominates the old.  For a strict policy system it's 
> generally acceptable for relabel the files, but for MLS that won't work.
>
>   
you can if the thing relabeling is mls privileged, the useradd program 
or whatever labels the home directory would have that privilege
>>> 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.
>>     
>
> Or semanage, or do it in both and give the sys-admin a choice.
>   
semanage does not manage system resources.



--
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:[~2006-12-02  3:20 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
2006-12-02  0:21   ` Russell Coker
2006-12-02  3:20     ` Joshua Brindle [this message]
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=4570F0F9.7080509@tresys.com \
    --to=jbrindle@tresys.com \
    --cc=jantill@redhat.com \
    --cc=linda.knippers@hp.com \
    --cc=russell@coker.com.au \
    --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.