Chris PeBenito 9570b2
policy_module(ldap, 1.10.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 0bfccd
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 967fd1
type slapd_initrc_exec_t;
Chris PeBenito 967fd1
init_script_file(slapd_initrc_exec_t)
Chris PeBenito 967fd1
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 0b36a2
allow slapd_t self:fifo_file rw_fifo_file_perms;
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 0bfccd
read_files_pattern(slapd_t, slapd_cert_t, slapd_cert_t)
Chris PeBenito 0bfccd
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 0bfccd
manage_dirs_pattern(slapd_t, slapd_db_t, slapd_db_t)
Chris PeBenito 0bfccd
manage_files_pattern(slapd_t, slapd_db_t, slapd_db_t)
Chris PeBenito 0bfccd
manage_lnk_files_pattern(slapd_t, slapd_db_t, slapd_db_t)
Chris PeBenito 17de1b
Chris PeBenito 0b36a2
allow slapd_t slapd_etc_t:file read_file_perms;
Chris PeBenito 17de1b
Chris PeBenito c0868a
allow slapd_t slapd_lock_t:file manage_file_perms;
Chris PeBenito 3f67f7
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 0bfccd
manage_dirs_pattern(slapd_t, slapd_replog_t, slapd_replog_t)
Chris PeBenito 0bfccd
manage_files_pattern(slapd_t, slapd_replog_t, slapd_replog_t)
Chris PeBenito 0bfccd
manage_lnk_files_pattern(slapd_t, slapd_replog_t, slapd_replog_t)
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
manage_dirs_pattern(slapd_t, slapd_tmp_t, slapd_tmp_t)
Chris PeBenito 0bfccd
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 0bfccd
manage_files_pattern(slapd_t, slapd_var_run_t, slapd_var_run_t)
Chris PeBenito 0bfccd
manage_sock_files_pattern(slapd_t, slapd_var_run_t, slapd_var_run_t)
Chris PeBenito 0bfccd
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 668b30
corenet_tcp_sendrecv_generic_if(slapd_t)
Chris PeBenito 668b30
corenet_udp_sendrecv_generic_if(slapd_t)
Chris PeBenito c12621
corenet_tcp_sendrecv_generic_node(slapd_t)
Chris PeBenito c12621
corenet_udp_sendrecv_generic_node(slapd_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_all_ports(slapd_t)
Chris PeBenito 17de1b
corenet_udp_sendrecv_all_ports(slapd_t)
Chris PeBenito c12621
corenet_tcp_bind_generic_node(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
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 296273
userdom_dontaudit_search_user_home_dirs(slapd_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito f79314
	kerberos_keytab_template(slapd, slapd_t)
Chris PeBenito f79314
')
Chris PeBenito f79314
Chris PeBenito f79314
optional_policy(`
Chris PeBenito f79314
	sasl_connect(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
')