2006-02-01 13:09:09 +00:00
|
|
|
## <summary>Myapp example policy</summary>
|
|
|
|
## <desc>
|
|
|
|
## <p>
|
2007-08-29 18:14:27 +00:00
|
|
|
## More descriptive text about myapp. The desc
|
|
|
|
## tag can also use p, ul, and ol
|
2006-02-01 13:09:09 +00:00
|
|
|
## 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">
|
2007-08-29 18:14:27 +00:00
|
|
|
## <summary>
|
2006-02-01 13:09:09 +00:00
|
|
|
## Domain allowed to transition.
|
2007-08-29 18:14:27 +00:00
|
|
|
## </summary>
|
2006-02-01 13:09:09 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`myapp_domtrans',`
|
2006-06-14 14:10:24 +00:00
|
|
|
gen_require(`
|
2006-02-01 13:09:09 +00:00
|
|
|
type myapp_t, myapp_exec_t;
|
|
|
|
')
|
|
|
|
|
2007-08-29 18:14:27 +00:00
|
|
|
domtrans_pattern($1,myapp_exec_t,myapp_t)
|
2006-02-01 13:09:09 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read myapp log files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2007-08-29 18:14:27 +00:00
|
|
|
## <summary>
|
2006-02-01 13:09:09 +00:00
|
|
|
## Domain allowed to read the log files.
|
2007-08-29 18:14:27 +00:00
|
|
|
## </summary>
|
2006-02-01 13:09:09 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`myapp_read_log',`
|
2006-06-14 14:10:24 +00:00
|
|
|
gen_require(`
|
2006-02-01 13:09:09 +00:00
|
|
|
type myapp_log_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
logging_search_logs($1)
|
2007-08-29 18:14:27 +00:00
|
|
|
allow $1 myapp_log_t:file read_file_perms;
|
2006-02-01 13:09:09 +00:00
|
|
|
')
|