|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
f7925f |
policy_module(ldap,1.6.0)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
# Declarations
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type slapd_t;
|
|
Chris PeBenito |
17de1b |
type slapd_exec_t;
|
|
Chris PeBenito |
17de1b |
init_daemon_domain(slapd_t,slapd_exec_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type slapd_cert_t;
|
|
Chris PeBenito |
17de1b |
files_type(slapd_cert_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type slapd_db_t;
|
|
Chris PeBenito |
17de1b |
files_type(slapd_db_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type slapd_etc_t;
|
|
Chris PeBenito |
17de1b |
files_config_file(slapd_etc_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type slapd_lock_t;
|
|
Chris PeBenito |
17de1b |
files_lock_file(slapd_lock_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type slapd_replog_t;
|
|
Chris PeBenito |
17de1b |
files_type(slapd_replog_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type slapd_tmp_t;
|
|
Chris PeBenito |
17de1b |
files_tmp_file(slapd_tmp_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type slapd_var_run_t;
|
|
Chris PeBenito |
17de1b |
files_pid_file(slapd_var_run_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
# Local policy
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# should not need kill
|
|
Chris PeBenito |
17de1b |
# cjp: why net_raw?
|
|
Chris PeBenito |
17de1b |
allow slapd_t self:capability { kill setgid setuid net_raw dac_override dac_read_search };
|
|
Chris PeBenito |
17de1b |
dontaudit slapd_t self:capability sys_tty_config;
|
|
Chris PeBenito |
17de1b |
allow slapd_t self:process setsched;
|
|
Chris PeBenito |
17de1b |
allow slapd_t self:fifo_file { read write };
|
|
Chris PeBenito |
17de1b |
allow slapd_t self:udp_socket create_socket_perms;
|
|
Chris PeBenito |
17de1b |
#slapd needs to listen and accept needed by ldapsearch (slapd needs to accept from ldapseach)
|
|
Chris PeBenito |
17de1b |
allow slapd_t self:tcp_socket create_stream_socket_perms;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
c0868a |
allow slapd_t slapd_cert_t:dir list_dir_perms;
|
|
Chris PeBenito |
c0868a |
read_files_pattern(slapd_t,slapd_cert_t,slapd_cert_t)
|
|
Chris PeBenito |
c0868a |
read_lnk_files_pattern(slapd_t,slapd_cert_t,slapd_cert_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# Allow access to the slapd databases
|
|
Chris PeBenito |
c0868a |
manage_dirs_pattern(slapd_t,slapd_db_t,slapd_db_t)
|
|
Chris PeBenito |
c0868a |
manage_files_pattern(slapd_t,slapd_db_t,slapd_db_t)
|
|
Chris PeBenito |
c0868a |
manage_lnk_files_pattern(slapd_t,slapd_db_t,slapd_db_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
allow slapd_t slapd_etc_t:file { getattr read };
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
c0868a |
allow slapd_t slapd_lock_t:file manage_file_perms;
|
|
Chris PeBenito |
17de1b |
files_lock_filetrans(slapd_t,slapd_lock_t,file)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# Allow access to write the replication log (should tighten this)
|
|
Chris PeBenito |
c0868a |
manage_dirs_pattern(slapd_t,slapd_replog_t,slapd_replog_t)
|
|
Chris PeBenito |
c0868a |
manage_files_pattern(slapd_t,slapd_replog_t,slapd_replog_t)
|
|
Chris PeBenito |
c0868a |
manage_lnk_files_pattern(slapd_t,slapd_replog_t,slapd_replog_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
c0868a |
manage_dirs_pattern(slapd_t,slapd_tmp_t,slapd_tmp_t)
|
|
Chris PeBenito |
c0868a |
manage_files_pattern(slapd_t,slapd_tmp_t,slapd_tmp_t)
|
|
Chris PeBenito |
17de1b |
files_tmp_filetrans(slapd_t, slapd_tmp_t, { file dir })
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
c0868a |
manage_files_pattern(slapd_t,slapd_var_run_t,slapd_var_run_t)
|
|
Chris PeBenito |
c0868a |
manage_sock_files_pattern(slapd_t,slapd_var_run_t,slapd_var_run_t)
|
|
Chris PeBenito |
5dbda5 |
files_pid_filetrans(slapd_t,slapd_var_run_t,{ file sock_file })
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
kernel_read_system_state(slapd_t)
|
|
Chris PeBenito |
17de1b |
kernel_read_kernel_sysctls(slapd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
190066 |
corenet_all_recvfrom_unlabeled(slapd_t)
|
|
Chris PeBenito |
190066 |
corenet_all_recvfrom_netlabel(slapd_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_sendrecv_all_if(slapd_t)
|
|
Chris PeBenito |
17de1b |
corenet_udp_sendrecv_all_if(slapd_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_sendrecv_all_nodes(slapd_t)
|
|
Chris PeBenito |
17de1b |
corenet_udp_sendrecv_all_nodes(slapd_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_sendrecv_all_ports(slapd_t)
|
|
Chris PeBenito |
17de1b |
corenet_udp_sendrecv_all_ports(slapd_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_bind_all_nodes(slapd_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_bind_ldap_port(slapd_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_connect_all_ports(slapd_t)
|
|
Chris PeBenito |
17de1b |
corenet_sendrecv_ldap_server_packets(slapd_t)
|
|
Chris PeBenito |
17de1b |
corenet_sendrecv_all_client_packets(slapd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
dev_read_urand(slapd_t)
|
|
Chris PeBenito |
17de1b |
dev_read_sysfs(slapd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
fs_getattr_all_fs(slapd_t)
|
|
Chris PeBenito |
17de1b |
fs_search_auto_mountpoints(slapd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
domain_use_interactive_fds(slapd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
files_read_etc_files(slapd_t)
|
|
Chris PeBenito |
17de1b |
files_read_etc_runtime_files(slapd_t)
|
|
Chris PeBenito |
17de1b |
files_read_usr_files(slapd_t)
|
|
Chris PeBenito |
17de1b |
files_list_var_lib(slapd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
c0cf6e |
auth_use_nsswitch(slapd_t)
|
|
Chris PeBenito |
c0cf6e |
|
|
Chris PeBenito |
17de1b |
libs_use_ld_so(slapd_t)
|
|
Chris PeBenito |
17de1b |
libs_use_shared_libs(slapd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
logging_send_syslog_msg(slapd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
miscfiles_read_certs(slapd_t)
|
|
Chris PeBenito |
17de1b |
miscfiles_read_localization(slapd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
userdom_dontaudit_use_unpriv_user_fds(slapd_t)
|
|
Chris PeBenito |
17de1b |
userdom_dontaudit_search_sysadm_home_dirs(slapd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
kerberos_use(slapd_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
seutil_sigchld_newrole(slapd_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
udev_read_db(slapd_t)
|
|
Chris PeBenito |
17de1b |
')
|