|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
a5f5eb |
policy_module(ldap,1.3.1)
|
|
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:netlink_route_socket r_netlink_socket_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 |
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 |
17de1b |
corenet_non_ipsec_sendrecv(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 |
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 |
sysnet_read_config(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 |
ifdef(`targeted_policy',`
|
|
Chris PeBenito |
17de1b |
#reh slapcat will want to talk to the terminal
|
|
Chris PeBenito |
17de1b |
term_use_generic_ptys(slapd_t)
|
|
Chris PeBenito |
17de1b |
term_use_unallocated_ttys(slapd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
userdom_search_generic_user_home_dirs(slapd_t)
|
|
Chris PeBenito |
17de1b |
#need to be able to read ldif files created by root
|
|
Chris PeBenito |
17de1b |
# cjp: fix to not use templated interface:
|
|
Chris PeBenito |
17de1b |
userdom_read_user_home_content_files(user,slapd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
term_dontaudit_use_unallocated_ttys(slapd_t)
|
|
Chris PeBenito |
17de1b |
term_dontaudit_use_generic_ptys(slapd_t)
|
|
Chris PeBenito |
17de1b |
files_dontaudit_read_root_files(slapd_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
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 |
nis_use_ypbind(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 |
')
|