|
Dan Walsh |
3eaa99 |
policy_module(nscd, 1.10.1)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
gen_require(`
|
|
Chris PeBenito |
17de1b |
class nscd all_nscd_perms;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Dan Walsh |
3eaa99 |
## <desc>
|
|
Dominick Grift |
68ac47 |
##
|
|
Dominick Grift |
68ac47 |
## Allow confined applications to use nscd shared memory.
|
|
Dominick Grift |
68ac47 |
##
|
|
Dan Walsh |
3eaa99 |
## </desc>
|
|
Dan Walsh |
3eaa99 |
gen_tunable(nscd_use_shm, false)
|
|
Dan Walsh |
3eaa99 |
|
|
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 |
0bfccd |
init_daemon_domain(nscd_t, nscd_exec_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
bb8816 |
type nscd_initrc_exec_t;
|
|
Chris PeBenito |
bb8816 |
init_script_file(nscd_initrc_exec_t)
|
|
Chris PeBenito |
bb8816 |
|
|
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 |
|
|
Dan Walsh |
3eaa99 |
allow nscd_t self:capability { kill setgid setuid sys_ptrace };
|
|
Chris PeBenito |
17de1b |
dontaudit nscd_t self:capability sys_tty_config;
|
|
Chris PeBenito |
bb8816 |
allow nscd_t self:process { getattr getcap setcap setsched signal_perms };
|
|
Chris PeBenito |
0b36a2 |
allow nscd_t self:fifo_file read_fifo_file_perms;
|
|
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: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 |
0bfccd |
logging_log_filetrans(nscd_t, nscd_log_t, file)
|
|
Chris PeBenito |
17de1b |
|
|
Dan Walsh |
3eaa99 |
manage_dirs_pattern(nscd_t, nscd_var_run_t, nscd_var_run_t)
|
|
Chris PeBenito |
0bfccd |
manage_files_pattern(nscd_t, nscd_var_run_t, nscd_var_run_t)
|
|
Chris PeBenito |
0bfccd |
manage_sock_files_pattern(nscd_t, nscd_var_run_t, nscd_var_run_t)
|
|
Dan Walsh |
3eaa99 |
files_pid_filetrans(nscd_t, nscd_var_run_t, { file sock_file dir })
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
bb8816 |
corecmd_search_bin(nscd_t)
|
|
Chris PeBenito |
bb8816 |
can_exec(nscd_t, nscd_exec_t)
|
|
Chris PeBenito |
bb8816 |
|
|
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 |
937b2c |
fs_list_inotifyfs(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 |
190066 |
corenet_all_recvfrom_unlabeled(nscd_t)
|
|
Chris PeBenito |
190066 |
corenet_all_recvfrom_netlabel(nscd_t)
|
|
Chris PeBenito |
668b30 |
corenet_tcp_sendrecv_generic_if(nscd_t)
|
|
Chris PeBenito |
668b30 |
corenet_udp_sendrecv_generic_if(nscd_t)
|
|
Chris PeBenito |
c12621 |
corenet_tcp_sendrecv_generic_node(nscd_t)
|
|
Chris PeBenito |
c12621 |
corenet_udp_sendrecv_generic_node(nscd_t)
|
|
Chris PeBenito |
17de1b |
corenet_tcp_sendrecv_all_ports(nscd_t)
|
|
Chris PeBenito |
17de1b |
corenet_udp_sendrecv_all_ports(nscd_t)
|
|
Chris PeBenito |
bb8816 |
corenet_udp_bind_generic_node(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)
|
|
Dan Walsh |
3eaa99 |
domain_search_all_domains_state(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 |
bb8816 |
logging_send_audit_msgs(nscd_t)
|
|
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 |
296273 |
userdom_dontaudit_use_user_terminals(nscd_t)
|
|
Chris PeBenito |
17de1b |
userdom_dontaudit_use_unpriv_user_fds(nscd_t)
|
|
Chris PeBenito |
296273 |
userdom_dontaudit_search_user_home_dirs(nscd_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
optional_policy(`
|
|
Dan Walsh |
3eaa99 |
accountsd_dontaudit_rw_fifo_file(nscd_t)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
optional_policy(`
|
|
Chris PeBenito |
bb8816 |
cron_read_system_job_tmp_files(nscd_t)
|
|
Chris PeBenito |
bb8816 |
')
|
|
Chris PeBenito |
bb8816 |
|
|
Chris PeBenito |
bb8816 |
optional_policy(`
|
|
Chris PeBenito |
bb8816 |
kerberos_use(nscd_t)
|
|
Chris PeBenito |
bb8816 |
')
|
|
Chris PeBenito |
bb8816 |
|
|
Chris PeBenito |
bb8816 |
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 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
optional_policy(`
|
|
Dan Walsh |
3eaa99 |
tunable_policy(`samba_domain_controller',`
|
|
Dan Walsh |
3eaa99 |
samba_append_log(nscd_t)
|
|
Dan Walsh |
3eaa99 |
samba_dontaudit_use_fds(nscd_t)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dominick Grift |
68ac47 |
|
|
Dan Walsh |
3eaa99 |
samba_read_config(nscd_t)
|
|
Dan Walsh |
3eaa99 |
samba_read_var_files(nscd_t)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
optional_policy(`
|
|
Dan Walsh |
3eaa99 |
unconfined_dontaudit_rw_packet_sockets(nscd_t)
|
|
Dan Walsh |
3eaa99 |
')
|