2006-02-01 13:09:09 +00:00
|
|
|
|
2020-05-08 17:54:40 +00:00
|
|
|
policy_module(example,1.0.0) # a non-base module name must match the file name
|
2006-02-01 13:09:09 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# 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
|
|
|
|
#
|
|
|
|
|
2007-10-09 17:29:48 +00:00
|
|
|
allow myapp_t myapp_log_t:file { read_file_perms append_file_perms };
|
2006-02-01 13:09:09 +00:00
|
|
|
|
|
|
|
allow myapp_t myapp_tmp_t:file manage_file_perms;
|
2006-05-18 17:55:03 +00:00
|
|
|
files_tmp_filetrans(myapp_t,myapp_tmp_t,file)
|