From: Luke Kenneth Casson Leighton <lkcl@lkcl.net>
To: Karl MacMillan <kmacmillan@tresys.com>,
"'Stephen Smalley'" <sds@tycho.nsa.gov>,
"'Kaigai Kohei'" <kaigai@ak.jp.nec.com>,
"'KaiGai Kohei'" <kaigai@kaigai.gr.jp>,
"'SELinux Mail List'" <selinux@tycho.nsa.gov>,
selinux-dev@tresys.com
Subject: Re: [RFC & PATCH] inherited type definition.
Date: Thu, 24 Mar 2005 22:27:54 +0000 [thread overview]
Message-ID: <20050324222754.GF8553@lkcl.net> (raw)
In-Reply-To: <20050324110438.GC13372@lkcl.net>
On Thu, Mar 24, 2005 at 11:04:38AM +0000, Luke Kenneth Casson Leighton wrote:
> On Tue, Mar 22, 2005 at 08:53:28AM -0500, Karl MacMillan wrote:
>
> > > -----Original Message-----
> > > From: Luke Kenneth Casson Leighton [mailto:lkcl@lkcl.net]
> > > Sent: Monday, March 21, 2005 7:15 PM
> > <snip>
> > > >
> > > > First, you missed the switch to the @ being required in order to
> > > > inherit permissions through extends - making that syntax,
> > > as far as I
> > > > can tell, the same as what you are suggesting.
> > >
> > > i understood it to be the other way round - that the @ is
> > > required to _not_ allow a permission to be inherited through extends.
> > >
> > >
> >
> > Like I said - it switched part way through the discussion.
>
> okay, i must have missed that.
>
> ... but, after a couple of days' thought, i don't believe
> that what i am suggesting is anything anywhere near the @
> syntax, and it is in fact in response to some comments by
> stephen [where he mentioned that it would be better to split
> domains up further using macros than it would be to use
> this inheritance system with some modifications suggested
> by me, so off i went to think of some better modifications -
> clarification below]
>
>
> > > > Next, my objection is that there is only one subset of
> > > permissions -
> > > > there is no way to have user_ftp_t inherit one set of
> > > permissions from
> > > > user_t and user_httpd_t inherit another set of permissions from
> > > > user_t.
> > >
> > > note syntax in example [copied from above]:
> > >
> > > > > some_macro (`
> > > > > inheritable($1_ftp_t, parent_class2_t) {
> > > ^^^^^^^^ ^^^^^^^^^^^^^^^
> > > > >
> > > > > allow ....;
> > > > >
> > > > > }
> > >
> > > so, to link this with your examples above, let's express this in
> > > "inheritable() { ... }" syntax:
> > >
> > > some_macro (`
> > > inheritable($1_ftp_t, $1_httpd_t) {
> > > allow ....;
> > > }
> > > inheritable($1_ftp_t) {
> > > allow ....;
> > > }
> > > inheritable($1_httpd_t) {
> > > allow ....;
> > > }
> > > allow ....;
> > > }
> > >
> > > ')
> > >
> > > make sense?
> > >
> >
> > I guess I don't understand how your proposed syntax works. What does it mean
> > when there are two types?
sorry - i mis-read your question.
when there are two types, it means: when you use
some_macro(user) and you then declare type user_httpd_t it
gets all the stuff where user_httpd_t occurs in _any_ inheritable()
wrap and when you declare user_ftp_t, likewise.
inheritable($1_ftp_t, $1_httpd_t) {
allow A;
}
inheritable($1_ftp_t) {
allow B;
}
inheritable($1_httpd_t) {
allow C;
}
allow D;
therefore:
user_httpd_t comprises allow A and allow C
user_ftp_t comprises allow A and allow B,
user_t comprises allow A B C _and_ D.
because D is not inside an inheritable() wrap, it never gets
inherited by "extends" syntax.
hence, this could be viewed as a simplification of having to
split some_macro into ... mmm... _four (!) separate sub-macros
one each covering the permissions allow A, allow B, allow C
and allow D:
some_macro ('
some_macro_A($1) # representing inheritable A group above
some_macro_B($1) # ... etc.
some_macro_C($1)
some_macro_D($1)
')
l.
--
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.
prev parent reply other threads:[~2005-03-24 22:27 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
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 [this message]
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=20050324222754.GF8553@lkcl.net \
--to=lkcl@lkcl.net \
--cc=kaigai@ak.jp.nec.com \
--cc=kaigai@kaigai.gr.jp \
--cc=kmacmillan@tresys.com \
--cc=sds@tycho.nsa.gov \
--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.