2010-05-24 19:32:01 +00:00
|
|
|
policy_module(cups, 1.14.0)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type cupsd_config_t;
|
|
|
|
type cupsd_config_exec_t;
|
2008-07-23 21:38:39 +00:00
|
|
|
init_daemon_domain(cupsd_config_t, cupsd_config_exec_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
|
|
|
type cupsd_config_var_run_t;
|
|
|
|
files_pid_file(cupsd_config_var_run_t)
|
|
|
|
|
|
|
|
type cupsd_t;
|
2006-10-04 17:25:34 +00:00
|
|
|
type cupsd_exec_t;
|
2008-07-23 21:38:39 +00:00
|
|
|
init_daemon_domain(cupsd_t, cupsd_exec_t)
|
2010-08-26 13:41:21 +00:00
|
|
|
mls_trusted_object(cupsd_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2005-10-24 18:40:24 +00:00
|
|
|
type cupsd_etc_t;
|
|
|
|
files_config_file(cupsd_etc_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2009-07-28 19:46:26 +00:00
|
|
|
type cupsd_initrc_exec_t;
|
|
|
|
init_script_file(cupsd_initrc_exec_t)
|
|
|
|
|
2010-05-18 14:59:37 +00:00
|
|
|
type cupsd_interface_t;
|
|
|
|
files_type(cupsd_interface_t)
|
|
|
|
|
2005-10-24 18:40:24 +00:00
|
|
|
type cupsd_rw_etc_t;
|
|
|
|
files_config_file(cupsd_rw_etc_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2009-07-28 19:46:26 +00:00
|
|
|
type cupsd_lock_t;
|
|
|
|
files_lock_file(cupsd_lock_t)
|
|
|
|
|
2005-10-23 22:10:59 +00:00
|
|
|
type cupsd_log_t;
|
|
|
|
logging_log_file(cupsd_log_t)
|
|
|
|
|
|
|
|
type cupsd_lpd_t;
|
|
|
|
type cupsd_lpd_exec_t;
|
2006-03-24 16:48:35 +00:00
|
|
|
domain_type(cupsd_lpd_t)
|
2008-07-23 21:38:39 +00:00
|
|
|
domain_entry_file(cupsd_lpd_t, cupsd_lpd_exec_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
role system_r types cupsd_lpd_t;
|
|
|
|
|
|
|
|
type cupsd_lpd_tmp_t;
|
|
|
|
files_tmp_file(cupsd_lpd_tmp_t)
|
|
|
|
|
|
|
|
type cupsd_lpd_var_run_t;
|
|
|
|
files_pid_file(cupsd_lpd_var_run_t)
|
|
|
|
|
2009-07-28 19:46:26 +00:00
|
|
|
type cups_pdf_t;
|
|
|
|
type cups_pdf_exec_t;
|
|
|
|
cups_backend(cups_pdf_t, cups_pdf_exec_t)
|
|
|
|
|
|
|
|
type cups_pdf_tmp_t;
|
|
|
|
files_tmp_file(cups_pdf_tmp_t)
|
|
|
|
|
2005-10-23 22:10:59 +00:00
|
|
|
type cupsd_tmp_t;
|
|
|
|
files_tmp_file(cupsd_tmp_t)
|
|
|
|
|
|
|
|
type cupsd_var_run_t;
|
|
|
|
files_pid_file(cupsd_var_run_t)
|
2006-12-04 20:10:56 +00:00
|
|
|
mls_trusted_object(cupsd_var_run_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
|
|
|
type hplip_t;
|
|
|
|
type hplip_exec_t;
|
2008-07-23 21:38:39 +00:00
|
|
|
init_daemon_domain(hplip_t, hplip_exec_t)
|
2009-07-28 19:46:26 +00:00
|
|
|
# For CUPS to run as a backend
|
|
|
|
cups_backend(hplip_t, hplip_exec_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2005-10-24 18:40:24 +00:00
|
|
|
type hplip_etc_t;
|
|
|
|
files_config_file(hplip_etc_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2009-07-28 19:46:26 +00:00
|
|
|
type hplip_tmp_t;
|
|
|
|
files_tmp_file(hplip_tmp_t)
|
|
|
|
|
2010-05-18 14:59:37 +00:00
|
|
|
type hplip_var_lib_t;
|
|
|
|
files_type(hplip_var_lib_t)
|
|
|
|
|
2005-10-23 22:10:59 +00:00
|
|
|
type hplip_var_run_t;
|
|
|
|
files_pid_file(hplip_var_run_t)
|
|
|
|
|
|
|
|
type ptal_t;
|
|
|
|
type ptal_exec_t;
|
2008-07-23 21:38:39 +00:00
|
|
|
init_daemon_domain(ptal_t, ptal_exec_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2005-10-24 18:40:24 +00:00
|
|
|
type ptal_etc_t;
|
|
|
|
files_config_file(ptal_etc_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
|
|
|
type ptal_var_run_t;
|
|
|
|
files_pid_file(ptal_var_run_t)
|
|
|
|
|
2006-10-04 17:25:34 +00:00
|
|
|
ifdef(`enable_mcs',`
|
2009-06-26 14:40:13 +00:00
|
|
|
init_ranged_daemon_domain(cupsd_t, cupsd_exec_t, s0 - mcs_systemhigh)
|
2006-10-04 17:25:34 +00:00
|
|
|
')
|
|
|
|
|
2006-10-31 21:01:48 +00:00
|
|
|
ifdef(`enable_mls',`
|
2009-06-26 14:40:13 +00:00
|
|
|
init_ranged_daemon_domain(cupsd_t, cupsd_exec_t, mls_systemhigh)
|
2006-10-31 21:01:48 +00:00
|
|
|
')
|
|
|
|
|
2005-10-23 22:10:59 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Cups local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
# /usr/lib/cups/backend/serial needs sys_admin(?!)
|
2010-05-18 14:59:37 +00:00
|
|
|
allow cupsd_t self:capability { ipc_lock sys_admin dac_override dac_read_search kill setgid setuid fsetid net_bind_service fowner chown dac_override sys_rawio sys_resource sys_tty_config };
|
2005-10-24 18:40:24 +00:00
|
|
|
dontaudit cupsd_t self:capability { sys_tty_config net_admin };
|
2009-07-28 19:46:26 +00:00
|
|
|
allow cupsd_t self:process { getpgid setpgid setsched signal_perms };
|
|
|
|
allow cupsd_t self:fifo_file rw_fifo_file_perms;
|
2006-03-23 19:19:38 +00:00
|
|
|
allow cupsd_t self:unix_stream_socket { create_stream_socket_perms connectto };
|
2005-10-23 22:10:59 +00:00
|
|
|
allow cupsd_t self:unix_dgram_socket create_socket_perms;
|
2006-08-29 02:41:00 +00:00
|
|
|
allow cupsd_t self:netlink_selinux_socket create_socket_perms;
|
2009-07-28 19:46:26 +00:00
|
|
|
allow cupsd_t self:shm create_shm_perms;
|
2010-05-18 14:59:37 +00:00
|
|
|
allow cupsd_t self:sem create_sem_perms;
|
2006-08-15 20:00:58 +00:00
|
|
|
allow cupsd_t self:tcp_socket create_stream_socket_perms;
|
2005-10-23 22:10:59 +00:00
|
|
|
allow cupsd_t self:udp_socket create_socket_perms;
|
2006-05-04 20:40:49 +00:00
|
|
|
allow cupsd_t self:appletalk_socket create_socket_perms;
|
|
|
|
# generic socket here until appletalk socket is available in kernels
|
|
|
|
allow cupsd_t self:socket create_socket_perms;
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow cupsd_t cupsd_etc_t:{ dir file } setattr;
|
2008-07-23 21:38:39 +00:00
|
|
|
read_files_pattern(cupsd_t, cupsd_etc_t, cupsd_etc_t)
|
|
|
|
read_lnk_files_pattern(cupsd_t, cupsd_etc_t, cupsd_etc_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
files_search_etc(cupsd_t)
|
|
|
|
|
2010-05-18 14:59:37 +00:00
|
|
|
manage_files_pattern(cupsd_t, cupsd_interface_t, cupsd_interface_t)
|
2010-08-26 13:41:21 +00:00
|
|
|
can_exec(cupsd_t, cupsd_interface_t)
|
2010-05-18 14:59:37 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_dirs_pattern(cupsd_t, cupsd_etc_t, cupsd_rw_etc_t)
|
|
|
|
manage_files_pattern(cupsd_t, cupsd_etc_t, cupsd_rw_etc_t)
|
|
|
|
filetrans_pattern(cupsd_t, cupsd_etc_t, cupsd_rw_etc_t, file)
|
|
|
|
files_var_filetrans(cupsd_t, cupsd_rw_etc_t, { dir file })
|
2005-10-23 22:10:59 +00:00
|
|
|
|
|
|
|
# allow cups to execute its backend scripts
|
|
|
|
can_exec(cupsd_t, cupsd_exec_t)
|
2009-07-28 19:46:26 +00:00
|
|
|
allow cupsd_t cupsd_exec_t:dir search_dir_perms;
|
|
|
|
allow cupsd_t cupsd_exec_t:lnk_file read_lnk_file_perms;
|
|
|
|
|
|
|
|
allow cupsd_t cupsd_lock_t:file manage_file_perms;
|
|
|
|
files_lock_filetrans(cupsd_t, cupsd_lock_t, file)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
manage_dirs_pattern(cupsd_t, cupsd_log_t, cupsd_log_t)
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern(cupsd_t, cupsd_log_t, cupsd_log_t)
|
2006-12-12 20:08:08 +00:00
|
|
|
allow cupsd_t cupsd_log_t:dir setattr;
|
2008-07-23 21:38:39 +00:00
|
|
|
logging_log_filetrans(cupsd_t, cupsd_log_t, { file dir })
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_dirs_pattern(cupsd_t, cupsd_tmp_t, cupsd_tmp_t)
|
|
|
|
manage_files_pattern(cupsd_t, cupsd_tmp_t, cupsd_tmp_t)
|
|
|
|
manage_fifo_files_pattern(cupsd_t, cupsd_tmp_t, cupsd_tmp_t)
|
2006-02-21 18:40:44 +00:00
|
|
|
files_tmp_filetrans(cupsd_t, cupsd_tmp_t, { file dir fifo_file })
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow cupsd_t cupsd_var_run_t:dir setattr;
|
2010-08-26 13:41:21 +00:00
|
|
|
manage_dirs_pattern(cupsd_t, cupsd_var_run_t, cupsd_var_run_t)
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern(cupsd_t, cupsd_var_run_t, cupsd_var_run_t)
|
|
|
|
manage_sock_files_pattern(cupsd_t, cupsd_var_run_t, cupsd_var_run_t)
|
2009-07-28 19:46:26 +00:00
|
|
|
manage_fifo_files_pattern(cupsd_t, cupsd_var_run_t, cupsd_var_run_t)
|
2010-08-26 13:41:21 +00:00
|
|
|
files_pid_filetrans(cupsd_t, cupsd_var_run_t, { dir file fifo_file })
|
2009-07-28 19:46:26 +00:00
|
|
|
|
|
|
|
allow cupsd_t hplip_t:process { signal sigkill };
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_files_pattern(cupsd_t, hplip_etc_t, hplip_etc_t)
|
2006-10-31 21:01:48 +00:00
|
|
|
|
2008-10-16 16:09:20 +00:00
|
|
|
allow cupsd_t hplip_var_run_t:file read_file_perms;
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
stream_connect_pattern(cupsd_t, ptal_var_run_t, ptal_var_run_t, ptal_t)
|
2006-12-12 20:08:08 +00:00
|
|
|
allow cupsd_t ptal_var_run_t : sock_file setattr;
|
2005-10-23 22:10:59 +00:00
|
|
|
|
|
|
|
kernel_read_system_state(cupsd_t)
|
2006-03-23 19:19:38 +00:00
|
|
|
kernel_read_network_state(cupsd_t)
|
2006-01-31 16:49:43 +00:00
|
|
|
kernel_read_all_sysctls(cupsd_t)
|
2010-05-18 14:59:37 +00:00
|
|
|
kernel_request_load_module(cupsd_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2007-06-27 15:23:21 +00:00
|
|
|
corenet_all_recvfrom_unlabeled(cupsd_t)
|
|
|
|
corenet_all_recvfrom_netlabel(cupsd_t)
|
2009-01-06 20:24:10 +00:00
|
|
|
corenet_tcp_sendrecv_generic_if(cupsd_t)
|
|
|
|
corenet_udp_sendrecv_generic_if(cupsd_t)
|
|
|
|
corenet_raw_sendrecv_generic_if(cupsd_t)
|
2009-01-09 19:48:02 +00:00
|
|
|
corenet_tcp_sendrecv_generic_node(cupsd_t)
|
|
|
|
corenet_udp_sendrecv_generic_node(cupsd_t)
|
|
|
|
corenet_raw_sendrecv_generic_node(cupsd_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
corenet_tcp_sendrecv_all_ports(cupsd_t)
|
|
|
|
corenet_udp_sendrecv_all_ports(cupsd_t)
|
2009-01-09 19:48:02 +00:00
|
|
|
corenet_tcp_bind_generic_node(cupsd_t)
|
|
|
|
corenet_udp_bind_generic_node(cupsd_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
corenet_tcp_bind_ipp_port(cupsd_t)
|
|
|
|
corenet_udp_bind_ipp_port(cupsd_t)
|
2010-05-18 14:59:37 +00:00
|
|
|
corenet_udp_bind_howl_port(cupsd_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
corenet_tcp_bind_reserved_port(cupsd_t)
|
|
|
|
corenet_dontaudit_tcp_bind_all_reserved_ports(cupsd_t)
|
2009-07-28 19:46:26 +00:00
|
|
|
corenet_tcp_bind_all_rpc_ports(cupsd_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
corenet_tcp_connect_all_ports(cupsd_t)
|
2006-05-25 17:56:07 +00:00
|
|
|
corenet_sendrecv_hplip_client_packets(cupsd_t)
|
2006-05-25 18:41:14 +00:00
|
|
|
corenet_sendrecv_ipp_client_packets(cupsd_t)
|
|
|
|
corenet_sendrecv_ipp_server_packets(cupsd_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
|
|
|
dev_rw_printer(cupsd_t)
|
|
|
|
dev_read_urand(cupsd_t)
|
|
|
|
dev_read_sysfs(cupsd_t)
|
2009-07-28 19:46:26 +00:00
|
|
|
dev_rw_input_dev(cupsd_t) #447878
|
|
|
|
dev_rw_generic_usb_dev(cupsd_t)
|
|
|
|
dev_rw_usbfs(cupsd_t)
|
2006-12-04 20:10:56 +00:00
|
|
|
dev_getattr_printer_dev(cupsd_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2006-08-29 02:41:00 +00:00
|
|
|
domain_read_all_domains_state(cupsd_t)
|
|
|
|
|
2005-10-23 22:10:59 +00:00
|
|
|
fs_getattr_all_fs(cupsd_t)
|
|
|
|
fs_search_auto_mountpoints(cupsd_t)
|
2010-05-18 14:59:37 +00:00
|
|
|
fs_search_fusefs(cupsd_t)
|
2009-07-28 19:46:26 +00:00
|
|
|
fs_read_anon_inodefs_files(cupsd_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2006-10-31 21:01:48 +00:00
|
|
|
mls_file_downgrade(cupsd_t)
|
2007-08-20 18:26:08 +00:00
|
|
|
mls_file_write_all_levels(cupsd_t)
|
|
|
|
mls_file_read_all_levels(cupsd_t)
|
2009-07-28 19:46:26 +00:00
|
|
|
mls_rangetrans_target(cupsd_t)
|
2006-10-31 21:01:48 +00:00
|
|
|
mls_socket_write_all_levels(cupsd_t)
|
2009-07-28 19:46:26 +00:00
|
|
|
mls_fd_use_all_levels(cupsd_t)
|
2006-10-31 21:01:48 +00:00
|
|
|
|
2006-09-22 17:14:35 +00:00
|
|
|
term_use_unallocated_ttys(cupsd_t)
|
2006-06-08 17:18:25 +00:00
|
|
|
term_search_ptys(cupsd_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
|
|
|
# Filter scripts may be shell scripts, and may invoke progs like /bin/mktemp
|
|
|
|
corecmd_exec_shell(cupsd_t)
|
|
|
|
corecmd_exec_bin(cupsd_t)
|
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
domain_use_interactive_fds(cupsd_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2009-07-28 19:46:26 +00:00
|
|
|
files_list_spool(cupsd_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
files_read_etc_files(cupsd_t)
|
|
|
|
files_read_etc_runtime_files(cupsd_t)
|
|
|
|
# read python modules
|
|
|
|
files_read_usr_files(cupsd_t)
|
|
|
|
# for /var/lib/defoma
|
2009-07-28 19:46:26 +00:00
|
|
|
files_read_var_lib_files(cupsd_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
files_list_world_readable(cupsd_t)
|
|
|
|
files_read_world_readable_files(cupsd_t)
|
|
|
|
files_read_world_readable_symlinks(cupsd_t)
|
2006-06-08 17:18:25 +00:00
|
|
|
# Satisfy readahead
|
|
|
|
files_read_var_files(cupsd_t)
|
|
|
|
files_read_var_symlinks(cupsd_t)
|
|
|
|
# for /etc/printcap
|
|
|
|
files_dontaudit_write_etc_files(cupsd_t)
|
2007-02-16 23:01:42 +00:00
|
|
|
# smbspool seems to be iterating through all existing tmp files.
|
|
|
|
# redhat bug #214953
|
|
|
|
# cjp: this might be a broken behavior
|
|
|
|
files_dontaudit_getattr_all_tmp_files(cupsd_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2006-08-29 02:41:00 +00:00
|
|
|
selinux_compute_access_vector(cupsd_t)
|
2009-07-28 19:46:26 +00:00
|
|
|
selinux_validate_context(cupsd_t)
|
2006-08-29 02:41:00 +00:00
|
|
|
|
2006-02-06 15:40:41 +00:00
|
|
|
init_exec_script_files(cupsd_t)
|
2009-07-28 19:46:26 +00:00
|
|
|
init_read_utmp(cupsd_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2009-07-28 19:46:26 +00:00
|
|
|
auth_domtrans_chk_passwd(cupsd_t)
|
|
|
|
auth_dontaudit_read_pam_pid(cupsd_t)
|
|
|
|
auth_rw_faillog(cupsd_t)
|
2007-12-04 15:05:55 +00:00
|
|
|
auth_use_nsswitch(cupsd_t)
|
|
|
|
|
2005-10-23 22:10:59 +00:00
|
|
|
# Read /usr/lib/gconv/gconv-modules.* and /usr/lib/python2.2/.*
|
2006-02-02 21:08:12 +00:00
|
|
|
libs_read_lib_files(cupsd_t)
|
2009-07-28 19:46:26 +00:00
|
|
|
libs_exec_lib_files(cupsd_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2007-06-12 18:46:14 +00:00
|
|
|
logging_send_audit_msgs(cupsd_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
logging_send_syslog_msg(cupsd_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(cupsd_t)
|
|
|
|
# invoking ghostscript needs to read fonts
|
|
|
|
miscfiles_read_fonts(cupsd_t)
|
2010-05-18 14:59:37 +00:00
|
|
|
miscfiles_setattr_fonts_cache_dirs(cupsd_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2006-08-29 02:41:00 +00:00
|
|
|
seutil_read_config(cupsd_t)
|
2009-07-28 19:46:26 +00:00
|
|
|
sysnet_exec_ifconfig(cupsd_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2009-07-28 19:46:26 +00:00
|
|
|
files_dontaudit_list_home(cupsd_t)
|
2006-02-20 21:33:25 +00:00
|
|
|
userdom_dontaudit_use_unpriv_user_fds(cupsd_t)
|
2008-11-05 16:10:46 +00:00
|
|
|
userdom_dontaudit_search_user_home_content(cupsd_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
|
|
|
# Write to /var/spool/cups.
|
|
|
|
lpd_manage_spool(cupsd_t)
|
2009-07-28 19:46:26 +00:00
|
|
|
lpd_read_config(cupsd_t)
|
|
|
|
lpd_exec_lpr(cupsd_t)
|
|
|
|
lpd_relabel_spool(cupsd_t)
|
2006-10-31 21:01:48 +00:00
|
|
|
|
2006-08-29 02:41:00 +00:00
|
|
|
optional_policy(`
|
|
|
|
apm_domtrans_client(cupsd_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-01-17 17:50:10 +00:00
|
|
|
cron_system_entry(cupsd_t, cupsd_exec_t)
|
2005-11-29 21:27:15 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2008-11-05 16:10:46 +00:00
|
|
|
dbus_system_bus_client(cupsd_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2005-11-29 21:27:15 +00:00
|
|
|
userdom_dbus_send_all_users(cupsd_t)
|
|
|
|
|
2009-07-28 19:46:26 +00:00
|
|
|
optional_policy(`
|
|
|
|
avahi_dbus_chat(cupsd_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-11-29 21:27:15 +00:00
|
|
|
hal_dbus_chat(cupsd_t)
|
|
|
|
')
|
2009-07-28 19:46:26 +00:00
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
# talk to processes that do not have policy
|
2009-07-28 19:46:26 +00:00
|
|
|
optional_policy(`
|
|
|
|
unconfined_dbus_chat(cupsd_t)
|
2010-08-26 13:41:21 +00:00
|
|
|
files_write_generic_pid_pipes(cupsd_t)
|
2009-07-28 19:46:26 +00:00
|
|
|
')
|
2005-10-23 22:10:59 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-10-23 22:10:59 +00:00
|
|
|
hostname_exec(cupsd_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2008-05-22 15:24:52 +00:00
|
|
|
inetd_core_service_domain(cupsd_t, cupsd_exec_t)
|
2005-11-29 21:27:15 +00:00
|
|
|
')
|
|
|
|
|
2006-08-29 02:41:00 +00:00
|
|
|
optional_policy(`
|
|
|
|
logrotate_domtrans(cupsd_t)
|
|
|
|
')
|
|
|
|
|
2009-07-28 19:46:26 +00:00
|
|
|
optional_policy(`
|
|
|
|
mta_send_mail(cupsd_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-10-31 21:01:48 +00:00
|
|
|
# cups execs smbtool which reads samba_etc_t files
|
2006-09-11 18:23:09 +00:00
|
|
|
samba_read_config(cupsd_t)
|
2005-11-29 21:27:15 +00:00
|
|
|
samba_rw_var_files(cupsd_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-10-23 22:10:59 +00:00
|
|
|
seutil_sigchld_newrole(cupsd_t)
|
|
|
|
')
|
|
|
|
|
2010-05-18 14:59:37 +00:00
|
|
|
optional_policy(`
|
|
|
|
snmp_read_snmp_var_lib_files(cupsd_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-10-23 22:10:59 +00:00
|
|
|
udev_read_db(cupsd_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Cups configuration daemon local policy
|
|
|
|
#
|
|
|
|
|
2009-07-28 19:46:26 +00:00
|
|
|
allow cupsd_config_t self:capability { chown dac_override sys_tty_config };
|
2005-10-26 16:00:13 +00:00
|
|
|
dontaudit cupsd_config_t self:capability sys_tty_config;
|
2010-05-18 14:59:37 +00:00
|
|
|
allow cupsd_config_t self:process { getsched signal_perms };
|
2006-12-12 20:08:08 +00:00
|
|
|
allow cupsd_config_t self:fifo_file rw_fifo_file_perms;
|
2005-10-23 22:10:59 +00:00
|
|
|
allow cupsd_config_t self:unix_stream_socket create_socket_perms;
|
|
|
|
allow cupsd_config_t self:unix_dgram_socket create_socket_perms;
|
2005-11-10 16:54:18 +00:00
|
|
|
allow cupsd_config_t self:tcp_socket create_stream_socket_perms;
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow cupsd_config_t cupsd_t:process signal;
|
2008-07-23 21:38:39 +00:00
|
|
|
ps_process_pattern(cupsd_config_t, cupsd_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern(cupsd_config_t, cupsd_etc_t, cupsd_etc_t)
|
|
|
|
manage_lnk_files_pattern(cupsd_config_t, cupsd_etc_t, cupsd_etc_t)
|
|
|
|
filetrans_pattern(cupsd_config_t, cupsd_etc_t, cupsd_rw_etc_t, file)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern(cupsd_config_t, cupsd_rw_etc_t, cupsd_rw_etc_t)
|
|
|
|
manage_lnk_files_pattern(cupsd_config_t, cupsd_rw_etc_t, cupsd_rw_etc_t)
|
|
|
|
files_var_filetrans(cupsd_config_t, cupsd_rw_etc_t, file)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2010-05-18 14:59:37 +00:00
|
|
|
can_exec(cupsd_config_t, cupsd_config_exec_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2005-12-09 15:42:39 +00:00
|
|
|
allow cupsd_config_t cupsd_log_t:file rw_file_perms;
|
|
|
|
|
2009-07-28 19:46:26 +00:00
|
|
|
manage_lnk_files_pattern(cupsd_config_t, cupsd_tmp_t, cupsd_tmp_t)
|
|
|
|
manage_files_pattern(cupsd_config_t, cupsd_tmp_t, cupsd_tmp_t)
|
|
|
|
manage_dirs_pattern(cupsd_config_t, cupsd_tmp_t, cupsd_tmp_t)
|
|
|
|
files_tmp_filetrans(cupsd_config_t, cupsd_tmp_t, { lnk_file file dir })
|
2006-06-21 18:25:06 +00:00
|
|
|
|
2008-10-16 16:09:20 +00:00
|
|
|
allow cupsd_config_t cupsd_var_run_t:file read_file_perms;
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
manage_dirs_pattern(cupsd_config_t, cupsd_config_var_run_t, cupsd_config_var_run_t)
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern(cupsd_config_t, cupsd_config_var_run_t, cupsd_config_var_run_t)
|
2010-08-26 13:41:21 +00:00
|
|
|
files_pid_filetrans(cupsd_config_t, cupsd_config_var_run_t, { dir file })
|
2006-12-12 20:08:08 +00:00
|
|
|
|
2009-07-28 19:46:26 +00:00
|
|
|
domtrans_pattern(cupsd_config_t, hplip_exec_t, hplip_t)
|
|
|
|
|
|
|
|
read_files_pattern(cupsd_config_t, hplip_etc_t, hplip_etc_t)
|
|
|
|
|
2005-10-23 22:10:59 +00:00
|
|
|
kernel_read_system_state(cupsd_config_t)
|
2009-07-28 19:46:26 +00:00
|
|
|
kernel_read_all_sysctls(cupsd_config_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2007-06-27 15:23:21 +00:00
|
|
|
corenet_all_recvfrom_unlabeled(cupsd_config_t)
|
|
|
|
corenet_all_recvfrom_netlabel(cupsd_config_t)
|
2009-01-06 20:24:10 +00:00
|
|
|
corenet_tcp_sendrecv_generic_if(cupsd_config_t)
|
2009-01-09 19:48:02 +00:00
|
|
|
corenet_tcp_sendrecv_generic_node(cupsd_config_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
corenet_tcp_sendrecv_all_ports(cupsd_config_t)
|
|
|
|
corenet_tcp_connect_all_ports(cupsd_config_t)
|
2006-06-14 20:52:45 +00:00
|
|
|
corenet_sendrecv_all_client_packets(cupsd_config_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
|
|
|
dev_read_sysfs(cupsd_config_t)
|
|
|
|
dev_read_urand(cupsd_config_t)
|
2006-06-21 18:25:06 +00:00
|
|
|
dev_read_rand(cupsd_config_t)
|
2009-07-28 19:46:26 +00:00
|
|
|
dev_rw_generic_usb_dev(cupsd_config_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2010-05-18 14:59:37 +00:00
|
|
|
files_search_all_mountpoints(cupsd_config_t)
|
|
|
|
|
2005-10-23 22:10:59 +00:00
|
|
|
fs_getattr_all_fs(cupsd_config_t)
|
|
|
|
fs_search_auto_mountpoints(cupsd_config_t)
|
|
|
|
|
|
|
|
corecmd_exec_bin(cupsd_config_t)
|
|
|
|
corecmd_exec_shell(cupsd_config_t)
|
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
domain_use_interactive_fds(cupsd_config_t)
|
2005-11-29 21:27:15 +00:00
|
|
|
# killall causes the following
|
|
|
|
domain_dontaudit_search_all_domains_state(cupsd_config_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
|
|
|
files_read_usr_files(cupsd_config_t)
|
2005-10-26 16:00:13 +00:00
|
|
|
files_read_etc_files(cupsd_config_t)
|
|
|
|
files_read_etc_runtime_files(cupsd_config_t)
|
2006-06-08 17:18:25 +00:00
|
|
|
files_read_var_symlinks(cupsd_config_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2006-06-08 17:18:25 +00:00
|
|
|
# Alternatives asks for this
|
2009-07-28 19:46:26 +00:00
|
|
|
init_getattr_all_script_files(cupsd_config_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2007-12-04 15:05:55 +00:00
|
|
|
auth_use_nsswitch(cupsd_config_t)
|
|
|
|
|
2005-10-23 22:10:59 +00:00
|
|
|
logging_send_syslog_msg(cupsd_config_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(cupsd_config_t)
|
2009-07-28 19:46:26 +00:00
|
|
|
miscfiles_read_hwdata(cupsd_config_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
|
|
|
seutil_dontaudit_search_config(cupsd_config_t)
|
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
userdom_dontaudit_use_unpriv_user_fds(cupsd_config_t)
|
2008-11-05 16:10:46 +00:00
|
|
|
userdom_dontaudit_search_user_home_dirs(cupsd_config_t)
|
2010-08-26 13:41:21 +00:00
|
|
|
userdom_rw_user_tmp_files(cupsd_config_t)
|
2008-04-29 13:58:34 +00:00
|
|
|
|
|
|
|
cups_stream_connect(cupsd_config_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2006-06-08 17:18:25 +00:00
|
|
|
lpd_read_config(cupsd_config_t)
|
|
|
|
|
2005-11-29 21:27:15 +00:00
|
|
|
ifdef(`distro_redhat',`
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-11-29 21:27:15 +00:00
|
|
|
rpm_read_db(cupsd_config_t)
|
|
|
|
')
|
|
|
|
')
|
|
|
|
|
2010-05-18 14:59:37 +00:00
|
|
|
optional_policy(`
|
|
|
|
term_use_generic_ptys(cupsd_config_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-01-17 17:50:10 +00:00
|
|
|
cron_system_entry(cupsd_config_t, cupsd_config_exec_t)
|
2005-11-29 21:27:15 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2010-05-18 14:59:37 +00:00
|
|
|
dbus_system_domain(cupsd_config_t, cupsd_config_exec_t)
|
2005-11-29 21:27:15 +00:00
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-11-29 21:27:15 +00:00
|
|
|
hal_dbus_chat(cupsd_config_t)
|
|
|
|
')
|
|
|
|
')
|
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
optional_policy(`
|
|
|
|
gnome_dontaudit_search_config(cupsd_config_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-10-26 21:03:19 +00:00
|
|
|
hal_domtrans(cupsd_config_t)
|
2006-06-21 18:25:06 +00:00
|
|
|
hal_read_tmp_files(cupsd_config_t)
|
2009-07-28 19:46:26 +00:00
|
|
|
hal_dontaudit_use_fds(hplip_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-10-23 22:10:59 +00:00
|
|
|
hostname_exec(cupsd_config_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-03-02 23:41:11 +00:00
|
|
|
logrotate_use_fds(cupsd_config_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
')
|
|
|
|
|
2010-05-18 14:59:37 +00:00
|
|
|
optional_policy(`
|
|
|
|
policykit_dbus_chat(cupsd_config_t)
|
|
|
|
userdom_read_all_users_state(cupsd_config_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-11-29 21:27:15 +00:00
|
|
|
rpm_read_db(cupsd_config_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-10-23 22:10:59 +00:00
|
|
|
seutil_sigchld_newrole(cupsd_config_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-10-23 22:10:59 +00:00
|
|
|
udev_read_db(cupsd_config_t)
|
|
|
|
')
|
|
|
|
|
2010-05-18 14:59:37 +00:00
|
|
|
optional_policy(`
|
|
|
|
unconfined_stream_connect(cupsd_config_t)
|
|
|
|
')
|
|
|
|
|
2005-10-23 22:10:59 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Cups lpd support
|
|
|
|
#
|
|
|
|
|
|
|
|
allow cupsd_lpd_t self:process signal_perms;
|
2006-12-12 20:08:08 +00:00
|
|
|
allow cupsd_lpd_t self:fifo_file rw_fifo_file_perms;
|
2005-10-23 22:10:59 +00:00
|
|
|
allow cupsd_lpd_t self:tcp_socket connected_stream_socket_perms;
|
2005-10-26 16:00:13 +00:00
|
|
|
allow cupsd_lpd_t self:udp_socket create_socket_perms;
|
2005-10-23 22:10:59 +00:00
|
|
|
|
|
|
|
# for identd
|
|
|
|
# cjp: this should probably only be inetd_child rules?
|
|
|
|
allow cupsd_lpd_t self:netlink_tcpdiag_socket r_netlink_socket_perms;
|
|
|
|
allow cupsd_lpd_t self:capability { setuid setgid };
|
|
|
|
files_search_home(cupsd_lpd_t)
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-10-23 22:10:59 +00:00
|
|
|
kerberos_use(cupsd_lpd_t)
|
|
|
|
')
|
|
|
|
#end for identd
|
|
|
|
|
2005-10-24 18:40:24 +00:00
|
|
|
allow cupsd_lpd_t cupsd_etc_t:dir list_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
read_files_pattern(cupsd_lpd_t, cupsd_etc_t, cupsd_etc_t)
|
|
|
|
read_lnk_files_pattern(cupsd_lpd_t, cupsd_etc_t, cupsd_etc_t)
|
2006-12-12 20:08:08 +00:00
|
|
|
|
|
|
|
allow cupsd_lpd_t cupsd_rw_etc_t:dir list_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
read_files_pattern(cupsd_lpd_t, cupsd_rw_etc_t, cupsd_rw_etc_t)
|
|
|
|
read_lnk_files_pattern(cupsd_lpd_t, cupsd_rw_etc_t, cupsd_rw_etc_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_dirs_pattern(cupsd_lpd_t, cupsd_lpd_tmp_t, cupsd_lpd_tmp_t)
|
|
|
|
manage_files_pattern(cupsd_lpd_t, cupsd_lpd_tmp_t, cupsd_lpd_tmp_t)
|
2006-02-21 18:40:44 +00:00
|
|
|
files_tmp_filetrans(cupsd_lpd_t, cupsd_lpd_tmp_t, { file dir })
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern(cupsd_lpd_t, cupsd_lpd_var_run_t, cupsd_lpd_var_run_t)
|
|
|
|
files_pid_filetrans(cupsd_lpd_t, cupsd_lpd_var_run_t, file)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2006-01-31 16:49:43 +00:00
|
|
|
kernel_read_kernel_sysctls(cupsd_lpd_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
kernel_read_system_state(cupsd_lpd_t)
|
|
|
|
kernel_read_network_state(cupsd_lpd_t)
|
|
|
|
|
2007-06-27 15:23:21 +00:00
|
|
|
corenet_all_recvfrom_unlabeled(cupsd_lpd_t)
|
|
|
|
corenet_all_recvfrom_netlabel(cupsd_lpd_t)
|
2009-01-06 20:24:10 +00:00
|
|
|
corenet_tcp_sendrecv_generic_if(cupsd_lpd_t)
|
|
|
|
corenet_udp_sendrecv_generic_if(cupsd_lpd_t)
|
2009-01-09 19:48:02 +00:00
|
|
|
corenet_tcp_sendrecv_generic_node(cupsd_lpd_t)
|
|
|
|
corenet_udp_sendrecv_generic_node(cupsd_lpd_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
corenet_tcp_sendrecv_all_ports(cupsd_lpd_t)
|
|
|
|
corenet_udp_sendrecv_all_ports(cupsd_lpd_t)
|
2009-01-09 19:48:02 +00:00
|
|
|
corenet_tcp_bind_generic_node(cupsd_lpd_t)
|
|
|
|
corenet_udp_bind_generic_node(cupsd_lpd_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
corenet_tcp_connect_ipp_port(cupsd_lpd_t)
|
|
|
|
|
|
|
|
dev_read_urand(cupsd_lpd_t)
|
2006-12-04 20:10:56 +00:00
|
|
|
dev_read_rand(cupsd_lpd_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
|
|
|
fs_getattr_xattr_fs(cupsd_lpd_t)
|
|
|
|
|
|
|
|
files_read_etc_files(cupsd_lpd_t)
|
|
|
|
|
2007-12-04 15:05:55 +00:00
|
|
|
auth_use_nsswitch(cupsd_lpd_t)
|
|
|
|
|
2005-10-23 22:10:59 +00:00
|
|
|
logging_send_syslog_msg(cupsd_lpd_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(cupsd_lpd_t)
|
2010-05-18 14:59:37 +00:00
|
|
|
miscfiles_setattr_fonts_cache_dirs(cupsd_lpd_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2006-05-19 14:02:24 +00:00
|
|
|
cups_stream_connect(cupsd_lpd_t)
|
|
|
|
|
2006-03-24 16:48:35 +00:00
|
|
|
optional_policy(`
|
2008-07-23 21:38:39 +00:00
|
|
|
inetd_service_domain(cupsd_lpd_t, cupsd_lpd_exec_t)
|
2006-03-24 16:48:35 +00:00
|
|
|
')
|
|
|
|
|
2009-07-28 19:46:26 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# cups_pdf local policy
|
|
|
|
#
|
|
|
|
|
2010-05-18 14:59:37 +00:00
|
|
|
allow cups_pdf_t self:capability { chown fowner fsetid setuid setgid dac_override };
|
2009-07-28 19:46:26 +00:00
|
|
|
allow cups_pdf_t self:fifo_file rw_file_perms;
|
|
|
|
allow cups_pdf_t self:unix_stream_socket create_stream_socket_perms;
|
|
|
|
|
|
|
|
manage_files_pattern(cups_pdf_t, cupsd_log_t, cupsd_log_t)
|
|
|
|
|
|
|
|
manage_files_pattern(cups_pdf_t, cups_pdf_tmp_t, cups_pdf_tmp_t)
|
|
|
|
manage_dirs_pattern(cups_pdf_t, cups_pdf_tmp_t, cups_pdf_tmp_t)
|
|
|
|
files_tmp_filetrans(cups_pdf_t, cups_pdf_tmp_t, { file dir })
|
|
|
|
|
2010-05-18 14:59:37 +00:00
|
|
|
fs_rw_anon_inodefs_files(cups_pdf_t)
|
|
|
|
|
2009-07-28 19:46:26 +00:00
|
|
|
kernel_read_system_state(cups_pdf_t)
|
|
|
|
|
|
|
|
files_read_etc_files(cups_pdf_t)
|
|
|
|
files_read_usr_files(cups_pdf_t)
|
|
|
|
|
|
|
|
corecmd_exec_shell(cups_pdf_t)
|
|
|
|
corecmd_exec_bin(cups_pdf_t)
|
|
|
|
|
|
|
|
auth_use_nsswitch(cups_pdf_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(cups_pdf_t)
|
|
|
|
miscfiles_read_fonts(cups_pdf_t)
|
2010-08-26 13:41:21 +00:00
|
|
|
miscfiles_setattr_fonts_cache_dirs(cups_pdf_t)
|
2009-07-28 19:46:26 +00:00
|
|
|
|
|
|
|
userdom_home_filetrans_user_home_dir(cups_pdf_t)
|
2010-08-26 13:41:21 +00:00
|
|
|
userdom_user_home_dir_filetrans_pattern(cups_pdf_t, { file dir })
|
2009-07-28 19:46:26 +00:00
|
|
|
userdom_manage_user_home_content_dirs(cups_pdf_t)
|
|
|
|
userdom_manage_user_home_content_files(cups_pdf_t)
|
2010-08-26 13:41:21 +00:00
|
|
|
userdom_dontaudit_search_admin_dir(cups_pdf_t)
|
2009-07-28 19:46:26 +00:00
|
|
|
|
|
|
|
lpd_manage_spool(cups_pdf_t)
|
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
optional_policy(`
|
|
|
|
gnome_read_config(cups_pdf_t)
|
|
|
|
')
|
2009-07-28 19:46:26 +00:00
|
|
|
|
|
|
|
tunable_policy(`use_nfs_home_dirs',`
|
2010-05-18 14:59:37 +00:00
|
|
|
fs_search_auto_mountpoints(cups_pdf_t)
|
2009-07-28 19:46:26 +00:00
|
|
|
fs_manage_nfs_dirs(cups_pdf_t)
|
|
|
|
fs_manage_nfs_files(cups_pdf_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
tunable_policy(`use_samba_home_dirs',`
|
|
|
|
fs_manage_cifs_dirs(cups_pdf_t)
|
|
|
|
fs_manage_cifs_files(cups_pdf_t)
|
|
|
|
')
|
|
|
|
|
2006-05-25 18:42:32 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# HPLIP local policy
|
|
|
|
#
|
|
|
|
|
2006-09-22 17:14:35 +00:00
|
|
|
# Needed for USB Scanneer and xsane
|
|
|
|
allow hplip_t self:capability { dac_override dac_read_search net_raw };
|
2006-05-25 18:42:32 +00:00
|
|
|
dontaudit hplip_t self:capability sys_tty_config;
|
2006-12-12 20:08:08 +00:00
|
|
|
allow hplip_t self:fifo_file rw_fifo_file_perms;
|
2006-05-25 18:42:32 +00:00
|
|
|
allow hplip_t self:process signal_perms;
|
|
|
|
allow hplip_t self:unix_dgram_socket create_socket_perms;
|
|
|
|
allow hplip_t self:unix_stream_socket create_socket_perms;
|
2006-06-14 20:52:45 +00:00
|
|
|
allow hplip_t self:netlink_route_socket r_netlink_socket_perms;
|
2006-05-25 18:42:32 +00:00
|
|
|
allow hplip_t self:tcp_socket create_stream_socket_perms;
|
|
|
|
allow hplip_t self:udp_socket create_socket_perms;
|
|
|
|
allow hplip_t self:rawip_socket create_socket_perms;
|
|
|
|
|
2009-07-28 19:46:26 +00:00
|
|
|
allow hplip_t cupsd_etc_t:dir search_dir_perms;
|
|
|
|
manage_dirs_pattern(hplip_t, cupsd_tmp_t, cupsd_tmp_t)
|
|
|
|
manage_files_pattern(hplip_t, cupsd_tmp_t, cupsd_tmp_t)
|
|
|
|
files_tmp_filetrans(hplip_t, cupsd_tmp_t, { file dir })
|
2006-05-25 18:42:32 +00:00
|
|
|
|
|
|
|
cups_stream_connect(hplip_t)
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow hplip_t hplip_etc_t:dir list_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
read_files_pattern(hplip_t, hplip_etc_t, hplip_etc_t)
|
|
|
|
read_lnk_files_pattern(hplip_t, hplip_etc_t, hplip_etc_t)
|
2006-05-25 18:42:32 +00:00
|
|
|
files_search_etc(hplip_t)
|
|
|
|
|
2010-05-18 14:59:37 +00:00
|
|
|
manage_files_pattern(hplip_t, hplip_var_lib_t, hplip_var_lib_t)
|
|
|
|
manage_lnk_files_pattern(hplip_t, hplip_var_lib_t, hplip_var_lib_t)
|
|
|
|
|
2009-07-28 19:46:26 +00:00
|
|
|
manage_fifo_files_pattern(hplip_t, hplip_tmp_t, hplip_tmp_t)
|
|
|
|
files_tmp_filetrans(hplip_t, hplip_tmp_t, fifo_file )
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern(hplip_t, hplip_var_run_t, hplip_var_run_t)
|
|
|
|
files_pid_filetrans(hplip_t, hplip_var_run_t, file)
|
2006-05-25 18:42:32 +00:00
|
|
|
|
|
|
|
kernel_read_system_state(hplip_t)
|
|
|
|
kernel_read_kernel_sysctls(hplip_t)
|
|
|
|
|
2007-06-27 15:23:21 +00:00
|
|
|
corenet_all_recvfrom_unlabeled(hplip_t)
|
|
|
|
corenet_all_recvfrom_netlabel(hplip_t)
|
2009-01-06 20:24:10 +00:00
|
|
|
corenet_tcp_sendrecv_generic_if(hplip_t)
|
|
|
|
corenet_udp_sendrecv_generic_if(hplip_t)
|
|
|
|
corenet_raw_sendrecv_generic_if(hplip_t)
|
2009-01-09 19:48:02 +00:00
|
|
|
corenet_tcp_sendrecv_generic_node(hplip_t)
|
|
|
|
corenet_udp_sendrecv_generic_node(hplip_t)
|
|
|
|
corenet_raw_sendrecv_generic_node(hplip_t)
|
2006-05-25 18:42:32 +00:00
|
|
|
corenet_tcp_sendrecv_all_ports(hplip_t)
|
|
|
|
corenet_udp_sendrecv_all_ports(hplip_t)
|
2009-01-09 19:48:02 +00:00
|
|
|
corenet_tcp_bind_generic_node(hplip_t)
|
|
|
|
corenet_udp_bind_generic_node(hplip_t)
|
2006-05-25 18:42:32 +00:00
|
|
|
corenet_tcp_bind_hplip_port(hplip_t)
|
|
|
|
corenet_tcp_connect_hplip_port(hplip_t)
|
|
|
|
corenet_tcp_connect_ipp_port(hplip_t)
|
|
|
|
corenet_sendrecv_hplip_client_packets(hplip_t)
|
|
|
|
corenet_receive_hplip_server_packets(hplip_t)
|
2010-05-18 14:59:37 +00:00
|
|
|
corenet_udp_bind_howl_port(hplip_t)
|
2006-05-25 18:42:32 +00:00
|
|
|
|
|
|
|
dev_read_sysfs(hplip_t)
|
|
|
|
dev_rw_printer(hplip_t)
|
|
|
|
dev_read_urand(hplip_t)
|
2006-06-21 18:25:06 +00:00
|
|
|
dev_read_rand(hplip_t)
|
2006-05-25 18:42:32 +00:00
|
|
|
dev_rw_generic_usb_dev(hplip_t)
|
2009-07-28 19:46:26 +00:00
|
|
|
dev_rw_usbfs(hplip_t)
|
2006-05-25 18:42:32 +00:00
|
|
|
|
|
|
|
fs_getattr_all_fs(hplip_t)
|
|
|
|
fs_search_auto_mountpoints(hplip_t)
|
2009-07-28 19:46:26 +00:00
|
|
|
fs_rw_anon_inodefs_files(hplip_t)
|
2006-05-25 18:42:32 +00:00
|
|
|
|
|
|
|
# for python
|
|
|
|
corecmd_exec_bin(hplip_t)
|
|
|
|
|
|
|
|
domain_use_interactive_fds(hplip_t)
|
|
|
|
|
|
|
|
files_read_etc_files(hplip_t)
|
|
|
|
files_read_etc_runtime_files(hplip_t)
|
|
|
|
files_read_usr_files(hplip_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(hplip_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(hplip_t)
|
|
|
|
|
|
|
|
sysnet_read_config(hplip_t)
|
|
|
|
|
|
|
|
userdom_dontaudit_use_unpriv_user_fds(hplip_t)
|
2008-11-05 16:10:46 +00:00
|
|
|
userdom_dontaudit_search_user_home_dirs(hplip_t)
|
|
|
|
userdom_dontaudit_search_user_home_content(hplip_t)
|
2006-05-25 18:42:32 +00:00
|
|
|
|
2009-07-28 19:46:26 +00:00
|
|
|
lpd_read_config(hplip_t)
|
|
|
|
lpd_manage_spool(hplip_t)
|
2006-05-25 18:42:32 +00:00
|
|
|
|
2008-08-29 14:25:09 +00:00
|
|
|
optional_policy(`
|
2008-11-05 16:10:46 +00:00
|
|
|
dbus_system_bus_client(hplip_t)
|
2008-08-29 14:25:09 +00:00
|
|
|
')
|
|
|
|
|
2006-05-25 18:42:32 +00:00
|
|
|
optional_policy(`
|
2006-06-07 17:43:10 +00:00
|
|
|
seutil_sigchld_newrole(hplip_t)
|
2006-05-25 18:42:32 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
2006-06-07 17:43:10 +00:00
|
|
|
snmp_read_snmp_var_lib_files(hplip_t)
|
2006-05-25 18:42:32 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
udev_read_db(hplip_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# PTAL local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow ptal_t self:capability { chown sys_rawio };
|
|
|
|
dontaudit ptal_t self:capability sys_tty_config;
|
2006-12-12 20:08:08 +00:00
|
|
|
allow ptal_t self:fifo_file rw_fifo_file_perms;
|
2006-05-25 18:42:32 +00:00
|
|
|
allow ptal_t self:unix_dgram_socket create_socket_perms;
|
|
|
|
allow ptal_t self:unix_stream_socket create_stream_socket_perms;
|
|
|
|
allow ptal_t self:tcp_socket create_stream_socket_perms;
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow ptal_t ptal_etc_t:dir list_dir_perms;
|
2008-07-23 21:38:39 +00:00
|
|
|
read_files_pattern(ptal_t, ptal_etc_t, ptal_etc_t)
|
|
|
|
read_lnk_files_pattern(ptal_t, ptal_etc_t, ptal_etc_t)
|
2006-05-25 18:42:32 +00:00
|
|
|
files_search_etc(ptal_t)
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_dirs_pattern(ptal_t, ptal_var_run_t, ptal_var_run_t)
|
|
|
|
manage_files_pattern(ptal_t, ptal_var_run_t, ptal_var_run_t)
|
|
|
|
manage_lnk_files_pattern(ptal_t, ptal_var_run_t, ptal_var_run_t)
|
|
|
|
manage_fifo_files_pattern(ptal_t, ptal_var_run_t, ptal_var_run_t)
|
|
|
|
manage_sock_files_pattern(ptal_t, ptal_var_run_t, ptal_var_run_t)
|
|
|
|
files_pid_filetrans(ptal_t, ptal_var_run_t, { dir file lnk_file sock_file fifo_file })
|
2006-05-25 18:42:32 +00:00
|
|
|
|
|
|
|
kernel_read_kernel_sysctls(ptal_t)
|
|
|
|
kernel_list_proc(ptal_t)
|
|
|
|
kernel_read_proc_symlinks(ptal_t)
|
|
|
|
|
2007-06-27 15:23:21 +00:00
|
|
|
corenet_all_recvfrom_unlabeled(ptal_t)
|
|
|
|
corenet_all_recvfrom_netlabel(ptal_t)
|
2009-01-06 20:24:10 +00:00
|
|
|
corenet_tcp_sendrecv_generic_if(ptal_t)
|
2009-01-09 19:48:02 +00:00
|
|
|
corenet_tcp_sendrecv_generic_node(ptal_t)
|
2006-05-25 18:42:32 +00:00
|
|
|
corenet_tcp_sendrecv_all_ports(ptal_t)
|
2009-01-09 19:48:02 +00:00
|
|
|
corenet_tcp_bind_generic_node(ptal_t)
|
2006-05-25 18:42:32 +00:00
|
|
|
corenet_tcp_bind_ptal_port(ptal_t)
|
|
|
|
|
|
|
|
dev_read_sysfs(ptal_t)
|
|
|
|
dev_read_usbfs(ptal_t)
|
|
|
|
dev_rw_printer(ptal_t)
|
|
|
|
|
|
|
|
fs_getattr_all_fs(ptal_t)
|
|
|
|
fs_search_auto_mountpoints(ptal_t)
|
|
|
|
|
|
|
|
domain_use_interactive_fds(ptal_t)
|
|
|
|
|
|
|
|
files_read_etc_files(ptal_t)
|
|
|
|
files_read_etc_runtime_files(ptal_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(ptal_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(ptal_t)
|
|
|
|
|
|
|
|
sysnet_read_config(ptal_t)
|
|
|
|
|
|
|
|
userdom_dontaudit_use_unpriv_user_fds(ptal_t)
|
2008-11-05 16:10:46 +00:00
|
|
|
userdom_dontaudit_search_user_home_content(ptal_t)
|
2006-05-25 18:42:32 +00:00
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
seutil_sigchld_newrole(ptal_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
udev_read_db(ptal_t)
|
|
|
|
')
|