Merge pull request #368 from jpds/admin-log-watch

This commit is contained in:
Chris PeBenito 2021-04-26 13:54:23 -04:00
commit 149ee62c7b
3 changed files with 42 additions and 0 deletions

View File

@ -38,6 +38,7 @@ init_exec(secadm_t)
logging_read_audit_log(secadm_t)
logging_read_generic_logs(secadm_t)
logging_read_audit_config(secadm_t)
logging_watch_audit_log(secadm_t)
optional_policy(`
aide_run(secadm_t, secadm_r)

View File

@ -40,6 +40,9 @@ corenet_ib_manage_subnet_unlabeled_endports(sysadm_t)
dev_read_kmsg(sysadm_t)
logging_watch_all_logs(sysadm_t)
logging_watch_audit_log(sysadm_t)
mls_process_read_all_levels(sysadm_t)
selinux_read_policy(sysadm_t)

View File

@ -146,6 +146,25 @@ interface(`logging_read_audit_log',`
dontaudit $1 auditd_log_t:file map;
')
########################################
## <summary>
## Watch the audit log.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
## <rolecap/>
#
interface(`logging_watch_audit_log',`
gen_require(`
type auditd_log_t;
')
allow $1 auditd_log_t:file watch;
')
########################################
## <summary>
## Execute auditctl in the auditctl domain.
@ -1072,6 +1091,25 @@ interface(`logging_read_all_logs',`
read_files_pattern($1, logfile, logfile)
')
########################################
## <summary>
## Watch all log files.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
## <rolecap/>
#
interface(`logging_watch_all_logs',`
gen_require(`
attribute logfile;
')
allow $1 logfile:file watch;
')
########################################
## <summary>
## Execute all log files in the caller domain.