Updates.
This commit is contained in:
parent
45d25ff075
commit
5ba9f0b643
|
@ -0,0 +1,4 @@
|
|||
<h1>Contributing</h1>
|
||||
<p>
|
||||
If you are interested in working on refpolicy feel free to contact the developers at either <a mailto="selinux@tresys.com">selinux@tresys.com</a> or on the <A href="http://www.nsa.gov/selinux/info/list.cfm?MenuID=41.1.1.9">SELinux mailing list</A>. All public development related discussion happens on the SELinux mailing list.
|
||||
</p>
|
|
@ -11,7 +11,7 @@ Modules should be placed in refpolicy/policy/LAYER, where LAYER is the name of t
|
|||
</p>
|
||||
<h3>Module TE Policy</h3>
|
||||
<p>
|
||||
First, let's create myapp.te and add the following:
|
||||
First create myapp.te and add the following:
|
||||
<div id="codeblock">
|
||||
<pre>
|
||||
# Private type declarations
|
||||
|
@ -38,19 +38,20 @@ allow myapp_t myapp_log_t:file ra_file_perms;
|
|||
allow myapp_t myapp_tmp_t:file create_file_perms;
|
||||
</pre>
|
||||
</div>
|
||||
This allows myapp_t to write to it's private types, but it needs to be able to
|
||||
create its temporary files in /tmp. This requires a call to the files module.
|
||||
<p>This allows myapp_t to write to it's private types, but it needs to be able to
|
||||
create its temporary files in /tmp. This requires a call to the files module.</p>
|
||||
<div id="codeblock">
|
||||
<pre>
|
||||
files_create_tmp_files(myapp_t,myapp_tmp_t,file)
|
||||
</pre>
|
||||
</div>
|
||||
<p>
|
||||
This call to the files module allows myapp_t to create myapp_tmp_t files in
|
||||
the /tmp directory.
|
||||
</p>
|
||||
<h3>Module IF Policy</h3>
|
||||
<p>
|
||||
First, let's create myapp.if and add the following:
|
||||
The interface file creates the macros that other modules will use to gain access to my resources. This allows the module that created the type or attribute to define appropriate uses. Additionally, it provides a single point for documentation. Create myapp.if and add the following:
|
||||
<div id="codeblock">
|
||||
<pre>
|
||||
## <module name="myapp" layer="apps">
|
||||
|
@ -102,6 +103,7 @@ define(`myapp_read_log',`
|
|||
## </module>
|
||||
</pre>
|
||||
</div>
|
||||
<p>
|
||||
The first interface allows other domains to do a domain
|
||||
transition to myapp_t, by executing a program labeled myapp_exec_t.
|
||||
</p>
|
||||
|
|
Loading…
Reference in New Issue