|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
0251df |
policy_module(nscd,1.4.0)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
class nscd all_nscd_perms;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
# Declarations
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# cjp: this is out of order because of an
|
|
Chris PeBenito |
17de1b |
# ordering problem with loadable modules
|
|
Chris PeBenito |
17de1b |
type nscd_var_run_t;
|
|
Chris PeBenito |
17de1b |
files_pid_file(nscd_var_run_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# nscd is both the client program and the daemon.
|
|
Chris PeBenito |
17de1b |
type nscd_t;
|
|
Chris PeBenito |
17de1b |
type nscd_exec_t;
|
|
Chris PeBenito |
17de1b |
init_daemon_domain(nscd_t,nscd_exec_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
type nscd_log_t;
|
|
Chris PeBenito |
17de1b |
logging_log_file(nscd_log_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
# Local policy
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
da9bbc |
allow nscd_t self:capability { kill setgid setuid audit_write };
|
|
Chris PeBenito |
17de1b |
dontaudit nscd_t self:capability sys_tty_config;
|
|
Chris PeBenito |
17de1b |
allow nscd_t self:process { getattr setsched signal_perms };
|
|
Chris PeBenito |
17de1b |
allow nscd_t self:fifo_file { read write };
|
|
Chris PeBenito |
17de1b |
allow nscd_t self:unix_stream_socket create_stream_socket_perms;
|
|
Chris PeBenito |
17de1b |
allow nscd_t self:unix_dgram_socket create_socket_perms;
|
|
Chris PeBenito |
17de1b |
allow nscd_t self:netlink_selinux_socket create_socket_perms;
|
|
Chris PeBenito |
17de1b |
allow nscd_t self:netlink_audit_socket { create_netlink_socket_perms nlmsg_relay };
|
|
Chris PeBenito |
17de1b |
allow nscd_t self:tcp_socket create_socket_perms;
|
|
Chris PeBenito |
17de1b |
allow nscd_t self:udp_socket create_socket_perms;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# For client program operation, invoked from sysadm_t.
|
|
Chris PeBenito |
17de1b |
# Transition occurs to nscd_t due to direct_sysadm_daemon.
|
|
Chris PeBenito |
17de1b |
allow nscd_t self:nscd { admin getstat };
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
c0868a |
allow nscd_t nscd_log_t:file manage_file_perms;
|
|
Chris PeBenito |
17de1b |
logging_log_filetrans(nscd_t,nscd_log_t,file)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
c0868a |
manage_files_pattern(nscd_t,nscd_var_run_t,nscd_var_run_t)
|
|
Chris PeBenito |
c0868a |
manage_sock_files_pattern(nscd_t,nscd_var_run_t,nscd_var_run_t)
|
|
Chris PeBenito |
17de1b |
files_pid_filetrans(nscd_t,nscd_var_run_t,{ file sock_file })
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
kernel_read_kernel_sysctls(nscd_t)
|
|
Chris PeBenito |
17de1b |
kernel_list_proc(nscd_t)
|
|
Chris PeBenito |
17de1b |
kernel_read_proc_symlinks(nscd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
dev_read_sysfs(nscd_t)
|
|
Chris PeBenito |
17de1b |
dev_read_rand(nscd_t)
|
|
Chris PeBenito |
17de1b |
dev_read_urand(nscd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
fs_getattr_all_fs(nscd_t)
|
|
Chris PeBenito |
17de1b |
fs_search_auto_mountpoints(nscd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# for when /etc/passwd has just been updated and has the wrong type
|
|
Chris PeBenito |
17de1b |
auth_getattr_shadow(nscd_t)
|
|
Chris PeBenito |
6b19be |
auth_use_nsswitch(nscd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
corenet_non_ipsec_sendrecv(nscd_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_sendrecv_all_if(nscd_t)
|
|
Chris PeBenito |
17de1b |
corenet_udp_sendrecv_all_if(nscd_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_sendrecv_all_nodes(nscd_t)
|
|
Chris PeBenito |
17de1b |
corenet_udp_sendrecv_all_nodes(nscd_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_sendrecv_all_ports(nscd_t)
|
|
Chris PeBenito |
17de1b |
corenet_udp_sendrecv_all_ports(nscd_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_connect_all_ports(nscd_t)
|
|
Chris PeBenito |
17de1b |
corenet_sendrecv_all_client_packets(nscd_t)
|
|
Chris PeBenito |
17de1b |
corenet_rw_tun_tap_dev(nscd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
selinux_get_fs_mount(nscd_t)
|
|
Chris PeBenito |
17de1b |
selinux_validate_context(nscd_t)
|
|
Chris PeBenito |
17de1b |
selinux_compute_access_vector(nscd_t)
|
|
Chris PeBenito |
17de1b |
selinux_compute_create_context(nscd_t)
|
|
Chris PeBenito |
17de1b |
selinux_compute_relabel_context(nscd_t)
|
|
Chris PeBenito |
17de1b |
selinux_compute_user_contexts(nscd_t)
|
|
Chris PeBenito |
17de1b |
domain_use_interactive_fds(nscd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
files_read_etc_files(nscd_t)
|
|
Chris PeBenito |
17de1b |
files_read_generic_tmp_symlinks(nscd_t)
|
|
Chris PeBenito |
693d4a |
# Needed to read files created by firstboot "/etc/hesiod.conf"
|
|
Chris PeBenito |
693d4a |
files_read_etc_runtime_files(nscd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
libs_use_ld_so(nscd_t)
|
|
Chris PeBenito |
17de1b |
libs_use_shared_libs(nscd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
logging_send_syslog_msg(nscd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
miscfiles_read_localization(nscd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
seutil_read_config(nscd_t)
|
|
Chris PeBenito |
17de1b |
seutil_read_default_contexts(nscd_t)
|
|
Chris PeBenito |
17de1b |
seutil_sigchld_newrole(nscd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
sysnet_read_config(nscd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
userdom_dontaudit_use_unpriv_user_fds(nscd_t)
|
|
Chris PeBenito |
17de1b |
userdom_dontaudit_search_sysadm_home_dirs(nscd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
ifdef(`targeted_policy',`
|
|
Chris PeBenito |
17de1b |
term_use_unallocated_ttys(nscd_t)
|
|
Chris PeBenito |
17de1b |
term_use_generic_ptys(nscd_t)
|
|
Chris PeBenito |
17de1b |
files_dontaudit_read_root_files(nscd_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
udev_read_db(nscd_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Chris PeBenito |
17de1b |
xen_dontaudit_rw_unix_stream_sockets(nscd_t)
|
|
Chris PeBenito |
17de1b |
xen_append_log(nscd_t)
|
|
Chris PeBenito |
17de1b |
')
|