|
Chris PeBenito |
e32d52 |
## <summary>Policy for the kernel message logger and system logging daemon.</summary>
|
|
Chris PeBenito |
e181fe |
|
|
Chris PeBenito |
b4cd15 |
#######################################
|
|
Chris PeBenito |
cff75c |
## <summary>
|
|
Chris PeBenito |
cff75c |
## Make the specified type a file
|
|
Chris PeBenito |
cff75c |
## used for logs.
|
|
Chris PeBenito |
cff75c |
## </summary>
|
|
Chris PeBenito |
cff75c |
## <param name="file_type">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
cff75c |
## Type of the file to be used as a log.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
cff75c |
## </param>
|
|
Chris PeBenito |
b4cd15 |
#
|
|
Chris PeBenito |
199895 |
interface(`logging_log_file',`
|
|
Chris PeBenito |
139520 |
gen_require(`
|
|
Chris PeBenito |
139520 |
attribute logfile;
|
|
Chris PeBenito |
139520 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
8fd367 |
files_type($1)
|
|
Chris PeBenito |
a1fcff |
files_associate_tmp($1)
|
|
Chris PeBenito |
cff75c |
fs_associate_tmpfs($1)
|
|
Chris PeBenito |
0c73cd |
typeattribute $1 logfile;
|
|
Chris PeBenito |
b4cd15 |
')
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
fb1aee |
########################################
|
|
Chris PeBenito |
df00b2 |
## <summary>
|
|
Chris PeBenito |
bf080a |
## Read the audit log.
|
|
Chris PeBenito |
bf080a |
## </summary>
|
|
Chris PeBenito |
bf080a |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
bf080a |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
bf080a |
## </param>
|
|
Chris PeBenito |
bf080a |
#
|
|
Chris PeBenito |
bf080a |
interface(`logging_read_audit_log',`
|
|
Chris PeBenito |
bf080a |
gen_require(`
|
|
Chris PeBenito |
bf080a |
type auditd_log_t;
|
|
Chris PeBenito |
bf080a |
')
|
|
Chris PeBenito |
bf080a |
|
|
Chris PeBenito |
bf080a |
files_search_var($1)
|
|
Chris PeBenito |
bf080a |
allow $1 auditd_log_t:dir r_dir_perms;
|
|
Chris PeBenito |
bf080a |
allow $1 auditd_log_t:file r_file_perms;
|
|
Chris PeBenito |
bf080a |
')
|
|
Chris PeBenito |
bf080a |
|
|
Chris PeBenito |
bf080a |
########################################
|
|
Chris PeBenito |
bf080a |
## <summary>
|
|
Chris PeBenito |
33acca |
## Execute auditctl in the auditctl domain.
|
|
Chris PeBenito |
33acca |
## </summary>
|
|
Chris PeBenito |
33acca |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
33acca |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
33acca |
## </param>
|
|
Chris PeBenito |
33acca |
#
|
|
Chris PeBenito |
33acca |
interface(`logging_domtrans_auditctl',`
|
|
Chris PeBenito |
33acca |
gen_require(`
|
|
Chris PeBenito |
33acca |
type auditctl_t, auditctl_exec_t;
|
|
Chris PeBenito |
33acca |
')
|
|
Chris PeBenito |
33acca |
|
|
Chris PeBenito |
33acca |
domain_auto_trans($1,auditctl_exec_t,auditctl_t)
|
|
Chris PeBenito |
33acca |
|
|
Chris PeBenito |
33acca |
allow $1 auditctl_t:fd use;
|
|
Chris PeBenito |
33acca |
allow auditctl_t $1:fd use;
|
|
Chris PeBenito |
33acca |
allow auditctl_t $1:fifo_file rw_file_perms;
|
|
Chris PeBenito |
33acca |
allow auditctl_t $1:process sigchld;
|
|
Chris PeBenito |
33acca |
')
|
|
Chris PeBenito |
33acca |
|
|
Chris PeBenito |
33acca |
########################################
|
|
Chris PeBenito |
33acca |
## <summary>
|
|
Chris PeBenito |
3b9147 |
## Execute auditctl in the auditctl domain, and
|
|
Chris PeBenito |
3b9147 |
## allow the specified role the auditctl domain.
|
|
Chris PeBenito |
3b9147 |
## </summary>
|
|
Chris PeBenito |
3b9147 |
## <param name="domain">
|
|
Chris PeBenito |
3b9147 |
## <summary>
|
|
Chris PeBenito |
ac9db9 |
## Domain allowed access.
|
|
Chris PeBenito |
3b9147 |
## </summary>
|
|
Chris PeBenito |
3b9147 |
## </param>
|
|
Chris PeBenito |
3b9147 |
## <param name="role">
|
|
Chris PeBenito |
3b9147 |
## <summary>
|
|
Chris PeBenito |
3b9147 |
## The role to be allowed the auditctl domain.
|
|
Chris PeBenito |
3b9147 |
## </summary>
|
|
Chris PeBenito |
3b9147 |
## </param>
|
|
Chris PeBenito |
3b9147 |
## <param name="terminal">
|
|
Chris PeBenito |
3b9147 |
## <summary>
|
|
Chris PeBenito |
3b9147 |
## The type of the terminal allow the auditctl domain to use.
|
|
Chris PeBenito |
3b9147 |
## </summary>
|
|
Chris PeBenito |
3b9147 |
## </param>
|
|
Chris PeBenito |
3b9147 |
#
|
|
Chris PeBenito |
3b9147 |
interface(`logging_run_auditctl',`
|
|
Chris PeBenito |
3b9147 |
gen_require(`
|
|
Chris PeBenito |
3b9147 |
type auditctl_t;
|
|
Chris PeBenito |
3b9147 |
')
|
|
Chris PeBenito |
3b9147 |
|
|
Chris PeBenito |
3b9147 |
logging_domtrans_auditctl($1)
|
|
Chris PeBenito |
3b9147 |
role $2 types auditctl_t;
|
|
Chris PeBenito |
3b9147 |
allow auditctl_t $3:chr_file rw_term_perms;
|
|
Chris PeBenito |
3b9147 |
')
|
|
Chris PeBenito |
3b9147 |
|
|
Chris PeBenito |
3b9147 |
########################################
|
|
Chris PeBenito |
165b42 |
## <summary>
|
|
Chris PeBenito |
165b42 |
## Execute auditd in the auditd domain.
|
|
Chris PeBenito |
165b42 |
## </summary>
|
|
Chris PeBenito |
165b42 |
## <param name="domain">
|
|
Chris PeBenito |
165b42 |
## <summary>
|
|
Chris PeBenito |
165b42 |
## Domain allowed access.
|
|
Chris PeBenito |
165b42 |
## </summary>
|
|
Chris PeBenito |
165b42 |
## </param>
|
|
Chris PeBenito |
165b42 |
#
|
|
Chris PeBenito |
165b42 |
interface(`logging_domtrans_auditd',`
|
|
Chris PeBenito |
165b42 |
gen_require(`
|
|
Chris PeBenito |
165b42 |
type auditd_t, auditd_exec_t;
|
|
Chris PeBenito |
165b42 |
')
|
|
Chris PeBenito |
165b42 |
|
|
Chris PeBenito |
165b42 |
domain_auto_trans($1,auditd_exec_t,auditd_t)
|
|
Chris PeBenito |
165b42 |
|
|
Chris PeBenito |
165b42 |
allow auditd_t $1:fd use;
|
|
Chris PeBenito |
165b42 |
allow auditd_t $1:fifo_file rw_file_perms;
|
|
Chris PeBenito |
165b42 |
allow auditd_t $1:process sigchld;
|
|
Chris PeBenito |
165b42 |
')
|
|
Chris PeBenito |
165b42 |
|
|
Chris PeBenito |
165b42 |
########################################
|
|
Chris PeBenito |
165b42 |
## <summary>
|
|
Chris PeBenito |
165b42 |
## Execute auditd in the auditd domain, and
|
|
Chris PeBenito |
165b42 |
## allow the specified role the auditd domain.
|
|
Chris PeBenito |
165b42 |
## </summary>
|
|
Chris PeBenito |
165b42 |
## <param name="domain">
|
|
Chris PeBenito |
165b42 |
## <summary>
|
|
Chris PeBenito |
165b42 |
## Domain allowed access.
|
|
Chris PeBenito |
165b42 |
## </summary>
|
|
Chris PeBenito |
165b42 |
## </param>
|
|
Chris PeBenito |
165b42 |
## <param name="role">
|
|
Chris PeBenito |
165b42 |
## <summary>
|
|
Chris PeBenito |
165b42 |
## The role to be allowed the auditd domain.
|
|
Chris PeBenito |
165b42 |
## </summary>
|
|
Chris PeBenito |
165b42 |
## </param>
|
|
Chris PeBenito |
165b42 |
## <param name="terminal">
|
|
Chris PeBenito |
165b42 |
## <summary>
|
|
Chris PeBenito |
165b42 |
## The type of the terminal allow the auditd domain to use.
|
|
Chris PeBenito |
165b42 |
## </summary>
|
|
Chris PeBenito |
165b42 |
## </param>
|
|
Chris PeBenito |
165b42 |
#
|
|
Chris PeBenito |
165b42 |
interface(`logging_run_auditd',`
|
|
Chris PeBenito |
165b42 |
gen_require(`
|
|
Chris PeBenito |
165b42 |
type auditd_t;
|
|
Chris PeBenito |
165b42 |
')
|
|
Chris PeBenito |
165b42 |
|
|
Chris PeBenito |
165b42 |
logging_domtrans_auditd($1)
|
|
Chris PeBenito |
165b42 |
role $2 types auditd_t;
|
|
Chris PeBenito |
165b42 |
allow auditd_t $3:chr_file rw_term_perms;
|
|
Chris PeBenito |
165b42 |
')
|
|
Chris PeBenito |
165b42 |
|
|
Chris PeBenito |
165b42 |
########################################
|
|
Chris PeBenito |
165b42 |
## <summary>
|
|
Chris PeBenito |
165b42 |
## Manage the auditd configuration files.
|
|
Chris PeBenito |
165b42 |
## </summary>
|
|
Chris PeBenito |
165b42 |
## <param name="domain">
|
|
Chris PeBenito |
165b42 |
## <summary>
|
|
Chris PeBenito |
165b42 |
## Domain allowed access.
|
|
Chris PeBenito |
165b42 |
## </summary>
|
|
Chris PeBenito |
165b42 |
## </param>
|
|
Chris PeBenito |
165b42 |
#
|
|
Chris PeBenito |
165b42 |
interface(`logging_manage_audit_config',`
|
|
Chris PeBenito |
165b42 |
gen_require(`
|
|
Chris PeBenito |
165b42 |
type auditd_etc_t;
|
|
Chris PeBenito |
165b42 |
')
|
|
Chris PeBenito |
165b42 |
|
|
Chris PeBenito |
165b42 |
files_search_etc($1)
|
|
Chris PeBenito |
165b42 |
allow $1 auditd_etc_t:file create_file_perms;
|
|
Chris PeBenito |
165b42 |
')
|
|
Chris PeBenito |
165b42 |
|
|
Chris PeBenito |
165b42 |
########################################
|
|
Chris PeBenito |
165b42 |
## <summary>
|
|
Chris PeBenito |
165b42 |
## Manage the audit log.
|
|
Chris PeBenito |
165b42 |
## </summary>
|
|
Chris PeBenito |
165b42 |
## <param name="domain">
|
|
Chris PeBenito |
165b42 |
## <summary>
|
|
Chris PeBenito |
165b42 |
## Domain allowed access.
|
|
Chris PeBenito |
165b42 |
## </summary>
|
|
Chris PeBenito |
165b42 |
## </param>
|
|
Chris PeBenito |
165b42 |
#
|
|
Chris PeBenito |
165b42 |
interface(`logging_manage_audit_log',`
|
|
Chris PeBenito |
165b42 |
gen_require(`
|
|
Chris PeBenito |
165b42 |
type auditd_log_t;
|
|
Chris PeBenito |
165b42 |
')
|
|
Chris PeBenito |
165b42 |
|
|
Chris PeBenito |
165b42 |
files_search_var($1)
|
|
Chris PeBenito |
165b42 |
allow $1 auditd_log_t:dir create_dir_perms;
|
|
Chris PeBenito |
165b42 |
allow $1 auditd_log_t:file create_file_perms;
|
|
Chris PeBenito |
165b42 |
')
|
|
Chris PeBenito |
165b42 |
|
|
Chris PeBenito |
165b42 |
########################################
|
|
Chris PeBenito |
3b9147 |
## <summary>
|
|
Chris PeBenito |
df00b2 |
## Execute syslogd in the syslog domain.
|
|
Chris PeBenito |
df00b2 |
## </summary>
|
|
Chris PeBenito |
df00b2 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
ac9db9 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
df00b2 |
## </param>
|
|
Chris PeBenito |
df00b2 |
#
|
|
Chris PeBenito |
df00b2 |
interface(`logging_domtrans_syslog',`
|
|
Chris PeBenito |
df00b2 |
gen_require(`
|
|
Chris PeBenito |
df00b2 |
type syslogd_t, syslogd_exec_t;
|
|
Chris PeBenito |
df00b2 |
')
|
|
Chris PeBenito |
df00b2 |
|
|
Chris PeBenito |
df00b2 |
corecmd_search_sbin($1)
|
|
Chris PeBenito |
df00b2 |
domain_auto_trans($1,syslogd_exec_t,syslogd_t)
|
|
Chris PeBenito |
df00b2 |
|
|
Chris PeBenito |
df00b2 |
allow $1 syslogd_t:fd use;
|
|
Chris PeBenito |
df00b2 |
allow syslogd_t $1:fd use;
|
|
Chris PeBenito |
df00b2 |
allow syslogd_t $1:fifo_file rw_file_perms;
|
|
Chris PeBenito |
df00b2 |
allow syslogd_t $1:process sigchld;
|
|
Chris PeBenito |
df00b2 |
')
|
|
Chris PeBenito |
df00b2 |
|
|
Chris PeBenito |
df00b2 |
########################################
|
|
Chris PeBenito |
ac9db9 |
## <summary>
|
|
Chris PeBenito |
ac9db9 |
## Create an object in the log directory, with a private
|
|
Chris PeBenito |
ac9db9 |
## type using a type transition.
|
|
Chris PeBenito |
ac9db9 |
## </summary>
|
|
Chris PeBenito |
ac9db9 |
## <param name="domain">
|
|
Chris PeBenito |
ac9db9 |
## <summary>
|
|
Chris PeBenito |
ac9db9 |
## Domain allowed access.
|
|
Chris PeBenito |
ac9db9 |
## </summary>
|
|
Chris PeBenito |
ac9db9 |
## </param>
|
|
Chris PeBenito |
ac9db9 |
## <param name="private type">
|
|
Chris PeBenito |
ac9db9 |
## <summary>
|
|
Chris PeBenito |
ac9db9 |
## The type of the object to be created.
|
|
Chris PeBenito |
ac9db9 |
## </summary>
|
|
Chris PeBenito |
ac9db9 |
## </param>
|
|
Chris PeBenito |
ac9db9 |
## <param name="object">
|
|
Chris PeBenito |
ac9db9 |
## <summary>
|
|
Chris PeBenito |
ac9db9 |
## The object class of the object being created.
|
|
Chris PeBenito |
ac9db9 |
## </summary>
|
|
Chris PeBenito |
ac9db9 |
## </param>
|
|
Chris PeBenito |
fb1aee |
#
|
|
Chris PeBenito |
103fe2 |
interface(`logging_log_filetrans',`
|
|
Chris PeBenito |
139520 |
gen_require(`
|
|
Chris PeBenito |
139520 |
type var_log_t;
|
|
Chris PeBenito |
139520 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
1c1ac6 |
files_search_var($1)
|
|
Chris PeBenito |
0c73cd |
allow $1 var_log_t:dir rw_dir_perms;
|
|
Chris PeBenito |
1c1ac6 |
type_transition $1 var_log_t:$3 $2;
|
|
Chris PeBenito |
fb1aee |
')
|
|
Chris PeBenito |
fb1aee |
|
|
Chris PeBenito |
ac9db9 |
########################################
|
|
Chris PeBenito |
ac9db9 |
## <summary>
|
|
Chris PeBenito |
ac9db9 |
## Send system log messages.
|
|
Chris PeBenito |
ac9db9 |
## </summary>
|
|
Chris PeBenito |
ac9db9 |
## <param name="domain">
|
|
Chris PeBenito |
ac9db9 |
## <summary>
|
|
Chris PeBenito |
ac9db9 |
## Domain allowed access.
|
|
Chris PeBenito |
ac9db9 |
## </summary>
|
|
Chris PeBenito |
ac9db9 |
## </param>
|
|
Chris PeBenito |
8c7717 |
#
|
|
Chris PeBenito |
199895 |
interface(`logging_send_syslog_msg',`
|
|
Chris PeBenito |
139520 |
gen_require(`
|
|
Chris PeBenito |
139520 |
type syslogd_t, devlog_t;
|
|
Chris PeBenito |
139520 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
allow $1 devlog_t:lnk_file read;
|
|
Chris PeBenito |
cc41a9 |
allow $1 devlog_t:sock_file rw_file_perms;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
# the type of socket depends on the syslog daemon
|
|
Chris PeBenito |
0c73cd |
allow $1 syslogd_t:unix_dgram_socket sendto;
|
|
Chris PeBenito |
0c73cd |
allow $1 syslogd_t:unix_stream_socket connectto;
|
|
Chris PeBenito |
cc41a9 |
allow $1 self:unix_dgram_socket create_socket_perms;
|
|
Chris PeBenito |
cc41a9 |
allow $1 self:unix_stream_socket create_socket_perms;
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
# cjp: this should most likely be removed:
|
|
Chris PeBenito |
0fd9dc |
term_use_console($1)
|
|
Chris PeBenito |
8c7717 |
')
|
|
Chris PeBenito |
8c7717 |
|
|
Chris PeBenito |
daa0e0 |
########################################
|
|
Chris PeBenito |
f7ebea |
## <summary>
|
|
Chris PeBenito |
605ba2 |
## Read the auditd configuration files.
|
|
Chris PeBenito |
605ba2 |
## </summary>
|
|
Chris PeBenito |
605ba2 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
605ba2 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
605ba2 |
## </param>
|
|
Chris PeBenito |
605ba2 |
#
|
|
Chris PeBenito |
1815ba |
interface(`logging_read_audit_config',`
|
|
Chris PeBenito |
605ba2 |
gen_require(`
|
|
Chris PeBenito |
605ba2 |
type auditd_etc_t;
|
|
Chris PeBenito |
605ba2 |
')
|
|
Chris PeBenito |
605ba2 |
|
|
Chris PeBenito |
605ba2 |
files_search_etc($1)
|
|
Chris PeBenito |
605ba2 |
allow $1 auditd_etc_t:file r_file_perms;
|
|
Chris PeBenito |
605ba2 |
')
|
|
Chris PeBenito |
605ba2 |
|
|
Chris PeBenito |
605ba2 |
########################################
|
|
Chris PeBenito |
605ba2 |
## <summary>
|
|
Chris PeBenito |
414e41 |
## Allows the domain to open a file in the
|
|
Chris PeBenito |
414e41 |
## log directory, but does not allow the listing
|
|
Chris PeBenito |
414e41 |
## of the contents of the log directory.
|
|
Chris PeBenito |
f7ebea |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
ac9db9 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
3ce6cb |
#
|
|
Chris PeBenito |
199895 |
interface(`logging_search_logs',`
|
|
Chris PeBenito |
139520 |
gen_require(`
|
|
Chris PeBenito |
139520 |
type var_log_t;
|
|
Chris PeBenito |
139520 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
c9428d |
files_search_var($1)
|
|
Chris PeBenito |
0c73cd |
allow $1 var_log_t:dir search;
|
|
Chris PeBenito |
3ce6cb |
')
|
|
Chris PeBenito |
3ce6cb |
|
|
Chris PeBenito |
3ce6cb |
#######################################
|
|
Chris PeBenito |
96ce00 |
## <summary>
|
|
Chris PeBenito |
fbc0a2 |
## Do not audit attempts to search the var log directory.
|
|
Chris PeBenito |
fbc0a2 |
## </summary>
|
|
Chris PeBenito |
fbc0a2 |
## <param name="domain">
|
|
Chris PeBenito |
fbc0a2 |
## <summary>
|
|
Chris PeBenito |
fbc0a2 |
## Domain not to audit.
|
|
Chris PeBenito |
fbc0a2 |
## </summary>
|
|
Chris PeBenito |
fbc0a2 |
## </param>
|
|
Chris PeBenito |
fbc0a2 |
#
|
|
Chris PeBenito |
fbc0a2 |
interface(`logging_dontaudit_search_logs',`
|
|
Chris PeBenito |
fbc0a2 |
gen_require(`
|
|
Chris PeBenito |
fbc0a2 |
type var_log_t;
|
|
Chris PeBenito |
fbc0a2 |
')
|
|
Chris PeBenito |
fbc0a2 |
|
|
Chris PeBenito |
fbc0a2 |
dontaudit $1 var_log_t:dir search;
|
|
Chris PeBenito |
fbc0a2 |
')
|
|
Chris PeBenito |
fbc0a2 |
|
|
Chris PeBenito |
fbc0a2 |
#######################################
|
|
Chris PeBenito |
fbc0a2 |
## <summary>
|
|
Chris PeBenito |
f33561 |
## List the contents of the generic log directory (/var/log).
|
|
Chris PeBenito |
f33561 |
## </summary>
|
|
Chris PeBenito |
f33561 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
f33561 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
f33561 |
## </param>
|
|
Chris PeBenito |
f33561 |
#
|
|
Chris PeBenito |
f33561 |
interface(`logging_list_logs',`
|
|
Chris PeBenito |
f33561 |
gen_require(`
|
|
Chris PeBenito |
f33561 |
type var_log_t;
|
|
Chris PeBenito |
f33561 |
')
|
|
Chris PeBenito |
f33561 |
|
|
Chris PeBenito |
f33561 |
files_search_var($1)
|
|
Chris PeBenito |
f33561 |
allow $1 var_log_t:dir r_dir_perms;
|
|
Chris PeBenito |
f33561 |
')
|
|
Chris PeBenito |
f33561 |
|
|
Chris PeBenito |
f33561 |
#######################################
|
|
Chris PeBenito |
f33561 |
## <summary>
|
|
Chris PeBenito |
96ce00 |
## Read and write the generic log directory (/var/log).
|
|
Chris PeBenito |
96ce00 |
## </summary>
|
|
Chris PeBenito |
96ce00 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
ac9db9 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
96ce00 |
## </param>
|
|
Chris PeBenito |
96ce00 |
#
|
|
Chris PeBenito |
1815ba |
interface(`logging_rw_generic_log_dirs',`
|
|
Chris PeBenito |
96ce00 |
gen_require(`
|
|
Chris PeBenito |
96ce00 |
type var_log_t;
|
|
Chris PeBenito |
96ce00 |
')
|
|
Chris PeBenito |
96ce00 |
|
|
Chris PeBenito |
96ce00 |
files_search_var($1)
|
|
Chris PeBenito |
96ce00 |
allow $1 var_log_t:dir rw_dir_perms;
|
|
Chris PeBenito |
96ce00 |
')
|
|
Chris PeBenito |
96ce00 |
|
|
Chris PeBenito |
ac9db9 |
########################################
|
|
Chris PeBenito |
ac9db9 |
## <summary>
|
|
Chris PeBenito |
ac9db9 |
## Do not audit attempts to get the atttributes
|
|
Chris PeBenito |
ac9db9 |
## of any log files.
|
|
Chris PeBenito |
ac9db9 |
## </summary>
|
|
Chris PeBenito |
ac9db9 |
## <param name="domain">
|
|
Chris PeBenito |
ac9db9 |
## <summary>
|
|
Chris PeBenito |
ac9db9 |
## Domain allowed access.
|
|
Chris PeBenito |
ac9db9 |
## </summary>
|
|
Chris PeBenito |
ac9db9 |
## </param>
|
|
Chris PeBenito |
b16c6b |
#
|
|
Chris PeBenito |
199895 |
interface(`logging_dontaudit_getattr_all_logs',`
|
|
Chris PeBenito |
139520 |
gen_require(`
|
|
Chris PeBenito |
139520 |
attribute logfile;
|
|
Chris PeBenito |
139520 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
0c73cd |
dontaudit $1 logfile:file getattr;
|
|
Chris PeBenito |
b16c6b |
')
|
|
Chris PeBenito |
b16c6b |
|
|
Chris PeBenito |
ac9db9 |
########################################
|
|
Chris PeBenito |
ac9db9 |
## <summary>
|
|
Chris PeBenito |
ac9db9 |
## Append to all log files.
|
|
Chris PeBenito |
ac9db9 |
## </summary>
|
|
Chris PeBenito |
ac9db9 |
## <param name="domain">
|
|
Chris PeBenito |
ac9db9 |
## <summary>
|
|
Chris PeBenito |
ac9db9 |
## Domain allowed access.
|
|
Chris PeBenito |
ac9db9 |
## </summary>
|
|
Chris PeBenito |
ac9db9 |
## </param>
|
|
Chris PeBenito |
b4cd15 |
#
|
|
Chris PeBenito |
199895 |
interface(`logging_append_all_logs',`
|
|
Chris PeBenito |
139520 |
gen_require(`
|
|
Chris PeBenito |
139520 |
attribute logfile;
|
|
Chris PeBenito |
139520 |
type var_log_t;
|
|
Chris PeBenito |
139520 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
c9428d |
files_search_var($1)
|
|
Chris PeBenito |
cc41a9 |
allow $1 var_log_t:dir r_dir_perms;
|
|
Chris PeBenito |
0c73cd |
allow $1 logfile:file { getattr append };
|
|
Chris PeBenito |
b4cd15 |
')
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
ac9db9 |
########################################
|
|
Chris PeBenito |
ac9db9 |
## <summary>
|
|
Chris PeBenito |
ac9db9 |
## Read all log files.
|
|
Chris PeBenito |
ac9db9 |
## </summary>
|
|
Chris PeBenito |
ac9db9 |
## <param name="domain">
|
|
Chris PeBenito |
ac9db9 |
## <summary>
|
|
Chris PeBenito |
ac9db9 |
## Domain allowed access.
|
|
Chris PeBenito |
ac9db9 |
## </summary>
|
|
Chris PeBenito |
ac9db9 |
## </param>
|
|
Chris PeBenito |
b4cd15 |
#
|
|
Chris PeBenito |
199895 |
interface(`logging_read_all_logs',`
|
|
Chris PeBenito |
139520 |
gen_require(`
|
|
Chris PeBenito |
139520 |
attribute logfile;
|
|
Chris PeBenito |
139520 |
type var_log_t;
|
|
Chris PeBenito |
139520 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
c9428d |
files_search_var($1)
|
|
Chris PeBenito |
cc41a9 |
allow $1 var_log_t:dir r_dir_perms;
|
|
Chris PeBenito |
cc41a9 |
allow $1 logfile:file r_file_perms;
|
|
Chris PeBenito |
b4cd15 |
')
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
8fd367 |
########################################
|
|
Chris PeBenito |
8fd367 |
## <summary>
|
|
Chris PeBenito |
8fd367 |
## Execute all log files in the caller domain.
|
|
Chris PeBenito |
8fd367 |
## </summary>
|
|
Chris PeBenito |
8fd367 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
ac9db9 |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
8fd367 |
## </param>
|
|
Chris PeBenito |
96ce00 |
#
|
|
Chris PeBenito |
8fd367 |
# cjp: not sure why this is needed. This was added
|
|
Chris PeBenito |
8fd367 |
# because of logrotate.
|
|
Chris PeBenito |
96ce00 |
interface(`logging_exec_all_logs',`
|
|
Chris PeBenito |
96ce00 |
gen_require(`
|
|
Chris PeBenito |
96ce00 |
attribute logfile;
|
|
Chris PeBenito |
96ce00 |
')
|
|
Chris PeBenito |
96ce00 |
|
|
Chris PeBenito |
96ce00 |
files_search_var($1)
|
|
Chris PeBenito |
96ce00 |
allow $1 logfile:dir r_dir_perms;
|
|
Chris PeBenito |
96ce00 |
can_exec($1,logfile)
|
|
Chris PeBenito |
96ce00 |
')
|
|
Chris PeBenito |
96ce00 |
|
|
Chris PeBenito |
ac9db9 |
########################################
|
|
Chris PeBenito |
ac9db9 |
## <summary>
|
|
Chris PeBenito |
ac9db9 |
## Create, read, write, and delete all log files.
|
|
Chris PeBenito |
ac9db9 |
## </summary>
|
|
Chris PeBenito |
ac9db9 |
## <param name="domain">
|
|
Chris PeBenito |
ac9db9 |
## <summary>
|
|
Chris PeBenito |
ac9db9 |
## Domain allowed access.
|
|
Chris PeBenito |
ac9db9 |
## </summary>
|
|
Chris PeBenito |
ac9db9 |
## </param>
|
|
Chris PeBenito |
96ce00 |
#
|
|
Chris PeBenito |
96ce00 |
interface(`logging_manage_all_logs',`
|
|
Chris PeBenito |
96ce00 |
gen_require(`
|
|
Chris PeBenito |
96ce00 |
attribute logfile;
|
|
Chris PeBenito |
96ce00 |
')
|
|
Chris PeBenito |
96ce00 |
|
|
Chris PeBenito |
96ce00 |
files_search_var($1)
|
|
Chris PeBenito |
96ce00 |
allow $1 logfile:dir rw_dir_perms;
|
|
Chris PeBenito |
96ce00 |
allow $1 logfile:lnk_file read;
|
|
Chris PeBenito |
96ce00 |
allow $1 logfile:file create_file_perms;
|
|
Chris PeBenito |
96ce00 |
')
|
|
Chris PeBenito |
96ce00 |
|
|
Chris PeBenito |
ac9db9 |
########################################
|
|
Chris PeBenito |
ac9db9 |
## <summary>
|
|
Chris PeBenito |
ac9db9 |
## Read generic log files.
|
|
Chris PeBenito |
ac9db9 |
## </summary>
|
|
Chris PeBenito |
ac9db9 |
## <param name="domain">
|
|
Chris PeBenito |
ac9db9 |
## <summary>
|
|
Chris PeBenito |
ac9db9 |
## Domain allowed access.
|
|
Chris PeBenito |
ac9db9 |
## </summary>
|
|
Chris PeBenito |
ac9db9 |
## </param>
|
|
Chris PeBenito |
24280a |
#
|
|
Chris PeBenito |
199895 |
interface(`logging_read_generic_logs',`
|
|
Chris PeBenito |
139520 |
gen_require(`
|
|
Chris PeBenito |
139520 |
type var_log_t;
|
|
Chris PeBenito |
139520 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
c9428d |
files_search_var($1)
|
|
Chris PeBenito |
cc41a9 |
allow $1 var_log_t:dir r_dir_perms;
|
|
Chris PeBenito |
cc41a9 |
allow $1 var_log_t:file r_file_perms;
|
|
Chris PeBenito |
24280a |
')
|
|
Chris PeBenito |
24280a |
|
|
Chris PeBenito |
ac9db9 |
########################################
|
|
Chris PeBenito |
ac9db9 |
## <summary>
|
|
Chris PeBenito |
ac9db9 |
## Write generic log files.
|
|
Chris PeBenito |
ac9db9 |
## </summary>
|
|
Chris PeBenito |
ac9db9 |
## <param name="domain">
|
|
Chris PeBenito |
ac9db9 |
## <summary>
|
|
Chris PeBenito |
ac9db9 |
## Domain allowed access.
|
|
Chris PeBenito |
ac9db9 |
## </summary>
|
|
Chris PeBenito |
ac9db9 |
## </param>
|
|
Chris PeBenito |
d490eb |
#
|
|
Chris PeBenito |
199895 |
interface(`logging_write_generic_logs',`
|
|
Chris PeBenito |
139520 |
gen_require(`
|
|
Chris PeBenito |
139520 |
type var_log_t;
|
|
Chris PeBenito |
139520 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
c9428d |
files_search_var($1)
|
|
Chris PeBenito |
cc41a9 |
allow $1 var_log_t:dir r_dir_perms;
|
|
Chris PeBenito |
0c73cd |
allow $1 var_log_t:file { getattr write };
|
|
Chris PeBenito |
d490eb |
')
|
|
Chris PeBenito |
d490eb |
|
|
Chris PeBenito |
0907bd |
########################################
|
|
Chris PeBenito |
0907bd |
## <summary>
|
|
Chris PeBenito |
0907bd |
## Read and write generic log files.
|
|
Chris PeBenito |
0907bd |
## </summary>
|
|
Chris PeBenito |
0907bd |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
0907bd |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
0907bd |
## </param>
|
|
Chris PeBenito |
b4cd15 |
#
|
|
Chris PeBenito |
199895 |
interface(`logging_rw_generic_logs',`
|
|
Chris PeBenito |
139520 |
gen_require(`
|
|
Chris PeBenito |
139520 |
type var_log_t;
|
|
Chris PeBenito |
139520 |
')
|
|
Chris PeBenito |
0c73cd |
|
|
Chris PeBenito |
c9428d |
files_search_var($1)
|
|
Chris PeBenito |
cc41a9 |
allow $1 var_log_t:dir r_dir_perms;
|
|
Chris PeBenito |
cc41a9 |
allow $1 var_log_t:file rw_file_perms;
|
|
Chris PeBenito |
b4cd15 |
')
|
|
Chris PeBenito |
0907bd |
|
|
Chris PeBenito |
0907bd |
########################################
|
|
Chris PeBenito |
0907bd |
## <summary>
|
|
Chris PeBenito |
0907bd |
## Create, read, write, and delete
|
|
Chris PeBenito |
0907bd |
## generic log files.
|
|
Chris PeBenito |
0907bd |
## </summary>
|
|
Chris PeBenito |
0907bd |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
0907bd |
## Domain allowed access.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
0907bd |
## </param>
|
|
Chris PeBenito |
0907bd |
#
|
|
Chris PeBenito |
0907bd |
interface(`logging_manage_generic_logs',`
|
|
Chris PeBenito |
0907bd |
gen_require(`
|
|
Chris PeBenito |
0907bd |
type var_log_t;
|
|
Chris PeBenito |
0907bd |
')
|
|
Chris PeBenito |
0907bd |
|
|
Chris PeBenito |
0907bd |
files_search_var($1)
|
|
Chris PeBenito |
0907bd |
allow $1 var_log_t:dir rw_dir_perms;
|
|
Chris PeBenito |
0907bd |
allow $1 var_log_t:file create_file_perms;
|
|
Chris PeBenito |
0907bd |
')
|