2005-10-07 21:45:04 +00:00
|
|
|
|
2005-12-09 16:38:39 +00:00
|
|
|
policy_module(finger,1.1.0)
|
2005-10-07 21:45:04 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
type fingerd_t;
|
|
|
|
type fingerd_exec_t;
|
2005-10-31 20:32:53 +00:00
|
|
|
init_daemon_domain(fingerd_t,fingerd_exec_t)
|
2005-10-07 21:45:04 +00:00
|
|
|
inetd_tcp_service_domain(fingerd_t,fingerd_exec_t)
|
|
|
|
|
2005-10-24 18:40:24 +00:00
|
|
|
type fingerd_etc_t;
|
|
|
|
files_config_file(fingerd_etc_t)
|
2005-10-07 21:45:04 +00:00
|
|
|
|
|
|
|
type fingerd_log_t;
|
|
|
|
logging_log_file(fingerd_log_t)
|
|
|
|
|
|
|
|
type fingerd_var_run_t;
|
|
|
|
files_pid_file(fingerd_var_run_t)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
allow fingerd_t self:capability { setgid setuid };
|
|
|
|
dontaudit fingerd_t self:capability { sys_tty_config fsetid };
|
|
|
|
allow fingerd_t self:process signal_perms;
|
|
|
|
allow fingerd_t self:fifo_file { read write getattr };
|
|
|
|
allow fingerd_t self:tcp_socket connected_stream_socket_perms;
|
|
|
|
allow fingerd_t self:udp_socket create_socket_perms;
|
|
|
|
allow fingerd_t self:unix_dgram_socket create_socket_perms;
|
|
|
|
allow fingerd_t self:unix_stream_socket create_socket_perms;
|
|
|
|
|
|
|
|
allow fingerd_t fingerd_var_run_t:file create_file_perms;
|
|
|
|
allow fingerd_t fingerd_var_run_t:dir rw_dir_perms;
|
2006-01-13 21:06:49 +00:00
|
|
|
files_filetrans_pid(fingerd_t,fingerd_var_run_t)
|
2005-10-07 21:45:04 +00:00
|
|
|
|
|
|
|
allow fingerd_t fingerd_etc_t:file r_file_perms;
|
|
|
|
allow fingerd_t fingerd_etc_t:dir r_dir_perms;
|
|
|
|
allow fingerd_t fingerd_etc_t:lnk_file { getattr read };
|
|
|
|
|
|
|
|
allow fingerd_t fingerd_log_t:file create_file_perms;
|
2006-01-13 21:06:49 +00:00
|
|
|
logging_filetrans_log(fingerd_t,fingerd_log_t)
|
2005-10-07 21:45:04 +00:00
|
|
|
|
|
|
|
kernel_read_kernel_sysctl(fingerd_t)
|
|
|
|
kernel_read_system_state(fingerd_t)
|
|
|
|
kernel_tcp_recvfrom(fingerd_t)
|
|
|
|
|
|
|
|
corenet_tcp_sendrecv_all_if(fingerd_t)
|
|
|
|
corenet_udp_sendrecv_all_if(fingerd_t)
|
|
|
|
corenet_raw_sendrecv_all_if(fingerd_t)
|
|
|
|
corenet_tcp_sendrecv_all_nodes(fingerd_t)
|
|
|
|
corenet_udp_sendrecv_all_nodes(fingerd_t)
|
|
|
|
corenet_raw_sendrecv_all_nodes(fingerd_t)
|
|
|
|
corenet_tcp_sendrecv_all_ports(fingerd_t)
|
|
|
|
corenet_udp_sendrecv_all_ports(fingerd_t)
|
2005-12-06 19:59:50 +00:00
|
|
|
corenet_non_ipsec_sendrecv(fingerd_t)
|
2005-10-07 21:45:04 +00:00
|
|
|
corenet_tcp_bind_all_nodes(fingerd_t)
|
|
|
|
corenet_udp_bind_all_nodes(fingerd_t)
|
|
|
|
corenet_tcp_bind_fingerd_port(fingerd_t)
|
|
|
|
|
|
|
|
dev_read_sysfs(fingerd_t)
|
|
|
|
|
|
|
|
fs_getattr_all_fs(fingerd_t)
|
|
|
|
fs_search_auto_mountpoints(fingerd_t)
|
|
|
|
|
|
|
|
term_dontaudit_use_console(fingerd_t)
|
|
|
|
term_getattr_all_user_ttys(fingerd_t)
|
|
|
|
term_getattr_all_user_ptys(fingerd_t)
|
|
|
|
|
|
|
|
auth_read_lastlog(fingerd_t)
|
|
|
|
|
|
|
|
corecmd_exec_bin(fingerd_t)
|
|
|
|
corecmd_exec_sbin(fingerd_t)
|
|
|
|
corecmd_exec_shell(fingerd_t)
|
|
|
|
|
|
|
|
domain_use_wide_inherit_fd(fingerd_t)
|
|
|
|
|
2005-10-21 21:35:25 +00:00
|
|
|
files_search_home(fingerd_t)
|
2005-10-07 21:45:04 +00:00
|
|
|
files_read_etc_files(fingerd_t)
|
|
|
|
files_read_etc_runtime_files(fingerd_t)
|
|
|
|
|
2006-01-18 18:08:39 +00:00
|
|
|
init_read_utmp(fingerd_t)
|
|
|
|
init_dontaudit_write_utmp(fingerd_t)
|
2005-10-07 21:45:04 +00:00
|
|
|
init_use_fd(fingerd_t)
|
|
|
|
init_use_script_pty(fingerd_t)
|
|
|
|
|
|
|
|
libs_use_ld_so(fingerd_t)
|
|
|
|
libs_use_shared_libs(fingerd_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(fingerd_t)
|
|
|
|
|
|
|
|
mta_getattr_spool(fingerd_t)
|
|
|
|
|
|
|
|
sysnet_read_config(fingerd_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(fingerd_t)
|
|
|
|
|
|
|
|
userdom_read_unpriv_user_home_files(fingerd_t)
|
|
|
|
userdom_dontaudit_use_unpriv_user_fd(fingerd_t)
|
|
|
|
userdom_dontaudit_search_sysadm_home_dir(fingerd_t)
|
2005-11-29 21:27:15 +00:00
|
|
|
# stop it accessing sub-directories, prevents checking a Maildir for new mail,
|
|
|
|
# have to change this when we create a type for Maildir
|
|
|
|
userdom_dontaudit_search_user_home_dirs(fingerd_t)
|
2005-10-07 21:45:04 +00:00
|
|
|
|
|
|
|
ifdef(`targeted_policy',`
|
|
|
|
term_dontaudit_use_unallocated_tty(fingerd_t)
|
|
|
|
term_dontaudit_use_generic_pty(fingerd_t)
|
|
|
|
files_dontaudit_read_root_file(fingerd_t)
|
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`cron',`
|
2005-10-07 21:45:04 +00:00
|
|
|
cron_system_entry(fingerd_t,fingerd_exec_t)
|
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`logrotate',`
|
2005-10-07 21:45:04 +00:00
|
|
|
logrotate_exec(fingerd_t)
|
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`nis',`
|
2005-10-07 21:45:04 +00:00
|
|
|
nis_use_ypbind(fingerd_t)
|
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`nscd',`
|
2005-10-25 18:28:41 +00:00
|
|
|
nscd_use_socket(fingerd_t)
|
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`selinuxutil',`
|
2005-10-07 21:45:04 +00:00
|
|
|
seutil_sigchld_newrole(fingerd_t)
|
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`udev',`
|
2005-10-07 21:45:04 +00:00
|
|
|
udev_read_db(fingerd_t)
|
|
|
|
')
|