|
Chris PeBenito |
493d6c |
|
|
Chris PeBenito |
bd7037 |
policy_module(nscd,1.0.1)
|
|
Chris PeBenito |
493d6c |
|
|
Chris PeBenito |
41c480 |
gen_require(`
|
|
Chris PeBenito |
3774e4 |
class nscd all_nscd_perms;
|
|
Chris PeBenito |
41c480 |
')
|
|
Chris PeBenito |
41c480 |
|
|
Chris PeBenito |
493d6c |
########################################
|
|
Chris PeBenito |
493d6c |
#
|
|
Chris PeBenito |
493d6c |
# Declarations
|
|
Chris PeBenito |
493d6c |
#
|
|
Chris PeBenito |
493d6c |
|
|
Chris PeBenito |
12ae75 |
# cjp: this is out of order because of an
|
|
Chris PeBenito |
12ae75 |
# ordering problem with loadable modules
|
|
Chris PeBenito |
12ae75 |
type nscd_var_run_t;
|
|
Chris PeBenito |
12ae75 |
files_pid_file(nscd_var_run_t)
|
|
Chris PeBenito |
12ae75 |
|
|
Chris PeBenito |
493d6c |
# nscd is both the client program and the daemon.
|
|
Chris PeBenito |
763a5e |
type nscd_t;
|
|
Chris PeBenito |
493d6c |
type nscd_exec_t;
|
|
Chris PeBenito |
493d6c |
init_daemon_domain(nscd_t,nscd_exec_t)
|
|
Chris PeBenito |
493d6c |
|
|
Chris PeBenito |
98a8ea |
type nscd_log_t;
|
|
Chris PeBenito |
98a8ea |
logging_log_file(nscd_log_t)
|
|
Chris PeBenito |
98a8ea |
|
|
Chris PeBenito |
493d6c |
########################################
|
|
Chris PeBenito |
493d6c |
#
|
|
Chris PeBenito |
493d6c |
# Local policy
|
|
Chris PeBenito |
493d6c |
#
|
|
Chris PeBenito |
493d6c |
|
|
Chris PeBenito |
493d6c |
allow nscd_t self:capability { kill setgid setuid };
|
|
Chris PeBenito |
493d6c |
dontaudit nscd_t self:capability sys_tty_config;
|
|
Don Miner |
45aa10 |
allow nscd_t self:process { getattr setsched signal_perms };
|
|
Chris PeBenito |
763a5e |
allow nscd_t self:fifo_file { read write };
|
|
Chris PeBenito |
493d6c |
allow nscd_t self:unix_stream_socket create_stream_socket_perms;
|
|
Chris PeBenito |
493d6c |
allow nscd_t self:unix_dgram_socket create_socket_perms;
|
|
Chris PeBenito |
493d6c |
allow nscd_t self:netlink_selinux_socket create_socket_perms;
|
|
Chris PeBenito |
493d6c |
allow nscd_t self:netlink_route_socket r_netlink_socket_perms;
|
|
Chris PeBenito |
77f6e2 |
allow nscd_t self:netlink_audit_socket { create_netlink_socket_perms nlmsg_relay };
|
|
Chris PeBenito |
493d6c |
allow nscd_t self:tcp_socket create_socket_perms;
|
|
Chris PeBenito |
763a5e |
allow nscd_t self:udp_socket create_socket_perms;
|
|
Chris PeBenito |
493d6c |
|
|
Chris PeBenito |
493d6c |
# For client program operation, invoked from sysadm_t.
|
|
Chris PeBenito |
493d6c |
# Transition occurs to nscd_t due to direct_sysadm_daemon.
|
|
Chris PeBenito |
493d6c |
allow nscd_t self:nscd { admin getstat };
|
|
Chris PeBenito |
493d6c |
|
|
Chris PeBenito |
98a8ea |
allow nscd_t nscd_log_t:file create_file_perms;
|
|
Chris PeBenito |
98a8ea |
logging_create_log(nscd_t,nscd_log_t)
|
|
Chris PeBenito |
98a8ea |
|
|
Chris PeBenito |
493d6c |
allow nscd_t nscd_var_run_t:file create_file_perms;
|
|
Chris PeBenito |
493d6c |
allow nscd_t nscd_var_run_t:sock_file create_file_perms;
|
|
Chris PeBenito |
d1b9d9 |
allow nscd_t nscd_var_run_t:dir rw_dir_perms;
|
|
Chris PeBenito |
689f6d |
files_create_pid(nscd_t,nscd_var_run_t,{ file sock_file })
|
|
Chris PeBenito |
493d6c |
|
|
Chris PeBenito |
493d6c |
kernel_read_kernel_sysctl(nscd_t)
|
|
Chris PeBenito |
493d6c |
kernel_list_proc(nscd_t)
|
|
Chris PeBenito |
493d6c |
kernel_read_proc_symlinks(nscd_t)
|
|
Chris PeBenito |
493d6c |
|
|
Chris PeBenito |
493d6c |
dev_read_sysfs(nscd_t)
|
|
Chris PeBenito |
493d6c |
dev_read_rand(nscd_t)
|
|
Chris PeBenito |
493d6c |
dev_read_urand(nscd_t)
|
|
Chris PeBenito |
493d6c |
|
|
Chris PeBenito |
493d6c |
fs_getattr_all_fs(nscd_t)
|
|
Chris PeBenito |
493d6c |
fs_search_auto_mountpoints(nscd_t)
|
|
Chris PeBenito |
493d6c |
|
|
Chris PeBenito |
493d6c |
term_dontaudit_use_console(nscd_t)
|
|
Chris PeBenito |
493d6c |
|
|
Chris PeBenito |
493d6c |
# for when /etc/passwd has just been updated and has the wrong type
|
|
Chris PeBenito |
493d6c |
auth_getattr_shadow(nscd_t)
|
|
Chris PeBenito |
493d6c |
|
|
Chris PeBenito |
493d6c |
corenet_tcp_sendrecv_all_if(nscd_t)
|
|
Chris PeBenito |
493d6c |
corenet_udp_sendrecv_all_if(nscd_t)
|
|
Chris PeBenito |
493d6c |
corenet_raw_sendrecv_all_if(nscd_t)
|
|
Chris PeBenito |
493d6c |
corenet_tcp_sendrecv_all_nodes(nscd_t)
|
|
Chris PeBenito |
493d6c |
corenet_udp_sendrecv_all_nodes(nscd_t)
|
|
Chris PeBenito |
493d6c |
corenet_raw_sendrecv_all_nodes(nscd_t)
|
|
Chris PeBenito |
493d6c |
corenet_tcp_sendrecv_all_ports(nscd_t)
|
|
Chris PeBenito |
493d6c |
corenet_udp_sendrecv_all_ports(nscd_t)
|
|
Chris PeBenito |
bd7037 |
corenet_non_ipsec_sendrecv(nscd_t)
|
|
Chris PeBenito |
493d6c |
corenet_tcp_bind_all_nodes(nscd_t)
|
|
Chris PeBenito |
493d6c |
corenet_udp_bind_all_nodes(nscd_t)
|
|
Chris PeBenito |
0907bd |
corenet_tcp_connect_all_ports(nscd_t)
|
|
Chris PeBenito |
98a8ea |
corenet_use_tun_tap_device(nscd_t)
|
|
Chris PeBenito |
493d6c |
|
|
Chris PeBenito |
763a5e |
selinux_get_fs_mount(nscd_t)
|
|
Chris PeBenito |
763a5e |
selinux_validate_context(nscd_t)
|
|
Chris PeBenito |
763a5e |
selinux_compute_access_vector(nscd_t)
|
|
Chris PeBenito |
763a5e |
selinux_compute_create_context(nscd_t)
|
|
Chris PeBenito |
763a5e |
selinux_compute_relabel_context(nscd_t)
|
|
Chris PeBenito |
763a5e |
selinux_compute_user_contexts(nscd_t)
|
|
Chris PeBenito |
493d6c |
domain_use_wide_inherit_fd(nscd_t)
|
|
Chris PeBenito |
493d6c |
|
|
Chris PeBenito |
493d6c |
files_read_etc_files(nscd_t)
|
|
Chris PeBenito |
725926 |
files_read_generic_tmp_symlinks(nscd_t)
|
|
Chris PeBenito |
493d6c |
|
|
Chris PeBenito |
493d6c |
init_use_fd(nscd_t)
|
|
Chris PeBenito |
493d6c |
init_use_script_pty(nscd_t)
|
|
Chris PeBenito |
493d6c |
|
|
Chris PeBenito |
493d6c |
libs_use_ld_so(nscd_t)
|
|
Chris PeBenito |
493d6c |
libs_use_shared_libs(nscd_t)
|
|
Chris PeBenito |
493d6c |
|
|
Chris PeBenito |
493d6c |
logging_send_syslog_msg(nscd_t)
|
|
Chris PeBenito |
493d6c |
|
|
Chris PeBenito |
7a6d42 |
miscfiles_read_certs(nscd_t)
|
|
Chris PeBenito |
493d6c |
miscfiles_read_localization(nscd_t)
|
|
Chris PeBenito |
493d6c |
|
|
Chris PeBenito |
763a5e |
seutil_read_config(nscd_t)
|
|
Chris PeBenito |
763a5e |
seutil_read_default_contexts(nscd_t)
|
|
Chris PeBenito |
763a5e |
seutil_sigchld_newrole(nscd_t)
|
|
Chris PeBenito |
763a5e |
|
|
Chris PeBenito |
493d6c |
sysnet_read_config(nscd_t)
|
|
Chris PeBenito |
493d6c |
|
|
Chris PeBenito |
493d6c |
userdom_dontaudit_use_unpriv_user_fd(nscd_t)
|
|
Chris PeBenito |
493d6c |
userdom_dontaudit_search_sysadm_home_dir(nscd_t)
|
|
Chris PeBenito |
493d6c |
|
|
Chris PeBenito |
d1b9d9 |
ifdef(`targeted_policy',`
|
|
Chris PeBenito |
d1b9d9 |
term_use_unallocated_tty(nscd_t)
|
|
Chris PeBenito |
d1b9d9 |
term_use_generic_pty(nscd_t)
|
|
Chris PeBenito |
d1b9d9 |
|
|
Chris PeBenito |
493d6c |
term_dontaudit_use_unallocated_tty(nscd_t)
|
|
Chris PeBenito |
493d6c |
term_dontaudit_use_generic_pty(nscd_t)
|
|
Chris PeBenito |
493d6c |
files_dontaudit_read_root_file(nscd_t)
|
|
Chris PeBenito |
493d6c |
')
|
|
Chris PeBenito |
493d6c |
|
|
Chris PeBenito |
132880 |
optional_policy(`nis',`
|
|
Chris PeBenito |
493d6c |
nis_use_ypbind(nscd_t)
|
|
Chris PeBenito |
493d6c |
')
|
|
Chris PeBenito |
493d6c |
|
|
Chris PeBenito |
132880 |
optional_policy(`samba',`
|
|
Chris PeBenito |
d1b9d9 |
samba_connect_winbind(nscd_t)
|
|
Chris PeBenito |
725926 |
samba_search_var(nscd_t)
|
|
Chris PeBenito |
d1b9d9 |
')
|
|
Chris PeBenito |
d1b9d9 |
|
|
Chris PeBenito |
132880 |
optional_policy(`udev',`
|
|
Chris PeBenito |
493d6c |
udev_read_db(nscd_t)
|
|
Chris PeBenito |
493d6c |
')
|