1900668638
The latest revision of the labeled policy patches which enable both labeled and unlabeled policy support for NetLabel. This revision takes into account Chris' feedback from the first version and reduces the number of interface calls in each domain down to two at present: one for unlabeled access, one for NetLabel access. The older, transport layer specific interfaces, are still present for use by third-party modules but are not used in the default policy modules. trunk: Use netmsg initial SID for MLS-only Netlabel packets, from Paul Moore. This patch changes the policy to use the netmsg initial SID as the "base" SID/context for NetLabel packets which only have MLS security attributes. Currently we use the unlabeled initial SID which makes it very difficult to distinquish between actual unlabeled packets and those packets which have MLS security attributes.
127 lines
3.2 KiB
Plaintext
127 lines
3.2 KiB
Plaintext
|
|
policy_module(munin,1.2.2)
|
|
|
|
########################################
|
|
#
|
|
# Declarations
|
|
#
|
|
|
|
type munin_t alias lrrd_t;
|
|
type munin_exec_t alias lrrd_exec_t;
|
|
init_daemon_domain(munin_t,munin_exec_t)
|
|
|
|
type munin_etc_t alias lrrd_etc_t;
|
|
files_config_file(munin_etc_t)
|
|
|
|
type munin_log_t alias lrrd_log_t;
|
|
logging_log_file(munin_log_t)
|
|
|
|
type munin_tmp_t alias lrrd_tmp_t;
|
|
files_tmp_file(munin_tmp_t)
|
|
|
|
type munin_var_lib_t alias lrrd_var_lib_t;
|
|
files_type(munin_var_lib_t)
|
|
|
|
type munin_var_run_t alias lrrd_var_run_t;
|
|
files_pid_file(munin_var_run_t)
|
|
|
|
########################################
|
|
#
|
|
# Local policy
|
|
#
|
|
|
|
allow munin_t self:capability { setgid setuid };
|
|
dontaudit munin_t self:capability sys_tty_config;
|
|
allow munin_t self:process { getsched setsched signal_perms };
|
|
allow munin_t self:unix_stream_socket { create_stream_socket_perms connectto };
|
|
allow munin_t self:unix_dgram_socket { create_socket_perms sendto };
|
|
allow munin_t self:tcp_socket create_stream_socket_perms;
|
|
allow munin_t self:udp_socket create_socket_perms;
|
|
|
|
allow munin_t munin_etc_t:dir list_dir_perms;
|
|
read_files_pattern(munin_t,munin_etc_t,munin_etc_t)
|
|
read_lnk_files_pattern(munin_t,munin_etc_t,munin_etc_t)
|
|
files_search_etc(munin_t)
|
|
|
|
allow munin_t munin_log_t:file manage_file_perms;
|
|
logging_log_filetrans(munin_t,munin_log_t,file)
|
|
|
|
manage_dirs_pattern(munin_t,munin_tmp_t,munin_tmp_t)
|
|
manage_files_pattern(munin_t,munin_tmp_t,munin_tmp_t)
|
|
files_tmp_filetrans(munin_t, munin_tmp_t, { file dir })
|
|
|
|
# Allow access to the munin databases
|
|
manage_dirs_pattern(munin_t,munin_var_lib_t,munin_var_lib_t)
|
|
manage_files_pattern(munin_t,munin_var_lib_t,munin_var_lib_t)
|
|
manage_lnk_files_pattern(munin_t,munin_var_lib_t,munin_var_lib_t)
|
|
files_search_var_lib(munin_t)
|
|
|
|
manage_files_pattern(munin_t,munin_var_run_t,munin_var_run_t)
|
|
manage_sock_files_pattern(munin_t,munin_var_run_t,munin_var_run_t)
|
|
files_pid_filetrans(munin_t,munin_var_run_t,file)
|
|
|
|
kernel_read_system_state(munin_t)
|
|
kernel_read_kernel_sysctls(munin_t)
|
|
|
|
corecmd_exec_bin(munin_t)
|
|
|
|
corenet_all_recvfrom_unlabeled(munin_t)
|
|
corenet_all_recvfrom_netlabel(munin_t)
|
|
corenet_tcp_sendrecv_generic_if(munin_t)
|
|
corenet_udp_sendrecv_generic_if(munin_t)
|
|
corenet_tcp_sendrecv_all_nodes(munin_t)
|
|
corenet_udp_sendrecv_all_nodes(munin_t)
|
|
corenet_tcp_sendrecv_all_ports(munin_t)
|
|
corenet_udp_sendrecv_all_ports(munin_t)
|
|
|
|
dev_read_sysfs(munin_t)
|
|
dev_read_urand(munin_t)
|
|
|
|
domain_use_interactive_fds(munin_t)
|
|
|
|
files_read_etc_files(munin_t)
|
|
files_read_etc_runtime_files(munin_t)
|
|
files_read_usr_files(munin_t)
|
|
|
|
fs_getattr_all_fs(munin_t)
|
|
fs_search_auto_mountpoints(munin_t)
|
|
|
|
libs_use_ld_so(munin_t)
|
|
libs_use_shared_libs(munin_t)
|
|
|
|
logging_send_syslog_msg(munin_t)
|
|
|
|
miscfiles_read_localization(munin_t)
|
|
|
|
sysnet_read_config(munin_t)
|
|
|
|
userdom_dontaudit_use_unpriv_user_fds(munin_t)
|
|
userdom_dontaudit_search_sysadm_home_dirs(munin_t)
|
|
|
|
ifdef(`targeted_policy',`
|
|
term_dontaudit_use_unallocated_ttys(munin_t)
|
|
term_dontaudit_use_generic_ptys(munin_t)
|
|
files_dontaudit_read_root_files(munin_t)
|
|
')
|
|
|
|
optional_policy(`
|
|
# for accessing the output directory
|
|
apache_search_sys_content(munin_t)
|
|
')
|
|
|
|
optional_policy(`
|
|
cron_system_entry(munin_t,munin_exec_t)
|
|
')
|
|
|
|
optional_policy(`
|
|
nis_use_ypbind(munin_t)
|
|
')
|
|
|
|
optional_policy(`
|
|
seutil_sigchld_newrole(munin_t)
|
|
')
|
|
|
|
optional_policy(`
|
|
udev_read_db(munin_t)
|
|
')
|