All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karl MacMillan <kmacmillan@mentalrootkit.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Ronan Waide <waider@amazon.com>, SE Linux <selinux@tycho.nsa.gov>,
	"Christopher J. PeBenito" <cpebenito@tresys.com>
Subject: Re: creating a new role/user to administer a service
Date: Fri, 05 Jan 2007 10:55:42 -0500	[thread overview]
Message-ID: <459E74FE.9020508@mentalrootkit.com> (raw)
In-Reply-To: <1168010769.18961.147.camel@moss-spartans.epoch.ncsc.mil>

Stephen Smalley wrote:
> On Thu, 2007-01-04 at 10:55 +0000, Ronan Waide wrote:
>> Hi,
>>
>> I've been digging through SELinux by example, the list archives, Dan
>> Walsh's livejournal, and the Fedora strict policy source, but I'm still
>> a bit stumped on how to get this working:
>>
>> I'd like to create an administrative role/user for BIND. specifically, I
>> do not, if possible, want to use something like sysadm_r; I would rather
>> that otherwise unprivileged users are either designated as bindadm_u
>> from login, or newrole into bindadm_r in order to manage the daemon. The
>> former is preferable, as I was hoping to make use of ssh keys to enable
>> remote management without multiple password entry.
>>
>> After several false starts I thought I had something with the following
>> (requires trimmed):
>>
>> ------
>> type bindadm_t;
>> role bindadm_r types { bindadm_t };
>> gen_user( bindadm_u, staff, bindadm_r, s0, s0 - s15:c0.c1023, c0.c1024
>> );
>>
>> semanage login -a -s bindadm_u -r bindadm_r waider
>> ------
>>
>> I began tracking the AVC violations that logging in with this account
>> caused, and got as far as being able to get a shell prompt with the
>> context bindadm_u:bindadm_r:user_t. At this point I tried getting
>> newrole -t bindadm_t to work, but couldn't get past the password check
>> requirement (allow bindadm_r chkpasswd_exec_t) since nothing I did
>> seemed to resolve the violation.
>>
>> At this point I am, as I said, stumped. I feel like I'm missing
>> something obvious, but after several weeks of reading I'm still no
>> closer to the answer. Perhaps someone could shed some light on this, or
>> perhaps point me at a suitable role/user-addition document?
> 
> At present, I think you need to obtain and modify full policy sources
> (from the selinux-policy .src.rpm or the upstream refpolicy tar ball) to
> introduce completely new user roles - it is too pervasive of a change to
> easily do in a loadable module. Look at
> policy/modules/system/userdomain.te and policy/rolemap to see how
> current roles are defined.
> 
> Chris (cc'd) has been working on a role infrastructure branch that will
> improve the situation, but that isn't mainstream yet afaik. 
> 

And some tools to automate this process with is on my todo list for Madison.

I'd like to see this in the FC7 time frame (or F7 I guess since Core is 
no more), but we are going to run out of time quickly. Chris - when are 
you planning to move the role infrastructure work to mainline? Will it 
allow the creation of modules that create new roles without full 
sources? That is, in my opinion, a requirement for useful deployment.

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.

  reply	other threads:[~2007-01-05 15:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-04 10:55 creating a new role/user to administer a service Ronan Waide
2007-01-05 15:26 ` Stephen Smalley
2007-01-05 15:55   ` Karl MacMillan [this message]
2007-01-05 16:48     ` Christopher J. PeBenito
2007-01-05 16:56       ` 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=459E74FE.9020508@mentalrootkit.com \
    --to=kmacmillan@mentalrootkit.com \
    --cc=cpebenito@tresys.com \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@tycho.nsa.gov \
    --cc=waider@amazon.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.