File: example.if

package info (click to toggle)
refpolicy 0.0.20061018-5
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 7,488 kB
  • ctags: 415
  • sloc: xml: 55,156; python: 1,867; makefile: 463; sh: 457; ansic: 290; perl: 171; sed: 14; awk: 7
file content (57 lines) | stat: -rw-r--r-- 1,166 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
## <summary>Myapp example policy</summary>
## <desc>
##	<p>
##		More descriptive text about myapp.  The <desc>
##		tag can also use <p>, <ul>, and <ol>
##		html tags for formatting.
##	</p>
##	<p>
##		This policy supports the following myapp features:
##		<ul>
##		<li>Feature A</li>
##		<li>Feature B</li>
##		<li>Feature C</li>
##		</ul>
##	</p>
## </desc>
#

########################################
## <summary>
##	Execute a domain transition to run myapp.
## </summary>
## <param name="domain">
##	Domain allowed to transition.
## </param>
#
interface(`myapp_domtrans',`
	gen_require(`
		type myapp_t, myapp_exec_t;
	')

	domain_auto_trans($1,myapp_exec_t,myapp_t)

	allow $1 myapp_t:fd use;
	allow myapp_t $1:fd use;
	allow $1 myapp_t:fifo_file rw_file_perms;
	allow $1 myapp_t:process sigchld;
')

########################################
## <summary>
##	Read myapp log files.
## </summary>
## <param name="domain">
##	Domain allowed to read the log files.
## </param>
#
interface(`myapp_read_log',`
	gen_require(`
		type myapp_log_t;
	')

	logging_search_logs($1)
	allow $1 myapp_log_t:file r_file_perms;
')

# arch-tag: e3624959-d1f4-4546-850b-4a1f22f7018d