type inheritance in CIL
Trying to make sandbox working using CIL but I see it does not support typeinherit statement.
Signature · 3 lines
Miroslav Grepl Senior Software Engineer, SELinux Solutions Red Hat, Inc.
Quoted 2 lines · Miroslav Grepl
Trying to make sandbox working using CIL but I see it does not support typeinherit statement.
One of those features that really define CIL but that is currently not available or fully working yet.
My suggestion is to study the "cilpolicy" (which is really just a snapshot of reference policy transformed to cil with hll i believe)
This will give you some pointers as to how to create an alternative implementation that achieves a similar result.
When you write CIL policy, there are some "bugs" to take into account and to workaround.
Quoted 10 lines
Signature · 9 lines
-- Miroslav Grepl Senior Software Engineer, SELinux Solutions Red Hat, Inc. _______________________________________________ Selinux mailing list [email protected] To unsubscribe, send email to [email protected]. To get help, send an email containing "help" to [email protected].
Signature · 4 lines
02DFF788 4D30 903A 1CF3 B756 FB48 1514 3148 83A2 02DF F788 http://keys.gnupg.net/pks/lookup?op=vindex&search=0x314883A202DFF788 Dominick Grift
Quoted 11 lines · Dominick Grift
Quoted 2 lines · Miroslav Grepl
Trying to make sandbox working using CIL but I see it does not support typeinherit statement.
One of those features that really define CIL but that is currently not available or fully working yet.
My suggestion is to study the "cilpolicy" (which is really just a snapshot of reference policy transformed to cil with hll i believe)
Quoted 6 lines
This will give you some pointers as to how to create an alternative implementation that achieves a similar result.
When you write CIL policy, there are some "bugs" to take into account and to workaround.
Sure there are different ways how to write it. I just wanted to combine it with the current Fedora policy as much as possible without re-writing the current Fedora policy.
Quoted 14 lines
Quoted 6 lines
-- Miroslav Grepl Senior Software Engineer, SELinux Solutions Red Hat, Inc. _______________________________________________ Selinux mailing list [email protected] To unsubscribe, send email to [email protected]. To get help, send an email containing "help" to [email protected].
_______________________________________________ Selinux mailing list [email protected] To unsubscribe, send email to [email protected]. To get help, send an email containing "help" to [email protected].
Signature · 3 lines
Miroslav Grepl Senior Software Engineer, SELinux Solutions Red Hat, Inc.
Quoted 8 lines · Miroslav Grepl
Quoted 7 lines · Dominick Grift
Quoted 2 lines · Miroslav Grepl
Trying to make sandbox working using CIL but I see it does not support typeinherit statement.
One of those features that really define CIL but that is currently not available or fully working yet.
Inheritance in CIL is handled with blocks.
The following policy:
(block b1
(type t)
(allow t self (CLASS (PERM)))
)
(block b2
(blockinherit b1))
Would result in two types (b1.t and b2.t) and two rules.
See block_test.cil and name_resolution_test.cil in secilc/test/ for more examples. Everything should work, but, of course, it has seen less testing at this point.
Jim
Quoted 31 lines
Quoted 10 lines
My suggestion is to study the "cilpolicy" (which is really just a snapshot of reference policy transformed to cil with hll i believe)
This will give you some pointers as to how to create an alternative implementation that achieves a similar result.
When you write CIL policy, there are some "bugs" to take into account and to workaround.
Sure there are different ways how to write it. I just wanted to combine it with the current Fedora policy as much as possible without re-writing the current Fedora policy.
Quoted 14 lines
Quoted 6 lines
-- Miroslav Grepl Senior Software Engineer, SELinux Solutions Red Hat, Inc. _______________________________________________ Selinux mailing list [email protected] To unsubscribe, send email to [email protected]. To get help, send an email containing "help" to [email protected].
_______________________________________________ Selinux mailing list [email protected] To unsubscribe, send email to [email protected]. To get help, send an email containing "help" to [email protected].
Signature · 2 lines
James Carter <[email protected]> National Security Agency
Quoted 19 lines · James Carter
Quoted 8 lines · Miroslav Grepl
Quoted 7 lines · Dominick Grift
Quoted 2 lines · Miroslav Grepl
Trying to make sandbox working using CIL but I see it does not support typeinherit statement.
One of those features that really define CIL but that is currently not available or fully working yet.
Inheritance in CIL is handled with blocks.
The following policy:
(block b1
(type t)
(allow t self (CLASS (PERM)))
)
Quoted 8 lines
(block b2
(blockinherit b1))Would result in two types (b1.t and b2.t) and two rules.
See block_test.cil and name_resolution_test.cil in secilc/test/ for more examples. Everything should work, but, of course, it has seen less testing at this point.
Thanks I am aware of that featurew, namespacing is also still a bit buggy in my view though.
If this is meant to be a substitute for typeinherit then how is one supposed to implement something that behaves like typeinheritfilter?
You are aware the typeinherit and typeinheritfilter are still documented on https://github.com/SELinuxProject/cil/wiki?
Quoted 44 lines
Jim
Quoted 31 lines
Quoted 10 lines
My suggestion is to study the "cilpolicy" (which is really just a snapshot of reference policy transformed to cil with hll i believe)
This will give you some pointers as to how to create an alternative implementation that achieves a similar result.
When you write CIL policy, there are some "bugs" to take into account and to workaround.
Sure there are different ways how to write it. I just wanted to combine it with the current Fedora policy as much as possible without re-writing the current Fedora policy.
Quoted 14 lines
Quoted 6 lines
-- Miroslav Grepl Senior Software Engineer, SELinux Solutions Red Hat, Inc. _______________________________________________ Selinux mailing list [email protected] To unsubscribe, send email to [email protected]. To get help, send an email containing "help" to [email protected].
_______________________________________________ Selinux mailing list [email protected] To unsubscribe, send email to [email protected]. To get help, send an email containing "help" to [email protected].
Signature · 7 lines
James Carter <[email protected]> National Security Agency _______________________________________________ Selinux mailing list [email protected] To unsubscribe, send email to [email protected]. To get help, send an email containing "help" to [email protected].
Signature · 4 lines
02DFF788 4D30 903A 1CF3 B756 FB48 1514 3148 83A2 02DF F788 http://keys.gnupg.net/pks/lookup?op=vindex&search=0x314883A202DFF788 Dominick Grift
Quoted 29 lines · Dominick Grift
Quoted 19 lines · James Carter
Quoted 8 lines · Miroslav Grepl
Quoted 7 lines · Dominick Grift
Quoted 2 lines · Miroslav Grepl
Trying to make sandbox working using CIL but I see it does not support typeinherit statement.
One of those features that really define CIL but that is currently not available or fully working yet.
Inheritance in CIL is handled with blocks.
The following policy:
(block b1
(type t)
(allow t self (CLASS (PERM)))
)Quoted 8 lines
(block b2
(blockinherit b1))Would result in two types (b1.t and b2.t) and two rules.
See block_test.cil and name_resolution_test.cil in secilc/test/ for more examples. Everything should work, but, of course, it has seen less testing at this point.
Quoted 5 lines
Thanks I am aware of that featurew, namespacing is also still a bit buggy in my view though.
If this is meant to be a substitute for typeinherit then how is one supposed to implement something that behaves like typeinheritfilter?
You are aware the typeinherit and typeinheritfilter are still documented on https://github.com/SELinuxProject/cil/wiki?
Yes, although it has been a while since I looked at that.
The blockinherit is a substitute for typeinherit. There is no replacement for typeinheritfilter yet.
We would like to add a mechanism to remove rules at some point. But there are all sorts of potential ordering issues when you add something like that and we have been busy with other parts of CIL.
Jim
Quoted 53 lines
Quoted 36 lines
Jim
Quoted 7 lines
Quoted 7 lines
My suggestion is to study the "cilpolicy" (which is really just a snapshot of reference policy transformed to cil with hll i believe)
This will give you some pointers as to how to create an alternative implementation that achieves a similar result.
Quoted 24 lines
Quoted 3 lines
When you write CIL policy, there are some "bugs" to take into account and to workaround.
Sure there are different ways how to write it. I just wanted to combine it with the current Fedora policy as much as possible without re-writing the current Fedora policy.
Quoted 14 lines
Quoted 6 lines
-- Miroslav Grepl Senior Software Engineer, SELinux Solutions Red Hat, Inc. _______________________________________________ Selinux mailing list [email protected] To unsubscribe, send email to [email protected]. To get help, send an email containing "help" to [email protected].
_______________________________________________ Selinux mailing list [email protected] To unsubscribe, send email to [email protected]. To get help, send an email containing "help" to [email protected].
Quoted 8 lines
--
James Carter <[email protected]>
National Security Agency
_______________________________________________
Selinux mailing list
[email protected]
To unsubscribe, send email to [email protected].
To get help, send an email containing "help" to [email protected]._______________________________________________
Selinux mailing list
[email protected]
To unsubscribe, send email to [email protected].
To get help, send an email containing "help" to [email protected].
Signature · 2 lines
James Carter <[email protected]> National Security Agency
Quoted 29 lines · Dominick Grift
Quoted 17 lines · James Carter
Quoted 9 lines · Miroslav Grepl
Quoted 8 lines · Dominick Grift
Quoted 2 lines · Miroslav Grepl
Trying to make sandbox working using CIL but I see it does not support typeinherit statement.
One of those features that really define CIL but that is currently not available or fully working yet.
Inheritance in CIL is handled with blocks.
The following policy:
(block b1 (type t) (allow t self (CLASS (PERM))) )
Quoted 7 lines
(block b2 (blockinherit b1))
Would result in two types (b1.t and b2.t) and two rules.
See block_test.cil and name_resolution_test.cil in secilc/test/ for more examples. Everything should work, but, of course, it has seen less testing at this point.
Thanks I am aware of that featurew, namespacing is also still a bit buggy in my view though.
Quoted 7 lines
If this is meant to be a substitute for typeinherit then how is one supposed to implement something that behaves like typeinheritfilter?
You are aware the typeinherit and typeinheritfilter are still documented on https://github.com/SELinuxProject/cil/wiki?
Quoted 1 line
Yeap.
So the point is I need to re-write the current sandbox policy to CIL using block statements to use inheritance.
Quoted 49 lines
Quoted 36 lines
Jim
Quoted 7 lines
Quoted 7 lines
My suggestion is to study the "cilpolicy" (which is really just a snapshot of reference policy transformed to cil with hll i believe)
This will give you some pointers as to how to create an alternative implementation that achieves a similar result.
Quoted 25 lines
Quoted 3 lines
When you write CIL policy, there are some "bugs" to take into account and to workaround.
Sure there are different ways how to write it. I just wanted to combine it with the current Fedora policy as much as possible without re-writing the current Fedora policy.
Quoted 15 lines
Quoted 7 lines
-- Miroslav Grepl Senior Software Engineer, SELinux Solutions Red Hat, Inc. _______________________________________________ Selinux mailing list [email protected] To unsubscribe, send email to [email protected]. To get help, send an email containing "help" to [email protected].
_______________________________________________ Selinux mailing list [email protected] To unsubscribe, send email to [email protected]. To get help, send an email containing "help" to [email protected].
Quoted 5 lines
-- James Carter <[email protected]> National Security Agency _______________________________________________ Selinux mailing list [email protected] To unsubscribe, send email to [email protected]. To get help, send an email containing "help" to [email protected].
_______________________________________________ Selinux mailing list [email protected] To unsubscribe, send email to [email protected]. To get help, send an email containing "help" to [email protected].
Signature · 3 lines
Miroslav Grepl Senior Software Engineer, SELinux Solutions Red Hat, Inc.
Quoted 34 lines · Miroslav Grepl
Quoted 33 lines · Dominick Grift
Quoted 17 lines · James Carter
Quoted 9 lines · Miroslav Grepl
Quoted 8 lines · Dominick Grift
Quoted 2 lines · Miroslav Grepl
Trying to make sandbox working using CIL but I see it does not support typeinherit statement.
One of those features that really define CIL but that is currently not available or fully working yet.
Inheritance in CIL is handled with blocks.
The following policy:
(block b1 (type t) (allow t self (CLASS (PERM))) )
Quoted 7 lines
(block b2 (blockinherit b1))
Would result in two types (b1.t and b2.t) and two rules.
See block_test.cil and name_resolution_test.cil in secilc/test/ for more examples. Everything should work, but, of course, it has seen less testing at this point.
Thanks I am aware of that featurew, namespacing is also still a bit buggy in my view though.
If this is meant to be a substitute for typeinherit then how is one supposed to implement something that behaves like typeinheritfilter?
Quoted 9 lines
Quoted 3 lines
You are aware the typeinherit and typeinheritfilter are still documented on https://github.com/SELinuxProject/cil/wiki?
Quoted 1 line
Yeap.
So the point is I need to re-write the current sandbox policy to CIL using block statements to use inheritance.
Yes.
Please keep me informed of any difficulties and bugs. I've tested the name resolution and block handling as much as I could, but you're likely to discover corner cases which I didn't think about.
I am also curious about how you plan on using inheritance. What are you going to put in blocks? Which blocks are going to inherit from which blocks?
I am not sure if it will be useful in your case, but there is a blockabstract statement which tells CIL that the block is to be ignored except for inheritance.
Jim
Quoted 51 lines
Quoted 49 lines
Quoted 36 lines
Jim
Quoted 7 lines
Quoted 7 lines
My suggestion is to study the "cilpolicy" (which is really just a snapshot of reference policy transformed to cil with hll i believe)
This will give you some pointers as to how to create an alternative implementation that achieves a similar result.
Quoted 25 lines
Quoted 3 lines
When you write CIL policy, there are some "bugs" to take into account and to workaround.
Sure there are different ways how to write it. I just wanted to combine it with the current Fedora policy as much as possible without re-writing the current Fedora policy.
Quoted 15 lines
Quoted 7 lines
-- Miroslav Grepl Senior Software Engineer, SELinux Solutions Red Hat, Inc. _______________________________________________ Selinux mailing list [email protected] To unsubscribe, send email to [email protected]. To get help, send an email containing "help" to [email protected].
_______________________________________________ Selinux mailing list [email protected] To unsubscribe, send email to [email protected]. To get help, send an email containing "help" to [email protected].
Quoted 5 lines
-- James Carter <[email protected]> National Security Agency _______________________________________________ Selinux mailing list [email protected] To unsubscribe, send email to [email protected]. To get help, send an email containing "help" to [email protected].
_______________________________________________ Selinux mailing list [email protected] To unsubscribe, send email to [email protected]. To get help, send an email containing "help" to [email protected].
Signature · 2 lines
James Carter <[email protected]> National Security Agency