From: qingtao.cao@windriver.com (Harry Ciao)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] Showing role attributes + issue when calling selinux utilities
Date: Mon, 27 Feb 2012 10:31:52 +0800 [thread overview]
Message-ID: <4F4AEB18.3090405@windriver.com> (raw)
In-Reply-To: <20120226131858.GA30221@siphos.be>
I am very glad finally someone else also discovered this issue. I had
discovered it months ago and posted a patch to fix it, however, it had
not been integrated or even acked.
Please search for my two emails entitled as "Make role attributes able
to type their "own" types." sent around 2011-12-15 to the refpolicy
mailing list.
Aside from new_roles and run_init_roles, some other role attributes such
as groupadd_roles, useradd_roles and chfn_roles should have been able to
type with their counterpart domains.
Thanks,
Harry
On 02/26/2012 09:19 PM, Sven Vermeulen wrote:
> Hi guys,
>
> Continuing the 20120215 release testing, I noticed that I can't call
> run_init anymore:
>
> ~# run_init
> -bash: /usr/sbin/run_init: Permission denied
>
> Same for newrole:
>
> ~# newrole -r sysadm_r
> -bash: /usr/bin/newrole: Permission denied
>
> The denial is because of invalid context:
>
> ~# dmesg | tail -1
> [ 6165.059146] type=1401 audit(1330261818.013:2712): security_compute_sid:
> invalid context root:staff_r:newrole_t for scontext=root:staff_r:newrole_t
> tcontext=root:staff_r:newrole_t tclass=unix_stream_socket
>
> It looks that it has something to do with the role attribute support,
> because seutil_run_runinit has changed between 20110726 and 20120215 to that
> regard:
>
> ~$ ## 20110726 policy
> ~$ seshowif seutil_run_runinit
> interface(`seutil_run_runinit',`
> gen_require(`
> type run_init_t;
> role system_r;
> ')
>
> auth_run_chk_passwd(run_init_t, $2)
> seutil_domtrans_runinit($1)
> role $2 types run_init_t;
>
> allow $2 system_r;
> ')
>
> ~$ ## 20120215 policy
> $ seshowif seutil_run_runinit
> interface(`seutil_run_runinit',`
> gen_require(`
> attribute_role run_init_roles;
> ')
>
> seutil_domtrans_runinit($1)
> roleattribute $2 run_init_roles;
> ')
>
> Do I need to include "allow $2 system_r" again here?
>
> Another question: is it possible to query the role attributes on the system?
> seinfo only shows those for types...
>
> Wkr,
> Sven Vermeulen
> _______________________________________________
> refpolicy mailing list
> refpolicy at oss.tresys.com
> http://oss.tresys.com/mailman/listinfo/refpolicy
>
next prev parent reply other threads:[~2012-02-27 2:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-26 13:19 [refpolicy] Showing role attributes + issue when calling selinux utilities Sven Vermeulen
2012-02-26 14:37 ` Sven Vermeulen
2012-02-27 2:31 ` Harry Ciao [this message]
2012-02-27 15:15 ` Christopher J. PeBenito
2012-02-28 2:02 ` Harry Ciao
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=4F4AEB18.3090405@windriver.com \
--to=qingtao.cao@windriver.com \
--cc=refpolicy@oss.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.