|
Chris PeBenito |
650e75 |
# Copyright (C) 2005 Tresys Technology, LLC
|
|
Chris PeBenito |
650e75 |
|
|
Chris PeBenito |
650e75 |
policy_module(audit, 1.0)
|
|
Chris PeBenito |
650e75 |
|
|
Chris PeBenito |
650e75 |
########################################
|
|
Chris PeBenito |
650e75 |
#
|
|
Chris PeBenito |
650e75 |
# Declarations
|
|
Chris PeBenito |
650e75 |
#
|
|
Chris PeBenito |
650e75 |
|
|
Chris PeBenito |
650e75 |
type auditd_log_t;
|
|
Chris PeBenito |
650e75 |
logging_make_log_file(auditd_t,auditd_log_t)
|
|
Chris PeBenito |
650e75 |
|
|
Chris PeBenito |
650e75 |
type auditd_t;
|
|
Chris PeBenito |
650e75 |
type auditd_exec_t;
|
|
Chris PeBenito |
650e75 |
init_make_daemon_domain(auditd_t,auditd_exec_t)
|
|
Chris PeBenito |
650e75 |
|
|
Chris PeBenito |
650e75 |
type auditd_var_run_t;
|
|
Chris PeBenito |
650e75 |
files_make_daemon_runtime_file(auditd_var_run_t)
|
|
Chris PeBenito |
650e75 |
|
|
Chris PeBenito |
650e75 |
########################################
|
|
Chris PeBenito |
650e75 |
#
|
|
Chris PeBenito |
650e75 |
# Auditd local policy
|
|
Chris PeBenito |
650e75 |
#
|
|
Chris PeBenito |
650e75 |
|
|
Chris PeBenito |
650e75 |
allow auditd_t self:capability { audit_write audit_control };
|
|
Chris PeBenito |
650e75 |
dontaudit auditd_t self:capability sys_tty_config;
|
|
Chris PeBenito |
650e75 |
allow auditd_t self:netlink_audit_socket { bind create getattr nlmsg_read nlmsg_write read write };
|
|
Chris PeBenito |
650e75 |
|
|
Chris PeBenito |
650e75 |
allow auditd_t auditd_log_t:file { create ioctl read getattr lock write setattr append link unlink rename };
|
|
Chris PeBenito |
650e75 |
|
|
Chris PeBenito |
650e75 |
allow auditd_t auditd_var_run_t:file { getattr create read write append setattr unlink };
|
|
Chris PeBenito |
650e75 |
files_create_daemon_runtime_data(auditd_t,auditd_var_run_t)
|
|
Chris PeBenito |
650e75 |
|
|
Chris PeBenito |
650e75 |
kernel_read_kernel_sysctl(auditd_t)
|
|
Chris PeBenito |
650e75 |
kernel_read_hardware_state(auditd_t)
|
|
Chris PeBenito |
650e75 |
|
|
Chris PeBenito |
650e75 |
filesystem_get_all_filesystems_attributes(auditd_t)
|
|
Chris PeBenito |
650e75 |
|
|
Chris PeBenito |
650e75 |
terminal_ignore_use_console(auditd_t)
|
|
Chris PeBenito |
650e75 |
|
|
Chris PeBenito |
650e75 |
init_use_file_descriptors(auditd_t)
|
|
Chris PeBenito |
650e75 |
init_script_use_pseudoterminal(auditd_t)
|
|
Chris PeBenito |
650e75 |
|
|
Chris PeBenito |
650e75 |
domain_use_widely_inheritable_file_descriptors(auditd_t)
|
|
Chris PeBenito |
650e75 |
|
|
Chris PeBenito |
650e75 |
files_read_general_system_config(auditd_t)
|
|
Chris PeBenito |
650e75 |
|
|
Chris PeBenito |
650e75 |
logging_send_system_log_message(auditd_t)
|
|
Chris PeBenito |
650e75 |
|
|
Chris PeBenito |
650e75 |
libraries_use_dynamic_loader(auditd_t)
|
|
Chris PeBenito |
dd14d0 |
libraries_use_shared_libraries(auditd_t)
|
|
Chris PeBenito |
650e75 |
|
|
Chris PeBenito |
650e75 |
miscfiles_read_localization(auditd_t)
|
|
Chris PeBenito |
650e75 |
|
|
Chris PeBenito |
650e75 |
tunable_policy(`targeted_policy', `
|
|
Chris PeBenito |
650e75 |
terminal_ignore_use_general_physical_terminal(auditd_t)
|
|
Chris PeBenito |
650e75 |
terminal_ignore_use_general_pseudoterminal(auditd_t)
|
|
Chris PeBenito |
650e75 |
files_ignore_read_rootfs_file(auditd_t)
|
|
Chris PeBenito |
650e75 |
')dnl end targeted_policy tunable
|
|
Chris PeBenito |
650e75 |
|
|
Chris PeBenito |
650e75 |
optional_policy(`selinux.te',`
|
|
Chris PeBenito |
650e75 |
selinux_newrole_sigchld(auditd_t)
|
|
Chris PeBenito |
650e75 |
')
|
|
Chris PeBenito |
650e75 |
|
|
Chris PeBenito |
650e75 |
optional_policy(`udev.te', `
|
|
Chris PeBenito |
650e75 |
udev_read_database(auditd_t)
|
|
Chris PeBenito |
650e75 |
')
|
|
Chris PeBenito |
650e75 |
|
|
Chris PeBenito |
650e75 |
ifdef(`TODO',`
|
|
Chris PeBenito |
650e75 |
allow auditd_t proc_t:dir r_dir_perms;
|
|
Chris PeBenito |
650e75 |
allow auditd_t proc_t:lnk_file read;
|
|
Chris PeBenito |
650e75 |
dontaudit auditd_t unpriv_userdomain:fd use;
|
|
Chris PeBenito |
650e75 |
allow auditd_t autofs_t:dir { search getattr };
|
|
Chris PeBenito |
650e75 |
dontaudit auditd_t sysadm_home_dir_t:dir search;
|
|
Chris PeBenito |
650e75 |
optional_policy(`rhgb.te', `
|
|
Chris PeBenito |
650e75 |
allow auditd_t rhgb_t:process sigchld;
|
|
Chris PeBenito |
650e75 |
allow auditd_t rhgb_t:fd use;
|
|
Chris PeBenito |
650e75 |
allow auditd_t rhgb_t:fifo_file { read write };
|
|
Chris PeBenito |
650e75 |
')
|
|
Chris PeBenito |
650e75 |
|
|
Chris PeBenito |
650e75 |
# cjp: this is questionable:
|
|
Chris PeBenito |
650e75 |
allow auditd_t sysadm_tty_device_t:chr_file rw_file_perms;
|
|
Chris PeBenito |
650e75 |
') dnl endif TODO
|