From: Roy Badami <roy.badami@roboreus.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: selinux@tycho.nsa.gov
Subject: Re: CentOS 5 RBAC
Date: Wed, 31 Aug 2011 19:03:03 +0100 [thread overview]
Message-ID: <4E5E7757.5030007@roboreus.com> (raw)
In-Reply-To: <1314810951.6850.26.camel@moss-pluto>
[-- Attachment #1: Type: text/plain, Size: 1797 bytes --]
[Resending after accidentally dropping cc to the list]
On 31/08/2011 18:15, Stephen Smalley wrote:
> The logic in selinux_set_enforce_mode() in
> policy/modules/kernel/selinux.if is:
> ...
> if(!secure_mode_policyload) {
> allow $1 security_t:security setenforce;
> ...
> }
>
> Notice the logical negation (!) in the above if statement.
>
Ah, thank you! I had looked at those lines ealier, without fully
understanding how the policy fitted together. Indeed, I set
secure_mode_policyload to 'on' based on that code to fix the fact that
root could still run setenforce, even without changing role to
secadm_r. But unfortuantely, I see now, the reason root could run
setenforce without changing to secadm_r is that root gets sysadm_r by
default - and changing secure_mode_loadpolicy prevents *both* sysadm_r
*and* secadm_r from administering policy - which wasn't what I was
trying to achieve.
ifdef(`enable_mls',`
userdom_security_administrator(secadm_t,secadm_r,{ secadm_tty_device_t
sysadm_devpts_t })
# tunable_policy(`allow_sysadm_manage_security',`
userdom_security_administrator(sysadm_t,sysadm_r,admin_terminal)
# ')
If the allow_sysadm_manage_security boolean was implemented in this
policy then I could simply set that to 'off'. Given it's not - what's
the best way to grant this permission to secadm_r only? Presumably I
want to set secure_mode_loadpolicy to 'on' as now so that the shipped
policy doesn't give permissions, and then load some custom TE rules to
add the necessary permissions for secadm_r to administer security policy?
Regards
roy
--
Roy Badami
Roboreus Ltd
1 New Oxford Street
London WC1A 1NU
[-- Attachment #2: Type: text/html, Size: 3409 bytes --]
next prev parent reply other threads:[~2011-08-31 18:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-31 17:01 CentOS 5 RBAC Roy Badami
2011-08-31 17:15 ` Stephen Smalley
2011-08-31 18:03 ` Roy Badami [this message]
2011-08-31 18:23 ` Stephen Smalley
2011-08-31 18:25 ` Stephen Smalley
2011-09-02 11:37 ` Roy Badami
2011-09-02 12:30 ` Christopher J. PeBenito
2011-09-02 13:49 ` Roy Badami
2011-09-02 14:18 ` Dominick Grift
2011-08-31 17:24 ` Stephen Smalley
2011-08-31 18:03 ` Roy Badami
2011-08-31 17:48 ` Dominick Grift
2011-08-31 18:14 ` Roy Badami
2011-08-31 18:24 ` Dominick Grift
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=4E5E7757.5030007@roboreus.com \
--to=roy.badami@roboreus.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.