|
Chris PeBenito |
96ce00 |
## <summary>Rotate and archive system logs</summary>
|
|
Chris PeBenito |
96ce00 |
|
|
Chris PeBenito |
96ce00 |
########################################
|
|
Chris PeBenito |
96ce00 |
## <summary>
|
|
Chris PeBenito |
96ce00 |
## Execute logrotate in the logrotate domain.
|
|
Chris PeBenito |
96ce00 |
## </summary>
|
|
Chris PeBenito |
96ce00 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Dominick Grift |
77e4b5 |
## Domain allowed to transition.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
96ce00 |
## </param>
|
|
Chris PeBenito |
96ce00 |
#
|
|
Chris PeBenito |
96ce00 |
interface(`logrotate_domtrans',`
|
|
Chris PeBenito |
96ce00 |
gen_require(`
|
|
Chris PeBenito |
96ce00 |
type logrotate_t, logrotate_exec_t;
|
|
Chris PeBenito |
96ce00 |
')
|
|
Chris PeBenito |
96ce00 |
|
|
Chris PeBenito |
0bfccd |
domtrans_pattern($1, logrotate_exec_t, logrotate_t)
|
|
Chris PeBenito |
96ce00 |
')
|
|
Chris PeBenito |
96ce00 |
|
|
Chris PeBenito |
96ce00 |
########################################
|
|
Chris PeBenito |
96ce00 |
## <summary>
|
|
Chris PeBenito |
96ce00 |
## Execute logrotate in the logrotate domain, and
|
|
Chris PeBenito |
96ce00 |
## allow the specified role the logrotate domain.
|
|
Chris PeBenito |
96ce00 |
## </summary>
|
|
Chris PeBenito |
96ce00 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Dominick Grift |
77e4b5 |
## Domain allowed to transition.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
96ce00 |
## </param>
|
|
Chris PeBenito |
96ce00 |
## <param name="role">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
a7ee7f |
## Role allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
96ce00 |
## </param>
|
|
Chris PeBenito |
bbcd3c |
## <rolecap/>
|
|
Chris PeBenito |
96ce00 |
#
|
|
Chris PeBenito |
96ce00 |
interface(`logrotate_run',`
|
|
Chris PeBenito |
96ce00 |
gen_require(`
|
|
Chris PeBenito |
96ce00 |
type logrotate_t;
|
|
Chris PeBenito |
96ce00 |
')
|
|
Chris PeBenito |
96ce00 |
|
|
Chris PeBenito |
96ce00 |
logrotate_domtrans($1)
|
|
Chris PeBenito |
96ce00 |
role $2 types logrotate_t;
|
|
Chris PeBenito |
96ce00 |
')
|
|
Chris PeBenito |
96ce00 |
|
|
Chris PeBenito |
96ce00 |
########################################
|
|
Chris PeBenito |
96ce00 |
## <summary>
|
|
Chris PeBenito |
96ce00 |
## Execute logrotate in the caller domain.
|
|
Chris PeBenito |
96ce00 |
## </summary>
|
|
Chris PeBenito |
96ce00 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
a72e42 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
96ce00 |
## </param>
|
|
Chris PeBenito |
96ce00 |
#
|
|
Chris PeBenito |
96ce00 |
interface(`logrotate_exec',`
|
|
Chris PeBenito |
96ce00 |
gen_require(`
|
|
Chris PeBenito |
96ce00 |
type logrotate_exec_t;
|
|
Chris PeBenito |
96ce00 |
')
|
|
Chris PeBenito |
96ce00 |
|
|
Chris PeBenito |
0bfccd |
can_exec($1, logrotate_exec_t)
|
|
Chris PeBenito |
96ce00 |
')
|
|
Chris PeBenito |
96ce00 |
|
|
Chris PeBenito |
96ce00 |
########################################
|
|
Chris PeBenito |
96ce00 |
## <summary>
|
|
Chris PeBenito |
77f6e2 |
## Inherit and use logrotate file descriptors.
|
|
Chris PeBenito |
77f6e2 |
## </summary>
|
|
Chris PeBenito |
77f6e2 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
77f6e2 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
77f6e2 |
## </param>
|
|
Chris PeBenito |
77f6e2 |
#
|
|
Chris PeBenito |
1c1ac6 |
interface(`logrotate_use_fds',`
|
|
Chris PeBenito |
77f6e2 |
gen_require(`
|
|
Chris PeBenito |
77f6e2 |
type logrotate_t;
|
|
Chris PeBenito |
77f6e2 |
')
|
|
Chris PeBenito |
77f6e2 |
|
|
Chris PeBenito |
77f6e2 |
allow $1 logrotate_t:fd use;
|
|
Chris PeBenito |
77f6e2 |
')
|
|
Chris PeBenito |
77f6e2 |
|
|
Chris PeBenito |
77f6e2 |
########################################
|
|
Chris PeBenito |
77f6e2 |
## <summary>
|
|
Chris PeBenito |
96ce00 |
## Do not audit attempts to inherit logrotate file descriptors.
|
|
Chris PeBenito |
96ce00 |
## </summary>
|
|
Chris PeBenito |
96ce00 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
a7ee7f |
## Domain to not audit.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
96ce00 |
## </param>
|
|
Chris PeBenito |
96ce00 |
#
|
|
Chris PeBenito |
1c1ac6 |
interface(`logrotate_dontaudit_use_fds',`
|
|
Chris PeBenito |
96ce00 |
gen_require(`
|
|
Chris PeBenito |
96ce00 |
type logrotate_t;
|
|
Chris PeBenito |
96ce00 |
')
|
|
Chris PeBenito |
96ce00 |
|
|
Chris PeBenito |
96ce00 |
dontaudit $1 logrotate_t:fd use;
|
|
Chris PeBenito |
96ce00 |
')
|
|
Chris PeBenito |
246839 |
|
|
Chris PeBenito |
246839 |
########################################
|
|
Chris PeBenito |
246839 |
## <summary>
|
|
Chris PeBenito |
246839 |
## Read a logrotate temporary files.
|
|
Chris PeBenito |
246839 |
## </summary>
|
|
Chris PeBenito |
246839 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
a7ee7f |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
246839 |
## </param>
|
|
Chris PeBenito |
246839 |
#
|
|
Chris PeBenito |
246839 |
interface(`logrotate_read_tmp_files',`
|
|
Chris PeBenito |
246839 |
gen_require(`
|
|
Chris PeBenito |
246839 |
type logrotate_tmp_t;
|
|
Chris PeBenito |
246839 |
')
|
|
Chris PeBenito |
246839 |
|
|
Chris PeBenito |
246839 |
files_search_tmp($1)
|
|
Chris PeBenito |
c0868a |
allow $1 logrotate_tmp_t:file read_file_perms;
|
|
Chris PeBenito |
246839 |
')
|