2009-08-05 14:59:21 +00:00
|
|
|
policy_module(ldap, 1.10.0)
|
2005-08-17 18:33:43 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type slapd_t;
|
|
|
|
type slapd_exec_t;
|
2008-07-23 21:38:39 +00:00
|
|
|
init_daemon_domain(slapd_t, slapd_exec_t)
|
2005-08-17 18:33:43 +00:00
|
|
|
|
2005-11-15 16:34:10 +00:00
|
|
|
type slapd_cert_t;
|
2010-08-26 13:41:21 +00:00
|
|
|
miscfiles_cert_type(slapd_cert_t)
|
2005-11-15 16:34:10 +00:00
|
|
|
|
2005-08-17 18:33:43 +00:00
|
|
|
type slapd_db_t;
|
|
|
|
files_type(slapd_db_t)
|
|
|
|
|
2005-10-24 18:40:24 +00:00
|
|
|
type slapd_etc_t;
|
|
|
|
files_config_file(slapd_etc_t)
|
2005-08-17 18:33:43 +00:00
|
|
|
|
2008-10-08 20:03:24 +00:00
|
|
|
type slapd_initrc_exec_t;
|
|
|
|
init_script_file(slapd_initrc_exec_t)
|
|
|
|
|
2005-11-15 16:34:10 +00:00
|
|
|
type slapd_lock_t;
|
|
|
|
files_lock_file(slapd_lock_t)
|
|
|
|
|
2005-08-17 18:33:43 +00:00
|
|
|
type slapd_replog_t;
|
|
|
|
files_type(slapd_replog_t)
|
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
type slapd_log_t;
|
|
|
|
logging_log_file(slapd_log_t)
|
|
|
|
|
2005-08-17 18:33:43 +00:00
|
|
|
type slapd_tmp_t;
|
|
|
|
files_tmp_file(slapd_tmp_t)
|
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
type slapd_tmpfs_t;
|
|
|
|
files_tmpfs_file(slapd_tmpfs_t)
|
|
|
|
|
2005-08-17 18:33:43 +00:00
|
|
|
type slapd_var_run_t;
|
|
|
|
files_pid_file(slapd_var_run_t)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
# should not need kill
|
|
|
|
# cjp: why net_raw?
|
2005-09-12 21:40:56 +00:00
|
|
|
allow slapd_t self:capability { kill setgid setuid net_raw dac_override dac_read_search };
|
2005-08-17 18:33:43 +00:00
|
|
|
dontaudit slapd_t self:capability sys_tty_config;
|
|
|
|
allow slapd_t self:process setsched;
|
2008-10-16 16:09:20 +00:00
|
|
|
allow slapd_t self:fifo_file rw_fifo_file_perms;
|
2005-10-26 18:07:20 +00:00
|
|
|
allow slapd_t self:udp_socket create_socket_perms;
|
2005-10-28 13:33:25 +00:00
|
|
|
#slapd needs to listen and accept needed by ldapsearch (slapd needs to accept from ldapseach)
|
|
|
|
allow slapd_t self:tcp_socket create_stream_socket_perms;
|
2005-08-17 18:33:43 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow slapd_t slapd_cert_t:dir list_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
read_files_pattern(slapd_t, slapd_cert_t, slapd_cert_t)
|
|
|
|
read_lnk_files_pattern(slapd_t, slapd_cert_t, slapd_cert_t)
|
2005-11-15 16:34:10 +00:00
|
|
|
|
2005-08-17 18:33:43 +00:00
|
|
|
# Allow access to the slapd databases
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_dirs_pattern(slapd_t, slapd_db_t, slapd_db_t)
|
|
|
|
manage_files_pattern(slapd_t, slapd_db_t, slapd_db_t)
|
|
|
|
manage_lnk_files_pattern(slapd_t, slapd_db_t, slapd_db_t)
|
2005-08-17 18:33:43 +00:00
|
|
|
|
2008-10-16 16:09:20 +00:00
|
|
|
allow slapd_t slapd_etc_t:file read_file_perms;
|
2005-08-17 18:33:43 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow slapd_t slapd_lock_t:file manage_file_perms;
|
2009-06-26 14:40:13 +00:00
|
|
|
files_lock_filetrans(slapd_t, slapd_lock_t, file)
|
2005-11-15 16:34:10 +00:00
|
|
|
|
2005-08-17 18:33:43 +00:00
|
|
|
# Allow access to write the replication log (should tighten this)
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_dirs_pattern(slapd_t, slapd_replog_t, slapd_replog_t)
|
|
|
|
manage_files_pattern(slapd_t, slapd_replog_t, slapd_replog_t)
|
|
|
|
manage_lnk_files_pattern(slapd_t, slapd_replog_t, slapd_replog_t)
|
2005-08-17 18:33:43 +00:00
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
manage_dirs_pattern(slapd_t, slapd_log_t, slapd_log_t)
|
|
|
|
manage_files_pattern(slapd_t, slapd_log_t, slapd_log_t)
|
|
|
|
logging_log_filetrans(slapd_t, slapd_log_t, { file dir })
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_dirs_pattern(slapd_t, slapd_tmp_t, slapd_tmp_t)
|
|
|
|
manage_files_pattern(slapd_t, slapd_tmp_t, slapd_tmp_t)
|
2006-02-21 18:40:44 +00:00
|
|
|
files_tmp_filetrans(slapd_t, slapd_tmp_t, { file dir })
|
2005-08-17 18:33:43 +00:00
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
manage_files_pattern(slapd_t, slapd_tmpfs_t, slapd_tmpfs_t)
|
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
Whitespace, newline and tab fixes.
2010-09-22 10:07:37 +00:00
|
|
|
fs_tmpfs_filetrans(slapd_t, slapd_tmpfs_t, file)
|
2010-08-26 13:41:21 +00:00
|
|
|
|
|
|
|
manage_dirs_pattern(slapd_t, slapd_var_run_t, slapd_var_run_t)
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern(slapd_t, slapd_var_run_t, slapd_var_run_t)
|
|
|
|
manage_sock_files_pattern(slapd_t, slapd_var_run_t, slapd_var_run_t)
|
2010-08-26 13:41:21 +00:00
|
|
|
files_pid_filetrans(slapd_t, slapd_var_run_t, { dir file sock_file })
|
2005-08-17 18:33:43 +00:00
|
|
|
|
|
|
|
kernel_read_system_state(slapd_t)
|
2006-01-31 16:49:43 +00:00
|
|
|
kernel_read_kernel_sysctls(slapd_t)
|
2005-08-17 18:33:43 +00:00
|
|
|
|
2007-06-27 15:23:21 +00:00
|
|
|
corenet_all_recvfrom_unlabeled(slapd_t)
|
|
|
|
corenet_all_recvfrom_netlabel(slapd_t)
|
2009-01-06 20:24:10 +00:00
|
|
|
corenet_tcp_sendrecv_generic_if(slapd_t)
|
|
|
|
corenet_udp_sendrecv_generic_if(slapd_t)
|
2009-01-09 19:48:02 +00:00
|
|
|
corenet_tcp_sendrecv_generic_node(slapd_t)
|
|
|
|
corenet_udp_sendrecv_generic_node(slapd_t)
|
2005-08-17 18:33:43 +00:00
|
|
|
corenet_tcp_sendrecv_all_ports(slapd_t)
|
|
|
|
corenet_udp_sendrecv_all_ports(slapd_t)
|
2009-01-09 19:48:02 +00:00
|
|
|
corenet_tcp_bind_generic_node(slapd_t)
|
2005-08-17 18:33:43 +00:00
|
|
|
corenet_tcp_bind_ldap_port(slapd_t)
|
2005-09-12 21:40:56 +00:00
|
|
|
corenet_tcp_connect_all_ports(slapd_t)
|
2006-05-30 19:46:34 +00:00
|
|
|
corenet_sendrecv_ldap_server_packets(slapd_t)
|
|
|
|
corenet_sendrecv_all_client_packets(slapd_t)
|
2005-08-17 18:33:43 +00:00
|
|
|
|
|
|
|
dev_read_urand(slapd_t)
|
|
|
|
dev_read_sysfs(slapd_t)
|
|
|
|
|
|
|
|
fs_getattr_all_fs(slapd_t)
|
|
|
|
fs_search_auto_mountpoints(slapd_t)
|
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
domain_use_interactive_fds(slapd_t)
|
2005-08-17 18:33:43 +00:00
|
|
|
|
|
|
|
files_read_etc_files(slapd_t)
|
|
|
|
files_read_etc_runtime_files(slapd_t)
|
|
|
|
files_read_usr_files(slapd_t)
|
|
|
|
files_list_var_lib(slapd_t)
|
|
|
|
|
2007-12-04 15:05:55 +00:00
|
|
|
auth_use_nsswitch(slapd_t)
|
|
|
|
|
2005-08-17 18:33:43 +00:00
|
|
|
logging_send_syslog_msg(slapd_t)
|
|
|
|
|
2010-09-09 16:14:48 +00:00
|
|
|
miscfiles_read_generic_certs(slapd_t)
|
2005-08-17 18:33:43 +00:00
|
|
|
miscfiles_read_localization(slapd_t)
|
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
userdom_dontaudit_use_unpriv_user_fds(slapd_t)
|
2008-11-05 16:10:46 +00:00
|
|
|
userdom_dontaudit_search_user_home_dirs(slapd_t)
|
2005-08-17 18:33:43 +00:00
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2009-02-11 19:28:30 +00:00
|
|
|
kerberos_keytab_template(slapd, slapd_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
sasl_connect(slapd_t)
|
2006-01-06 22:51:40 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-08-17 18:33:43 +00:00
|
|
|
seutil_sigchld_newrole(slapd_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-08-17 18:33:43 +00:00
|
|
|
udev_read_db(slapd_t)
|
|
|
|
')
|