2005-10-22 21:55:39 +00:00
|
|
|
|
2005-12-09 16:38:39 +00:00
|
|
|
policy_module(pegasus,1.1.0)
|
2005-10-22 21:55:39 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type pegasus_t;
|
|
|
|
type pegasus_exec_t;
|
|
|
|
init_daemon_domain(pegasus_t,pegasus_exec_t)
|
|
|
|
|
|
|
|
type pegasus_data_t;
|
|
|
|
files_type(pegasus_data_t)
|
|
|
|
|
2005-11-25 15:51:50 +00:00
|
|
|
type pegasus_tmp_t;
|
|
|
|
files_tmp_file(pegasus_tmp_t)
|
|
|
|
|
2005-10-22 21:55:39 +00:00
|
|
|
type pegasus_conf_t;
|
|
|
|
files_type(pegasus_conf_t)
|
|
|
|
|
|
|
|
type pegasus_mof_t;
|
|
|
|
files_type(pegasus_mof_t)
|
|
|
|
|
|
|
|
type pegasus_var_run_t;
|
|
|
|
files_pid_file(pegasus_var_run_t)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow pegasus_t self:capability { dac_override net_bind_service audit_write };
|
|
|
|
dontaudit pegasus_t self:capability sys_tty_config;
|
2005-11-25 15:51:50 +00:00
|
|
|
allow pegasus_t self:process signal;
|
2005-10-22 21:55:39 +00:00
|
|
|
allow pegasus_t self:fifo_file rw_file_perms;
|
|
|
|
allow pegasus_t self:unix_dgram_socket create_socket_perms;
|
|
|
|
allow pegasus_t self:unix_stream_socket create_stream_socket_perms;
|
|
|
|
allow pegasus_t self:netlink_audit_socket { create_netlink_socket_perms nlmsg_relay };
|
|
|
|
allow pegasus_t self:tcp_socket create_stream_socket_perms;
|
|
|
|
|
2005-11-25 15:51:50 +00:00
|
|
|
allow pegasus_t pegasus_conf_t:dir rw_dir_perms;
|
2005-11-18 16:12:30 +00:00
|
|
|
allow pegasus_t pegasus_conf_t:file { r_file_perms link unlink };
|
|
|
|
allow pegasus_t pegasus_conf_t:lnk_file r_file_perms;
|
2005-10-22 21:55:39 +00:00
|
|
|
|
|
|
|
allow pegasus_t pegasus_data_t:dir rw_dir_perms;
|
|
|
|
allow pegasus_t pegasus_data_t:file create_file_perms;
|
|
|
|
allow pegasus_t pegasus_data_t:lnk_file create_lnk_perms;
|
2005-11-25 15:51:50 +00:00
|
|
|
type_transition pegasus_t pegasus_conf_t:{ file dir } pegasus_data_t;
|
2005-10-22 21:55:39 +00:00
|
|
|
|
|
|
|
allow pegasus_t pegasus_mof_t:dir r_dir_perms;
|
|
|
|
allow pegasus_t pegasus_mof_t:file r_file_perms;
|
|
|
|
allow pegasus_t pegasus_mof_t:lnk_file { getattr read };
|
|
|
|
|
2005-11-25 15:51:50 +00:00
|
|
|
allow pegasus_t pegasus_tmp_t:dir create_dir_perms;
|
|
|
|
allow pegasus_t pegasus_tmp_t:file create_file_perms;
|
2006-02-21 18:40:44 +00:00
|
|
|
files_tmp_filetrans(pegasus_t, pegasus_tmp_t, { file dir })
|
2005-11-25 15:51:50 +00:00
|
|
|
|
2005-10-22 21:55:39 +00:00
|
|
|
allow pegasus_t pegasus_var_run_t:file create_file_perms;
|
2005-11-25 15:51:50 +00:00
|
|
|
allow pegasus_t pegasus_var_run_t:sock_file { create setattr unlink };
|
2005-10-22 21:55:39 +00:00
|
|
|
allow pegasus_t pegasus_var_run_t:dir rw_dir_perms;
|
2006-02-21 18:40:44 +00:00
|
|
|
files_pid_filetrans(pegasus_t,pegasus_var_run_t)
|
2005-10-22 21:55:39 +00:00
|
|
|
|
2006-01-31 16:49:43 +00:00
|
|
|
kernel_read_kernel_sysctls(pegasus_t)
|
|
|
|
kernel_read_fs_sysctls(pegasus_t)
|
2005-10-22 21:55:39 +00:00
|
|
|
kernel_read_system_state(pegasus_t)
|
|
|
|
kernel_search_vm_sysctl(pegasus_t)
|
|
|
|
|
|
|
|
corenet_tcp_sendrecv_all_if(pegasus_t)
|
|
|
|
corenet_raw_sendrecv_all_if(pegasus_t)
|
|
|
|
corenet_tcp_sendrecv_all_nodes(pegasus_t)
|
|
|
|
corenet_raw_sendrecv_all_nodes(pegasus_t)
|
|
|
|
corenet_tcp_sendrecv_all_ports(pegasus_t)
|
2005-12-06 19:59:50 +00:00
|
|
|
corenet_non_ipsec_sendrecv(pegasus_t)
|
2005-10-22 21:55:39 +00:00
|
|
|
corenet_tcp_bind_all_nodes(pegasus_t)
|
|
|
|
corenet_tcp_bind_pegasus_http_port(pegasus_t)
|
|
|
|
corenet_tcp_bind_pegasus_https_port(pegasus_t)
|
|
|
|
corenet_tcp_connect_pegasus_http_port(pegasus_t)
|
|
|
|
corenet_tcp_connect_pegasus_https_port(pegasus_t)
|
|
|
|
|
|
|
|
dev_read_sysfs(pegasus_t)
|
|
|
|
dev_read_urand(pegasus_t)
|
|
|
|
|
|
|
|
fs_getattr_all_fs(pegasus_t)
|
|
|
|
fs_search_auto_mountpoints(pegasus_t)
|
|
|
|
|
|
|
|
term_dontaudit_use_console(pegasus_t)
|
|
|
|
|
|
|
|
auth_use_nsswitch(pegasus_t)
|
2005-11-25 15:51:50 +00:00
|
|
|
auth_domtrans_chk_passwd(pegasus_t)
|
2005-10-22 21:55:39 +00:00
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
domain_use_interactive_fds(pegasus_t)
|
2005-11-23 19:02:40 +00:00
|
|
|
domain_read_all_domains_state(pegasus_t)
|
2005-10-22 21:55:39 +00:00
|
|
|
|
|
|
|
files_read_etc_files(pegasus_t)
|
|
|
|
files_list_var_lib(pegasus_t)
|
|
|
|
files_read_var_lib_files(pegasus_t)
|
|
|
|
files_read_var_lib_symlinks(pegasus_t)
|
|
|
|
|
|
|
|
init_use_fd(pegasus_t)
|
2006-02-02 21:08:12 +00:00
|
|
|
init_use_script_ptys(pegasus_t)
|
2006-01-18 18:08:39 +00:00
|
|
|
init_rw_utmp(pegasus_t)
|
2005-10-22 21:55:39 +00:00
|
|
|
|
|
|
|
libs_use_ld_so(pegasus_t)
|
|
|
|
libs_use_shared_libs(pegasus_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(pegasus_t)
|
|
|
|
|
|
|
|
sysnet_read_config(pegasus_t)
|
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
userdom_dontaudit_use_unpriv_user_fds(pegasus_t)
|
2006-02-21 18:40:44 +00:00
|
|
|
userdom_dontaudit_search_sysadm_home_dirs(pegasus_t)
|
2005-10-22 21:55:39 +00:00
|
|
|
|
|
|
|
ifdef(`targeted_policy', `
|
2006-02-02 21:08:12 +00:00
|
|
|
term_dontaudit_use_unallocated_ttys(pegasus_t)
|
|
|
|
term_dontaudit_use_generic_ptys(pegasus_t)
|
2006-01-31 19:21:01 +00:00
|
|
|
files_dontaudit_read_root_files(pegasus_t)
|
2005-10-22 21:55:39 +00:00
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`logging',`
|
2005-10-22 21:55:39 +00:00
|
|
|
logging_send_syslog_msg(pegasus_t)
|
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`nscd',`
|
2006-02-02 21:08:12 +00:00
|
|
|
nscd_socket_use(pegasus_t)
|
2005-10-22 21:55:39 +00:00
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`selinuxutil',`
|
2005-10-22 21:55:39 +00:00
|
|
|
seutil_sigchld_newrole(pegasus_t)
|
|
|
|
seutil_dontaudit_read_config(pegasus_t)
|
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`udev',`
|
2005-10-22 21:55:39 +00:00
|
|
|
udev_read_db(pegasus_t)
|
|
|
|
')
|