2005-05-26 15:50:53 +00:00
|
|
|
|
|
|
|
policy_module(dmesg, 1.0)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type dmesg_t;
|
|
|
|
type dmesg_exec_t;
|
2005-06-13 17:35:46 +00:00
|
|
|
init_system_domain(dmesg_t,dmesg_exec_t)
|
2005-05-26 15:50:53 +00:00
|
|
|
role system_r types dmesg_t;
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow dmesg_t self:capability sys_admin;
|
|
|
|
dontaudit dmesg_t self:capability sys_tty_config;
|
|
|
|
|
2005-06-09 17:21:52 +00:00
|
|
|
allow dmesg_t self:process signal_perms;
|
2005-05-26 15:50:53 +00:00
|
|
|
|
|
|
|
kernel_read_kernel_sysctl(dmesg_t)
|
2005-06-14 19:56:46 +00:00
|
|
|
dev_read_sysfs(dmesg_t)
|
2005-05-26 15:50:53 +00:00
|
|
|
kernel_read_ring_buffer(dmesg_t)
|
|
|
|
kernel_clear_ring_buffer(dmesg_t)
|
|
|
|
kernel_change_ring_buffer_level(dmesg_t)
|
|
|
|
|
2005-06-10 01:01:13 +00:00
|
|
|
term_dontaudit_use_console(dmesg_t)
|
2005-05-26 15:50:53 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
domain_use_wide_inherit_fd(dmesg_t)
|
2005-05-26 15:50:53 +00:00
|
|
|
|
2005-06-17 17:59:26 +00:00
|
|
|
files_list_etc(dmesg_t)
|
2005-05-31 21:25:45 +00:00
|
|
|
# for when /usr is not mounted:
|
2005-06-13 17:35:46 +00:00
|
|
|
files_dontaudit_search_isid_type_dir(dmesg_t)
|
2005-05-26 20:38:45 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
init_use_fd(dmesg_t)
|
|
|
|
init_use_script_pty(dmesg_t)
|
2005-05-26 15:50:53 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
libs_use_ld_so(dmesg_t)
|
|
|
|
libs_use_shared_libs(dmesg_t)
|
2005-05-26 15:50:53 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
logging_send_syslog_msg(dmesg_t)
|
|
|
|
logging_write_generic_logs(dmesg_t)
|
2005-05-26 15:50:53 +00:00
|
|
|
|
|
|
|
miscfiles_read_localization(dmesg_t)
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
userdom_use_sysadm_terms(dmesg_t)
|
|
|
|
userdom_dontaudit_use_unpriv_user_fd(dmesg_t)
|
2005-05-26 15:50:53 +00:00
|
|
|
|
2005-06-07 18:45:47 +00:00
|
|
|
ifdef(`targeted_policy', `
|
2005-06-10 01:01:13 +00:00
|
|
|
term_dontaudit_use_unallocated_tty(dmesg_t)
|
2005-06-13 20:27:32 +00:00
|
|
|
term_dontaudit_use_generic_pty(dmesg_t)
|
2005-06-13 17:35:46 +00:00
|
|
|
files_dontaudit_read_root_file(dmesg_t)
|
2005-05-26 15:50:53 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`selinux.te',`
|
2005-06-14 20:48:34 +00:00
|
|
|
seutil_newrole_sigchld(dmesg_t)
|
2005-05-26 15:50:53 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`udev.te', `
|
2005-06-13 17:35:46 +00:00
|
|
|
udev_read_db(dmesg_t)
|
2005-05-26 15:50:53 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
ifdef(`TODO',`
|
|
|
|
allow dmesg_t proc_t:dir r_dir_perms;
|
|
|
|
allow dmesg_t proc_t:lnk_file read;
|
|
|
|
|
|
|
|
optional_policy(`rhgb.te', `
|
|
|
|
allow dmesg_t rhgb_t:process sigchld;
|
|
|
|
allow dmesg_t rhgb_t:fd use;
|
2005-06-09 17:21:52 +00:00
|
|
|
allow dmesg_t rhgb_t:fifo_file rw_file_perms;
|
2005-05-26 15:50:53 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
allow dmesg_t autofs_t:dir { search getattr };
|
|
|
|
') dnl endif TODO
|