File: example.te

package info (click to toggle)
refpolicy 2%3A2.20250213-10
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 17,924 kB
  • sloc: python: 2,642; makefile: 670; sh: 274; sed: 21; xml: 13; awk: 7
file content (28 lines) | stat: -rw-r--r-- 568 bytes parent folder | download | duplicates (2)
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

policy_module(example,1.0.0) # a non-base module name must match the file name

########################################
#
# Declarations
#

type myapp_t;
type myapp_exec_t;
domain_type(myapp_t)
domain_entry_file(myapp_t, myapp_exec_t)

type myapp_log_t;
logging_log_file(myapp_log_t)

type myapp_tmp_t;
files_tmp_file(myapp_tmp_t)

########################################
#
# Myapp local policy
#

allow myapp_t myapp_log_t:file { append_file_perms read_file_perms };

allow myapp_t myapp_tmp_t:file manage_file_perms;
files_tmp_filetrans(myapp_t,myapp_tmp_t,file)