From: KaiGai Kohei <kaigai@kaigai.gr.jp>
To: Karl MacMillan <kmacmillan@tresys.com>
Cc: "'SELinux Mail List'" <selinux@tycho.nsa.gov>,
kaigai@ak.jp.nec.com, selinux-dev@tresys.com
Subject: Re: [RFC & PATCH] inherited type definition.
Date: Tue, 15 Mar 2005 20:47:08 +0900 [thread overview]
Message-ID: <4236CB3C.80606@kaigai.gr.jp> (raw)
In-Reply-To: <200503141638.j2EGbx8R007648@gotham.columbia.tresys.com>
Hi Karl, Thanks for your comments.
>> Interesting patch and I'm glad to see you use sediff for testing this - it has
>> proven very valuable to use when doing work on checkpolicy for us as well. My
>> concern for this (in addition to Steve's comments) is that it isn't general
>> enough to solve many of the policy language problems that we commonly see. For
>> example, this doesn't help with types that are derived on a per-role basis. This
>> is a conceptually similar problem - I want user_ssh_t to be very similar
>> staff_ssh_t with some differences - but requires some additional features. I am
>> interested in extending this because right now it is not possible to easily add
>> roles to binary policies, like the modules, because the per-role types are not
>> correctly created.
In my understanding, your concern is that child type/domain always inherit
parent's attachments of roles, and this character make it hard to define
similar type/domain which belong to different roles.
It can be resolved by multi-layer type/domain inheritance.
e.g)
type generic_ssh_t;
type user_ssh_t extends generic_ssh_t;
type staff_ssh_t extends generic_ssh_t;
generic_ssh_t is attached some generic and necessary permissions and attributes,
but generic_ssh_t does not belong to any roles.
user_ssh_t and staff_ssh_t is defined as a child type of generic_ssh_t.
Those are attached specific permissions and attributes, and each type belong to
own roles.
This look like the usage of ATTRIBUTE. But we can't define multi-layer structure
for attribute on current checkpolicy. My extension make it possible.
>> I don't have a concrete suggestion, but an example would be a policy syntax that
>> could duplicate the ssh_domain macro. Instead of creating a type based on
>> another type, it would be creating a type based on a 'type template'. This would
>> allow creating user_ssh_t and staff_ssh_t, for example, with similar access in
>> many cases, but also differences (e.g., user_home_ssh_t and staff_home_ssh_t or
>> a different transition from ssh_exec_t).
Indeed, we can also define such types by 'type template' macros, I think.
But I wonder whether type configuration by multiple macros is enough easy
for general end-user or not.
My original motivation willing to implement TYPE ... EXTENDS is that
making it easier to define original type/domain by using an existing
correct type/domain definition, because defining a new type/domain from
scratch is required so wide knowledge for application, kernel, SELinux and macros.
(Education often requires massive cost.)
In many case, an imitation of existing type/domain is easier than
to enforce end-user learning about application, kernel, SELinux and macros.
Thanks.
--
DO NOTHING IS THE WORST POLICY.
KaiGai Kohei <kaigai@kaigai.gr.jp>
--
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:[~2005-03-15 11:52 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-13 16:36 [RFC & PATCH] inherited type definition KaiGai Kohei
2005-03-14 13:17 ` KaiGai Kohei
2005-03-14 13:50 ` Stephen Smalley
2005-03-14 15:13 ` Luke Kenneth Casson Leighton
2005-03-14 15:22 ` Stephen Smalley
2005-03-14 16:01 ` Luke Kenneth Casson Leighton
2005-03-14 19:27 ` Valdis.Kletnieks
2005-03-14 20:10 ` Stephen Smalley
2005-03-14 17:26 ` KaiGai Kohei
2005-03-14 18:10 ` Luke Kenneth Casson Leighton
2005-03-14 18:25 ` Stephen Smalley
2005-03-15 11:50 ` KaiGai Kohei
2005-03-15 14:42 ` Stephen Smalley
2005-03-16 4:42 ` Kaigai Kohei
2005-03-16 10:00 ` Luke Kenneth Casson Leighton
2005-03-16 14:05 ` Stephen Smalley
2005-03-17 9:32 ` Kaigai Kohei
2005-03-17 13:55 ` Stephen Smalley
2005-03-17 14:57 ` KaiGai Kohei
2005-03-21 10:07 ` KaiGai Kohei
2005-03-21 15:59 ` Stephen Smalley
2005-03-23 8:17 ` Kaigai Kohei
2005-03-23 13:56 ` Stephen Smalley
2005-04-16 7:31 ` KaiGai Kohei
2005-04-18 12:25 ` Stephen Smalley
2005-04-18 16:57 ` KaiGai Kohei
2005-03-24 11:06 ` Luke Kenneth Casson Leighton
2005-03-24 12:34 ` Kaigai Kohei
2005-04-06 12:49 ` Russell Coker
2005-04-06 14:50 ` KaiGai Kohei
2005-04-06 15:30 ` Russell Coker
2005-04-06 18:23 ` Jim McCullough
2005-04-07 2:16 ` Kaigai Kohei
2005-04-06 17:55 ` Luke Kenneth Casson Leighton
2005-03-14 16:38 ` Karl MacMillan
2005-03-15 11:47 ` KaiGai Kohei [this message]
2005-03-15 14:00 ` Karl MacMillan
2005-03-16 4:35 ` Kaigai Kohei
2005-03-16 10:13 ` Luke Kenneth Casson Leighton
2005-03-16 21:46 ` Karl MacMillan
2005-03-16 21:31 ` Karl MacMillan
2005-03-17 13:05 ` Kaigai Kohei
2005-03-17 19:15 ` Karl MacMillan
2005-03-17 20:07 ` Stephen Smalley
2005-03-17 21:41 ` Karl MacMillan
2005-03-18 13:13 ` Stephen Smalley
2005-03-18 13:56 ` Stephen Smalley
2005-03-18 22:28 ` Karl MacMillan
2005-03-18 23:03 ` Luke Kenneth Casson Leighton
2005-03-20 23:20 ` Karl MacMillan
2005-03-21 0:17 ` Luke Kenneth Casson Leighton
2005-03-21 13:39 ` Karl MacMillan
2005-03-22 0:14 ` Luke Kenneth Casson Leighton
2005-03-22 13:53 ` Karl MacMillan
2005-03-24 11:04 ` Luke Kenneth Casson Leighton
2005-03-24 12:31 ` Kaigai Kohei
2005-03-24 22:19 ` Luke Kenneth Casson Leighton
2005-03-24 22:27 ` Luke Kenneth Casson Leighton
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=4236CB3C.80606@kaigai.gr.jp \
--to=kaigai@kaigai.gr.jp \
--cc=kaigai@ak.jp.nec.com \
--cc=kmacmillan@tresys.com \
--cc=selinux-dev@tresys.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.