|
Security Enhanced Linux
What's New
Frequently Asked Questions
Background
Documents
License
Download
Participating
Mail List
Archives
Remaining Work
Contributors
Related Work
Press Releases
Information Assurance Research
NIARL In-house Research Areas
Mathematical Sciences Program
Sabbaticals
Computer & Information Sciences Research
Technology Transfer
Advanced Computing
Advanced Mathematics
Communications & Networking
Information Processing
Microelectronics
Other Technologies
Technology Fact Sheets
Publications
Related Links
|
SELinux Mailing List
Re: [RFC] Common Intermediary Language
From: Caleb Case <ccase_at_tresys.com>
Date: Wed, 15 Jul 2009 15:46:18 -0400
I was hoping to introduce the basic ideas of the CIL and get some feedback on them. After that I was intending to send a more detailed proposal for the language (including the grammer and syntax). Any comments you have are greatly appreciated!
> Without getting too wrapped around the axle with details (or syntax), here is an example of removing an rule: del /*/(Allow:Type * * /(Class file)/(Permission execute)) First, 'del' is the delete transform, so we are deleting whatever follows. Second, '/' begins a selection, in this case we are selecting all of the TE allow rules. Specifically, it selects all allow rules with any source or target with the class 'file' and the permission 'execute'. The effect of this transformation is that any allow rules that the selection matches will be deleted. Supposing that an allow rule had multiple permissions, then only the execute permission would be removed. Another example, lets say there is an Apache policy provided by the distribution policy and you want to create your own kind of Apache policy based on it: copy /(Block apache []) => Block myapache [] Maybe you decided that you didn't want everything in the Apache policy: copy /(Block apache []) => Block myapache [] except Type helper This would copy everything from the Apache policy except the 'helper' type. A simple example policy with a domain and exec type: Def Block example [] Def Type self Def Type exec This defines the policy 'example' and defines two types under it 'self' and 'exec'. This would be similar to the following in refpolicy: policy_module(example, 1.0.0) type example_t; <-- Def Type self type example_exec_t; <-- Def Type exec 'self' is a special type for the name of the block you are in. Also, the types are namespaced to the block they are defined in. The namespacing is what allows copying to work intelligently: copy /(Block example []) => Block myexample [] This produces a 'myexample' policy similar to this refpolicy: policy_module(myexample, 1.0.0) type myexample_t; <-- Def Type self type myexample_exec_t; <-- Def Type exec An example of something like an interface from refpolicy: Def Block example [] Def Type self Def Type exec Def Block exec [(Type source)] Def Allow:Type (Type source) (Type exec) /(Class file)/(Permissionexecute_no_trans) Here I have defined an 'example' policy, but added an sub-block 'exec' which takes one parameter 'source' and gives 'source' access to our 'exec' type. The 'exec' policy block can be called:
Def Type foo
I've defined a type 'foo', selected the block I want to call, and then passed 'foo' as the parameter. An interesting possibility in CIL is that abstract application policy for all applications that need to have a domain, exec type, an exec interface, etc. can be defined. Then a policy writer can just use the copy transformation to create a specific version and add/remove any additional policy that is needed. The net result should be a much more concise system policy. Hopefully this has been thought provoking ;o} I appreciate any feedback you have! Thanks, Caleb -- 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.Received on Thu 16 Jul 2009 - 15:08:05 EDT |
|
|
Date Posted: Nov 14, 2008 | Last Modified: Mar 19, 2010 | Last Reviewed: Mar 19, 2010 |











