2005-07-13 20:48:51 +00:00
|
|
|
|
2009-11-17 15:05:56 +00:00
|
|
|
policy_module(nscd, 1.10.0)
|
2005-07-13 20:48:51 +00:00
|
|
|
|
2005-09-19 14:18:48 +00:00
|
|
|
gen_require(`
|
2005-09-20 20:48:17 +00:00
|
|
|
class nscd all_nscd_perms;
|
2005-09-19 14:18:48 +00:00
|
|
|
')
|
|
|
|
|
2005-07-13 20:48:51 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
2005-10-18 18:25:33 +00:00
|
|
|
# cjp: this is out of order because of an
|
|
|
|
# ordering problem with loadable modules
|
|
|
|
type nscd_var_run_t;
|
|
|
|
files_pid_file(nscd_var_run_t)
|
|
|
|
|
2005-07-13 20:48:51 +00:00
|
|
|
# nscd is both the client program and the daemon.
|
2005-09-07 13:31:37 +00:00
|
|
|
type nscd_t;
|
2005-07-13 20:48:51 +00:00
|
|
|
type nscd_exec_t;
|
2008-07-23 21:38:39 +00:00
|
|
|
init_daemon_domain(nscd_t, nscd_exec_t)
|
2005-07-13 20:48:51 +00:00
|
|
|
|
2009-06-30 19:27:21 +00:00
|
|
|
type nscd_initrc_exec_t;
|
|
|
|
init_script_file(nscd_initrc_exec_t)
|
|
|
|
|
2005-09-15 21:03:29 +00:00
|
|
|
type nscd_log_t;
|
|
|
|
logging_log_file(nscd_log_t)
|
|
|
|
|
2005-07-13 20:48:51 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
2009-06-30 19:27:21 +00:00
|
|
|
allow nscd_t self:capability { kill setgid setuid };
|
2005-07-13 20:48:51 +00:00
|
|
|
dontaudit nscd_t self:capability sys_tty_config;
|
2009-06-30 19:27:21 +00:00
|
|
|
allow nscd_t self:process { getattr getcap setcap setsched signal_perms };
|
2008-10-16 16:09:20 +00:00
|
|
|
allow nscd_t self:fifo_file read_fifo_file_perms;
|
2005-07-13 20:48:51 +00:00
|
|
|
allow nscd_t self:unix_stream_socket create_stream_socket_perms;
|
|
|
|
allow nscd_t self:unix_dgram_socket create_socket_perms;
|
|
|
|
allow nscd_t self:netlink_selinux_socket create_socket_perms;
|
|
|
|
allow nscd_t self:tcp_socket create_socket_perms;
|
2005-09-07 13:31:37 +00:00
|
|
|
allow nscd_t self:udp_socket create_socket_perms;
|
2005-07-13 20:48:51 +00:00
|
|
|
|
|
|
|
# For client program operation, invoked from sysadm_t.
|
|
|
|
# Transition occurs to nscd_t due to direct_sysadm_daemon.
|
|
|
|
allow nscd_t self:nscd { admin getstat };
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow nscd_t nscd_log_t:file manage_file_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
logging_log_filetrans(nscd_t, nscd_log_t, file)
|
2005-09-15 21:03:29 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern(nscd_t, nscd_var_run_t, nscd_var_run_t)
|
|
|
|
manage_sock_files_pattern(nscd_t, nscd_var_run_t, nscd_var_run_t)
|
|
|
|
files_pid_filetrans(nscd_t, nscd_var_run_t, { file sock_file })
|
2005-07-13 20:48:51 +00:00
|
|
|
|
2009-06-30 19:27:21 +00:00
|
|
|
corecmd_search_bin(nscd_t)
|
|
|
|
can_exec(nscd_t, nscd_exec_t)
|
|
|
|
|
2006-01-31 16:49:43 +00:00
|
|
|
kernel_read_kernel_sysctls(nscd_t)
|
2005-07-13 20:48:51 +00:00
|
|
|
kernel_list_proc(nscd_t)
|
|
|
|
kernel_read_proc_symlinks(nscd_t)
|
|
|
|
|
|
|
|
dev_read_sysfs(nscd_t)
|
|
|
|
dev_read_rand(nscd_t)
|
|
|
|
dev_read_urand(nscd_t)
|
|
|
|
|
|
|
|
fs_getattr_all_fs(nscd_t)
|
|
|
|
fs_search_auto_mountpoints(nscd_t)
|
2009-09-09 13:35:37 +00:00
|
|
|
fs_list_inotifyfs(nscd_t)
|
2005-07-13 20:48:51 +00:00
|
|
|
|
|
|
|
# for when /etc/passwd has just been updated and has the wrong type
|
|
|
|
auth_getattr_shadow(nscd_t)
|
2007-02-16 23:01:42 +00:00
|
|
|
auth_use_nsswitch(nscd_t)
|
2005-07-13 20:48:51 +00:00
|
|
|
|
2007-06-27 15:23:21 +00:00
|
|
|
corenet_all_recvfrom_unlabeled(nscd_t)
|
|
|
|
corenet_all_recvfrom_netlabel(nscd_t)
|
2009-01-06 20:24:10 +00:00
|
|
|
corenet_tcp_sendrecv_generic_if(nscd_t)
|
|
|
|
corenet_udp_sendrecv_generic_if(nscd_t)
|
2009-01-09 19:48:02 +00:00
|
|
|
corenet_tcp_sendrecv_generic_node(nscd_t)
|
|
|
|
corenet_udp_sendrecv_generic_node(nscd_t)
|
2005-07-13 20:48:51 +00:00
|
|
|
corenet_tcp_sendrecv_all_ports(nscd_t)
|
|
|
|
corenet_udp_sendrecv_all_ports(nscd_t)
|
2009-06-30 19:27:21 +00:00
|
|
|
corenet_udp_bind_generic_node(nscd_t)
|
2005-09-13 13:06:07 +00:00
|
|
|
corenet_tcp_connect_all_ports(nscd_t)
|
2006-05-30 19:46:34 +00:00
|
|
|
corenet_sendrecv_all_client_packets(nscd_t)
|
2006-02-16 21:33:18 +00:00
|
|
|
corenet_rw_tun_tap_dev(nscd_t)
|
2005-07-13 20:48:51 +00:00
|
|
|
|
2005-09-07 13:31:37 +00:00
|
|
|
selinux_get_fs_mount(nscd_t)
|
|
|
|
selinux_validate_context(nscd_t)
|
|
|
|
selinux_compute_access_vector(nscd_t)
|
|
|
|
selinux_compute_create_context(nscd_t)
|
|
|
|
selinux_compute_relabel_context(nscd_t)
|
|
|
|
selinux_compute_user_contexts(nscd_t)
|
2006-02-20 21:33:25 +00:00
|
|
|
domain_use_interactive_fds(nscd_t)
|
2005-07-13 20:48:51 +00:00
|
|
|
|
|
|
|
files_read_etc_files(nscd_t)
|
2005-11-08 22:00:30 +00:00
|
|
|
files_read_generic_tmp_symlinks(nscd_t)
|
2006-09-25 18:53:06 +00:00
|
|
|
# Needed to read files created by firstboot "/etc/hesiod.conf"
|
|
|
|
files_read_etc_runtime_files(nscd_t)
|
2005-07-13 20:48:51 +00:00
|
|
|
|
2009-06-30 19:27:21 +00:00
|
|
|
logging_send_audit_msgs(nscd_t)
|
2005-07-13 20:48:51 +00:00
|
|
|
logging_send_syslog_msg(nscd_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(nscd_t)
|
|
|
|
|
2005-09-07 13:31:37 +00:00
|
|
|
seutil_read_config(nscd_t)
|
|
|
|
seutil_read_default_contexts(nscd_t)
|
|
|
|
seutil_sigchld_newrole(nscd_t)
|
|
|
|
|
2005-07-13 20:48:51 +00:00
|
|
|
sysnet_read_config(nscd_t)
|
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
userdom_dontaudit_use_user_terminals(nscd_t)
|
2006-02-20 21:33:25 +00:00
|
|
|
userdom_dontaudit_use_unpriv_user_fds(nscd_t)
|
2008-11-05 16:10:46 +00:00
|
|
|
userdom_dontaudit_search_user_home_dirs(nscd_t)
|
2005-07-13 20:48:51 +00:00
|
|
|
|
2009-06-30 19:27:21 +00:00
|
|
|
optional_policy(`
|
|
|
|
cron_read_system_job_tmp_files(nscd_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
kerberos_use(nscd_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-07-13 20:48:51 +00:00
|
|
|
udev_read_db(nscd_t)
|
|
|
|
')
|
2006-06-07 17:43:10 +00:00
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
xen_dontaudit_rw_unix_stream_sockets(nscd_t)
|
|
|
|
xen_append_log(nscd_t)
|
|
|
|
')
|