2005-10-23 22:10:59 +00:00
|
|
|
|
2006-06-08 17:18:25 +00:00
|
|
|
policy_module(cups,1.3.7)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type cupsd_config_t;
|
|
|
|
type cupsd_config_exec_t;
|
|
|
|
init_daemon_domain(cupsd_config_t,cupsd_config_exec_t)
|
|
|
|
|
|
|
|
type cupsd_config_var_run_t;
|
|
|
|
files_pid_file(cupsd_config_var_run_t)
|
|
|
|
|
|
|
|
type cupsd_t;
|
|
|
|
# real declaration moved to mls until
|
|
|
|
# range_transition works in loadable modules
|
|
|
|
gen_require(`
|
|
|
|
type cupsd_exec_t;
|
|
|
|
')
|
|
|
|
init_daemon_domain(cupsd_t,cupsd_exec_t)
|
|
|
|
|
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
|
|
|
|
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
|
|
|
|
|
|
|
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)
|
|
|
|
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)
|
|
|
|
|
|
|
|
type cupsd_tmp_t;
|
|
|
|
files_tmp_file(cupsd_tmp_t)
|
|
|
|
|
|
|
|
type cupsd_var_run_t;
|
|
|
|
files_pid_file(cupsd_var_run_t)
|
|
|
|
|
|
|
|
type hplip_t;
|
|
|
|
type hplip_exec_t;
|
|
|
|
init_daemon_domain(hplip_t,hplip_exec_t)
|
|
|
|
|
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
|
|
|
|
|
|
|
type hplip_var_run_t;
|
|
|
|
files_pid_file(hplip_var_run_t)
|
|
|
|
|
|
|
|
type ptal_t;
|
|
|
|
type ptal_exec_t;
|
|
|
|
init_daemon_domain(ptal_t,ptal_exec_t)
|
|
|
|
|
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)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Cups local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
# /usr/lib/cups/backend/serial needs sys_admin(?!)
|
2006-06-07 17:43:10 +00:00
|
|
|
allow cupsd_t self:capability { sys_admin dac_override dac_read_search kill setgid setuid fsetid net_bind_service fowner chown dac_override sys_tty_config audit_write };
|
2005-10-24 18:40:24 +00:00
|
|
|
dontaudit cupsd_t self:capability { sys_tty_config net_admin };
|
|
|
|
allow cupsd_t self:process { setsched signal_perms };
|
2005-10-23 22:10:59 +00:00
|
|
|
allow cupsd_t self:fifo_file rw_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;
|
|
|
|
allow cupsd_t self:netlink_audit_socket { create_netlink_socket_perms nlmsg_relay };
|
2006-06-07 17:43:10 +00:00
|
|
|
allow cupsd_t self:netlink_route_socket r_netlink_socket_perms;
|
2005-10-23 22:10:59 +00:00
|
|
|
allow cupsd_t self:tcp_socket { create_stream_socket_perms connectto acceptfrom recvfrom };
|
|
|
|
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
|
|
|
|
|
|
|
allow cupsd_t cupsd_etc_t:file { r_file_perms setattr };
|
2005-10-24 18:40:24 +00:00
|
|
|
allow cupsd_t cupsd_etc_t:dir { rw_dir_perms setattr };
|
2005-10-23 22:10:59 +00:00
|
|
|
allow cupsd_t cupsd_etc_t:lnk_file { getattr read };
|
|
|
|
files_search_etc(cupsd_t)
|
|
|
|
|
|
|
|
allow cupsd_t cupsd_rw_etc_t:file manage_file_perms;
|
|
|
|
allow cupsd_t cupsd_rw_etc_t:dir manage_dir_perms;
|
|
|
|
type_transition cupsd_t cupsd_etc_t:file cupsd_rw_etc_t;
|
2006-02-21 18:40:44 +00:00
|
|
|
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)
|
|
|
|
allow cupsd_t cupsd_exec_t:dir search;
|
|
|
|
allow cupsd_t cupsd_exec_t:lnk_file read;
|
|
|
|
|
|
|
|
allow cupsd_t cupsd_log_t:file create_file_perms;
|
2005-10-24 18:40:24 +00:00
|
|
|
allow cupsd_t cupsd_log_t:dir { setattr rw_dir_perms };
|
2006-02-21 18:40:44 +00:00
|
|
|
logging_log_filetrans(cupsd_t,cupsd_log_t,{ file dir })
|
2005-10-23 22:10:59 +00:00
|
|
|
|
|
|
|
allow cupsd_t cupsd_tmp_t:dir create_dir_perms;
|
|
|
|
allow cupsd_t cupsd_tmp_t:file create_file_perms;
|
2005-10-26 16:00:13 +00:00
|
|
|
allow cupsd_t cupsd_tmp_t:fifo_file create_file_perms;
|
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
|
|
|
|
|
|
|
allow cupsd_t cupsd_var_run_t:file create_file_perms;
|
2006-04-12 15:04:28 +00:00
|
|
|
allow cupsd_t cupsd_var_run_t:dir { setattr rw_dir_perms };
|
2006-03-23 19:19:38 +00:00
|
|
|
allow cupsd_t cupsd_var_run_t:sock_file create_file_perms;
|
2006-03-02 23:41:11 +00:00
|
|
|
files_pid_filetrans(cupsd_t,cupsd_var_run_t,file)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
|
|
|
allow cupsd_t hplip_var_run_t:file { read getattr };
|
|
|
|
|
|
|
|
allow cupsd_t ptal_var_run_t:dir search;
|
|
|
|
allow cupsd_t ptal_var_run_t:sock_file { write setattr };
|
|
|
|
allow cupsd_t ptal_t:unix_stream_socket connectto;
|
|
|
|
|
|
|
|
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)
|
2005-10-23 22:10:59 +00:00
|
|
|
kernel_tcp_recvfrom(cupsd_t)
|
|
|
|
|
2006-05-25 18:41:14 +00:00
|
|
|
corenet_non_ipsec_sendrecv(cupsd_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
corenet_tcp_sendrecv_all_if(cupsd_t)
|
|
|
|
corenet_udp_sendrecv_all_if(cupsd_t)
|
|
|
|
corenet_tcp_sendrecv_all_nodes(cupsd_t)
|
|
|
|
corenet_udp_sendrecv_all_nodes(cupsd_t)
|
|
|
|
corenet_tcp_sendrecv_all_ports(cupsd_t)
|
|
|
|
corenet_udp_sendrecv_all_ports(cupsd_t)
|
|
|
|
corenet_tcp_bind_all_nodes(cupsd_t)
|
|
|
|
corenet_udp_bind_all_nodes(cupsd_t)
|
|
|
|
corenet_tcp_bind_ipp_port(cupsd_t)
|
|
|
|
corenet_udp_bind_ipp_port(cupsd_t)
|
|
|
|
corenet_tcp_bind_reserved_port(cupsd_t)
|
|
|
|
corenet_dontaudit_tcp_bind_all_reserved_ports(cupsd_t)
|
|
|
|
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)
|
|
|
|
dev_read_usbfs(cupsd_t)
|
|
|
|
|
|
|
|
fs_getattr_all_fs(cupsd_t)
|
|
|
|
fs_search_auto_mountpoints(cupsd_t)
|
|
|
|
|
|
|
|
term_dontaudit_use_console(cupsd_t)
|
2006-01-27 20:13:08 +00:00
|
|
|
term_write_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
|
|
|
|
|
|
|
auth_domtrans_chk_passwd(cupsd_t)
|
2005-11-29 21:27:15 +00:00
|
|
|
auth_dontaudit_read_pam_pid(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)
|
|
|
|
corecmd_exec_sbin(cupsd_t)
|
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
domain_use_interactive_fds(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
|
|
|
|
files_search_var_lib(cupsd_t)
|
|
|
|
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)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2006-03-02 23:41:11 +00:00
|
|
|
init_use_fds(cupsd_t)
|
2006-02-02 21:08:12 +00:00
|
|
|
init_use_script_ptys(cupsd_t)
|
2006-02-06 15:40:41 +00:00
|
|
|
init_exec_script_files(cupsd_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
|
|
|
libs_use_ld_so(cupsd_t)
|
|
|
|
libs_use_shared_libs(cupsd_t)
|
|
|
|
# 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)
|
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)
|
|
|
|
|
|
|
|
seutil_dontaudit_read_config(cupsd_t)
|
|
|
|
|
|
|
|
sysnet_read_config(cupsd_t)
|
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
userdom_dontaudit_use_unpriv_user_fds(cupsd_t)
|
2006-02-21 18:40:44 +00:00
|
|
|
userdom_dontaudit_search_all_users_home_content(cupsd_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
|
|
|
# Write to /var/spool/cups.
|
|
|
|
lpd_manage_spool(cupsd_t)
|
|
|
|
|
|
|
|
ifdef(`targeted_policy',`
|
2006-06-08 17:18:25 +00:00
|
|
|
files_dontaudit_read_root_files(cupsd_t)
|
|
|
|
|
2006-02-02 21:08:12 +00:00
|
|
|
term_dontaudit_use_unallocated_ttys(cupsd_t)
|
|
|
|
term_dontaudit_use_generic_ptys(cupsd_t)
|
2006-06-08 17:18:25 +00:00
|
|
|
|
|
|
|
init_stream_connect_script(cupsd_t)
|
|
|
|
|
|
|
|
unconfined_read_pipes(cupsd_t)
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
init_dbus_chat_script(cupsd_t)
|
|
|
|
|
|
|
|
unconfined_dbus_send(cupsd_t)
|
|
|
|
|
|
|
|
dbus_stub(cupsd_t)
|
|
|
|
')
|
2005-10-23 22:10:59 +00:00
|
|
|
')
|
|
|
|
|
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(`
|
2005-10-23 22:10:59 +00:00
|
|
|
dbus_system_bus_client_template(cupsd,cupsd_t)
|
2006-02-02 21:08:12 +00:00
|
|
|
dbus_send_system_bus(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)
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-11-29 21:27:15 +00:00
|
|
|
hal_dbus_chat(cupsd_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_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-11-29 21:27:15 +00:00
|
|
|
inetd_core_service_domain(cupsd_t,cupsd_exec_t,cupsd_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-10-23 22:10:59 +00:00
|
|
|
mount_send_nfs_client_request(cupsd_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-02-02 21:08:12 +00:00
|
|
|
nscd_socket_use(cupsd_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-02-02 21:08:12 +00:00
|
|
|
portmap_udp_chat(cupsd_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
|
|
|
samba_rw_var_files(cupsd_t)
|
|
|
|
# cjp: rw_dir_perms was here, but doesnt make sense
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-10-23 22:10:59 +00:00
|
|
|
seutil_sigchld_newrole(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)
|
|
|
|
')
|
|
|
|
|
|
|
|
ifdef(`TODO',`
|
|
|
|
allow web_client_domain cupsd_t:tcp_socket { connectto recvfrom };
|
|
|
|
allow cupsd_t web_client_domain:tcp_socket { acceptfrom recvfrom };
|
|
|
|
allow cupsd_t kernel_t:tcp_socket recvfrom;
|
|
|
|
allow web_client_domain kernel_t:tcp_socket recvfrom;
|
|
|
|
') dnl end TODO
|
|
|
|
|
2005-10-24 18:40:24 +00:00
|
|
|
allow cupsd_t usercanread:dir r_dir_perms;
|
|
|
|
allow cupsd_t usercanread:file r_file_perms;
|
|
|
|
allow cupsd_t usercanread:lnk_file { getattr read };
|
2005-10-23 22:10:59 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Cups configuration daemon local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow cupsd_config_t self:capability { chown sys_tty_config };
|
2005-10-26 16:00:13 +00:00
|
|
|
dontaudit cupsd_config_t self:capability sys_tty_config;
|
2005-10-24 18:40:24 +00:00
|
|
|
allow cupsd_config_t self:process signal_perms;
|
2005-10-23 22:10:59 +00:00
|
|
|
allow cupsd_config_t self:fifo_file rw_file_perms;
|
|
|
|
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
|
|
|
|
|
|
|
allow cupsd_config_t cupsd_t:tcp_socket { connectto recvfrom };
|
|
|
|
allow cupsd_t cupsd_config_t:tcp_socket { acceptfrom recvfrom };
|
|
|
|
|
|
|
|
# old can_ps() on cupsd_t:
|
|
|
|
allow cupsd_config_t cupsd_t:process { signal };
|
|
|
|
allow cupsd_config_t cupsd_t:{ file lnk_file } { getattr read };
|
|
|
|
allow cupsd_config_t cupsd_t:dir { search getattr read };
|
|
|
|
allow cupsd_config_t cupsd_t:{ file lnk_file } { read getattr };
|
|
|
|
allow cupsd_config_t cupsd_t:process getattr;
|
|
|
|
# We need to suppress this denial because procps tries to access
|
|
|
|
# /proc/pid/environ and this now triggers a ptrace check in recent kernels
|
|
|
|
# (2.4 and 2.6). Might want to change procps to not do this, or only if
|
|
|
|
# running in a privileged domain.
|
|
|
|
dontaudit cupsd_config_t cupsd_t:process ptrace;
|
|
|
|
|
|
|
|
allow cupsd_config_t cupsd_config_var_run_t:file create_file_perms;
|
|
|
|
allow cupsd_config_t cupsd_config_var_run_t:dir rw_dir_perms;
|
2006-03-02 23:41:11 +00:00
|
|
|
files_pid_filetrans(cupsd_config_t,cupsd_config_var_run_t,file)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
|
|
|
can_exec(cupsd_config_t, cupsd_config_exec_t)
|
|
|
|
|
|
|
|
allow cupsd_config_t cupsd_etc_t:dir rw_dir_perms;
|
|
|
|
allow cupsd_config_t cupsd_etc_t:file create_file_perms;
|
|
|
|
allow cupsd_config_t cupsd_etc_t:lnk_file create_lnk_perms;
|
|
|
|
type_transition cupsd_config_t cupsd_etc_t:file cupsd_rw_etc_t;
|
|
|
|
|
2005-12-09 15:42:39 +00:00
|
|
|
allow cupsd_config_t cupsd_log_t:file rw_file_perms;
|
|
|
|
|
2005-10-23 22:10:59 +00:00
|
|
|
allow cupsd_config_t cupsd_rw_etc_t:dir rw_dir_perms;
|
|
|
|
allow cupsd_config_t cupsd_rw_etc_t:file manage_file_perms;
|
|
|
|
allow cupsd_config_t cupsd_rw_etc_t:lnk_file create_lnk_perms;
|
2006-03-02 23:41:11 +00:00
|
|
|
files_var_filetrans(cupsd_config_t,cupsd_rw_etc_t,file)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
|
|
|
allow cupsd_config_t cupsd_var_run_t:file { getattr read };
|
|
|
|
|
|
|
|
kernel_read_system_state(cupsd_config_t)
|
2006-01-31 16:49:43 +00:00
|
|
|
kernel_read_kernel_sysctls(cupsd_config_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
kernel_tcp_recvfrom(cupsd_config_t)
|
|
|
|
|
|
|
|
corenet_tcp_sendrecv_all_if(cupsd_config_t)
|
|
|
|
corenet_raw_sendrecv_all_if(cupsd_config_t)
|
|
|
|
corenet_tcp_sendrecv_all_nodes(cupsd_config_t)
|
|
|
|
corenet_raw_sendrecv_all_nodes(cupsd_config_t)
|
|
|
|
corenet_tcp_sendrecv_all_ports(cupsd_config_t)
|
2005-12-06 19:59:50 +00:00
|
|
|
corenet_non_ipsec_sendrecv(cupsd_config_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
corenet_tcp_bind_all_nodes(cupsd_config_t)
|
|
|
|
corenet_tcp_connect_all_ports(cupsd_config_t)
|
|
|
|
|
|
|
|
dev_read_sysfs(cupsd_config_t)
|
|
|
|
dev_read_urand(cupsd_config_t)
|
|
|
|
|
|
|
|
fs_getattr_all_fs(cupsd_config_t)
|
|
|
|
fs_search_auto_mountpoints(cupsd_config_t)
|
|
|
|
|
|
|
|
term_dontaudit_use_console(cupsd_config_t)
|
|
|
|
|
|
|
|
corecmd_exec_bin(cupsd_config_t)
|
|
|
|
corecmd_exec_sbin(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-03-02 23:41:11 +00:00
|
|
|
init_use_fds(cupsd_config_t)
|
2006-02-02 21:08:12 +00:00
|
|
|
init_use_script_ptys(cupsd_config_t)
|
2006-06-08 17:18:25 +00:00
|
|
|
# Alternatives asks for this
|
|
|
|
init_getattr_script_files(cupsd_config_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
|
|
|
libs_use_ld_so(cupsd_config_t)
|
|
|
|
libs_use_shared_libs(cupsd_config_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(cupsd_config_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(cupsd_config_t)
|
|
|
|
|
|
|
|
seutil_dontaudit_search_config(cupsd_config_t)
|
|
|
|
|
|
|
|
sysnet_read_config(cupsd_config_t)
|
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
userdom_dontaudit_use_unpriv_user_fds(cupsd_config_t)
|
2006-02-21 18:40:44 +00:00
|
|
|
userdom_dontaudit_search_sysadm_home_dirs(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-02-06 15:40:41 +00:00
|
|
|
init_getattr_script_files(cupsd_config_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
|
|
|
rpm_read_db(cupsd_config_t)
|
|
|
|
')
|
|
|
|
')
|
|
|
|
|
2005-10-23 22:10:59 +00:00
|
|
|
ifdef(`targeted_policy', `
|
2006-01-31 19:21:01 +00:00
|
|
|
files_dontaudit_read_root_files(cupsd_config_t)
|
2006-06-08 17:18:25 +00:00
|
|
|
|
|
|
|
term_dontaudit_use_unallocated_ttys(cupsd_config_t)
|
|
|
|
term_use_generic_ptys(cupsd_config_t)
|
|
|
|
|
|
|
|
unconfined_rw_pipes(cupsd_config_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
')
|
|
|
|
|
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(`
|
2005-11-29 21:27:15 +00:00
|
|
|
dbus_system_bus_client_template(cupsd_config,cupsd_config_t)
|
|
|
|
dbus_connect_system_bus(cupsd_config_t)
|
2006-02-02 21:08:12 +00:00
|
|
|
dbus_send_system_bus(cupsd_config_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)
|
|
|
|
')
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-10-26 21:03:19 +00:00
|
|
|
hal_domtrans(cupsd_config_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
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-10-26 21:03:19 +00:00
|
|
|
nis_use_ypbind(cupsd_config_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-02-02 21:08:12 +00:00
|
|
|
nscd_socket_use(cupsd_config_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
')
|
|
|
|
|
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)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Cups lpd support
|
|
|
|
#
|
|
|
|
|
|
|
|
allow cupsd_lpd_t self:process signal_perms;
|
|
|
|
allow cupsd_lpd_t self:fifo_file rw_file_perms;
|
|
|
|
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;
|
2006-05-19 14:02:24 +00:00
|
|
|
allow cupsd_lpd_t self:netlink_route_socket r_netlink_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;
|
|
|
|
allow cupsd_lpd_t cupsd_etc_t:file r_file_perms;
|
2005-10-23 22:10:59 +00:00
|
|
|
allow cupsd_lpd_t cupsd_etc_t:lnk_file { getattr read };
|
|
|
|
|
|
|
|
allow cupsd_lpd_t cupsd_lpd_tmp_t:dir create_dir_perms;
|
|
|
|
allow cupsd_lpd_t cupsd_lpd_tmp_t:file create_file_perms;
|
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
|
|
|
|
|
|
|
allow cupsd_lpd_t cupsd_lpd_var_run_t:file create_file_perms;
|
|
|
|
allow cupsd_lpd_t cupsd_lpd_var_run_t:dir rw_dir_perms;
|
2006-03-02 23:41:11 +00:00
|
|
|
files_pid_filetrans(cupsd_lpd_t,cupsd_lpd_var_run_t,file)
|
2005-10-23 22:10:59 +00:00
|
|
|
|
2005-10-24 18:40:24 +00:00
|
|
|
allow cupsd_lpd_t cupsd_rw_etc_t:dir list_dir_perms;
|
2005-11-10 16:54:18 +00:00
|
|
|
allow cupsd_lpd_t cupsd_rw_etc_t:file r_file_perms;
|
2005-10-23 22:10:59 +00:00
|
|
|
allow cupsd_lpd_t cupsd_rw_etc_t:lnk_file { getattr read };
|
|
|
|
|
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)
|
|
|
|
|
|
|
|
corenet_tcp_sendrecv_all_if(cupsd_lpd_t)
|
|
|
|
corenet_udp_sendrecv_all_if(cupsd_lpd_t)
|
|
|
|
corenet_raw_sendrecv_all_if(cupsd_lpd_t)
|
|
|
|
corenet_tcp_sendrecv_all_nodes(cupsd_lpd_t)
|
|
|
|
corenet_udp_sendrecv_all_nodes(cupsd_lpd_t)
|
|
|
|
corenet_raw_sendrecv_all_nodes(cupsd_lpd_t)
|
|
|
|
corenet_tcp_sendrecv_all_ports(cupsd_lpd_t)
|
|
|
|
corenet_udp_sendrecv_all_ports(cupsd_lpd_t)
|
2005-12-06 19:59:50 +00:00
|
|
|
corenet_non_ipsec_sendrecv(cupsd_lpd_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
corenet_tcp_bind_all_nodes(cupsd_lpd_t)
|
|
|
|
corenet_udp_bind_all_nodes(cupsd_lpd_t)
|
|
|
|
corenet_tcp_connect_ipp_port(cupsd_lpd_t)
|
|
|
|
|
|
|
|
dev_read_urand(cupsd_lpd_t)
|
|
|
|
|
|
|
|
fs_getattr_xattr_fs(cupsd_lpd_t)
|
|
|
|
|
|
|
|
files_read_etc_files(cupsd_lpd_t)
|
|
|
|
|
|
|
|
libs_use_ld_so(cupsd_lpd_t)
|
|
|
|
libs_use_shared_libs(cupsd_lpd_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(cupsd_lpd_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(cupsd_lpd_t)
|
|
|
|
|
|
|
|
sysnet_read_config(cupsd_lpd_t)
|
|
|
|
|
2006-05-19 14:02:24 +00:00
|
|
|
cups_stream_connect(cupsd_lpd_t)
|
|
|
|
|
2006-03-24 16:48:35 +00:00
|
|
|
optional_policy(`
|
|
|
|
inetd_service_domain(cupsd_lpd_t,cupsd_lpd_exec_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-10-23 22:10:59 +00:00
|
|
|
nis_use_ypbind(cupsd_lpd_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-02-02 21:08:12 +00:00
|
|
|
nscd_socket_use(cupsd_lpd_t)
|
2005-10-23 22:10:59 +00:00
|
|
|
')
|
2006-05-25 18:42:32 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# HPLIP local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow hplip_t self:capability net_raw;
|
|
|
|
dontaudit hplip_t self:capability sys_tty_config;
|
|
|
|
allow hplip_t self:fifo_file rw_file_perms;
|
|
|
|
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;
|
|
|
|
allow hplip_t self:tcp_socket create_stream_socket_perms;
|
|
|
|
allow hplip_t self:udp_socket create_socket_perms;
|
2006-06-07 17:43:10 +00:00
|
|
|
allow hplip_t self:netlink_route_socket r_netlink_socket_perms;
|
2006-05-25 18:42:32 +00:00
|
|
|
# cjp: raw?
|
|
|
|
allow hplip_t self:rawip_socket create_socket_perms;
|
|
|
|
|
|
|
|
allow hplip_t cupsd_etc_t:dir search;
|
|
|
|
|
|
|
|
cups_stream_connect(hplip_t)
|
|
|
|
|
|
|
|
allow hplip_t hplip_etc_t:file r_file_perms;
|
|
|
|
allow hplip_t hplip_etc_t:dir r_dir_perms;
|
|
|
|
allow hplip_t hplip_etc_t:lnk_file { getattr read };
|
|
|
|
files_search_etc(hplip_t)
|
|
|
|
|
|
|
|
allow hplip_t hplip_var_run_t:file create_file_perms;
|
|
|
|
allow hplip_t hplip_var_run_t:dir rw_dir_perms;
|
|
|
|
files_pid_filetrans(hplip_t,hplip_var_run_t,file)
|
|
|
|
|
|
|
|
kernel_read_system_state(hplip_t)
|
|
|
|
kernel_read_kernel_sysctls(hplip_t)
|
|
|
|
|
|
|
|
corenet_tcp_sendrecv_all_if(hplip_t)
|
|
|
|
corenet_udp_sendrecv_all_if(hplip_t)
|
|
|
|
corenet_raw_sendrecv_all_if(hplip_t)
|
|
|
|
corenet_tcp_sendrecv_all_nodes(hplip_t)
|
|
|
|
corenet_udp_sendrecv_all_nodes(hplip_t)
|
|
|
|
corenet_raw_sendrecv_all_nodes(hplip_t)
|
|
|
|
corenet_tcp_sendrecv_all_ports(hplip_t)
|
|
|
|
corenet_udp_sendrecv_all_ports(hplip_t)
|
|
|
|
corenet_non_ipsec_sendrecv(hplip_t)
|
|
|
|
corenet_tcp_bind_all_nodes(hplip_t)
|
|
|
|
corenet_udp_bind_all_nodes(hplip_t)
|
|
|
|
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)
|
|
|
|
|
|
|
|
dev_read_sysfs(hplip_t)
|
|
|
|
dev_rw_printer(hplip_t)
|
|
|
|
dev_read_urand(hplip_t)
|
|
|
|
dev_rw_generic_usb_dev(hplip_t)
|
|
|
|
|
|
|
|
fs_getattr_all_fs(hplip_t)
|
|
|
|
fs_search_auto_mountpoints(hplip_t)
|
|
|
|
|
|
|
|
term_dontaudit_use_console(hplip_t)
|
|
|
|
|
|
|
|
# for python
|
|
|
|
corecmd_exec_bin(hplip_t)
|
|
|
|
corecmd_search_sbin(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)
|
|
|
|
|
|
|
|
init_use_fds(hplip_t)
|
|
|
|
init_use_script_ptys(hplip_t)
|
|
|
|
|
|
|
|
libs_use_ld_so(hplip_t)
|
|
|
|
libs_use_shared_libs(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)
|
|
|
|
userdom_dontaudit_search_sysadm_home_dirs(hplip_t)
|
2006-06-07 17:43:10 +00:00
|
|
|
userdom_dontaudit_search_all_users_home_content(hplip_t)
|
2006-05-25 18:42:32 +00:00
|
|
|
|
|
|
|
lpd_read_config(cupsd_t)
|
|
|
|
|
|
|
|
ifdef(`targeted_policy', `
|
|
|
|
term_dontaudit_use_unallocated_ttys(hplip_t)
|
|
|
|
term_dontaudit_use_generic_ptys(hplip_t)
|
|
|
|
files_dontaudit_read_root_files(hplip_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
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)
|
|
|
|
')
|
|
|
|
|
|
|
|
allow hplip_t devpts_t:chr_file { getattr ioctl };
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# PTAL local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow ptal_t self:capability { chown sys_rawio };
|
|
|
|
dontaudit ptal_t self:capability sys_tty_config;
|
|
|
|
allow ptal_t self:fifo_file rw_file_perms;
|
|
|
|
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;
|
|
|
|
|
|
|
|
allow ptal_t ptal_etc_t:file r_file_perms;
|
|
|
|
allow ptal_t ptal_etc_t:dir r_dir_perms;
|
|
|
|
allow ptal_t ptal_etc_t:lnk_file { getattr read };
|
|
|
|
files_search_etc(ptal_t)
|
|
|
|
|
|
|
|
allow ptal_t ptal_var_run_t:dir create_dir_perms;
|
|
|
|
allow ptal_t ptal_var_run_t:file create_file_perms;
|
|
|
|
allow ptal_t ptal_var_run_t:lnk_file create_lnk_perms;
|
|
|
|
allow ptal_t ptal_var_run_t:sock_file create_file_perms;
|
|
|
|
allow ptal_t ptal_var_run_t:fifo_file create_file_perms;
|
|
|
|
files_pid_filetrans(ptal_t,ptal_var_run_t,{ dir file lnk_file sock_file fifo_file })
|
|
|
|
|
|
|
|
allow ptal_t ptal_var_run_t:file create_file_perms;
|
|
|
|
allow ptal_t ptal_var_run_t:dir rw_dir_perms;
|
|
|
|
files_pid_filetrans(ptal_t,ptal_var_run_t,file)
|
|
|
|
|
|
|
|
kernel_read_kernel_sysctls(ptal_t)
|
|
|
|
kernel_list_proc(ptal_t)
|
|
|
|
kernel_read_proc_symlinks(ptal_t)
|
|
|
|
|
|
|
|
corenet_tcp_sendrecv_all_if(ptal_t)
|
|
|
|
corenet_raw_sendrecv_all_if(ptal_t)
|
|
|
|
corenet_tcp_sendrecv_all_nodes(ptal_t)
|
|
|
|
corenet_raw_sendrecv_all_nodes(ptal_t)
|
|
|
|
corenet_tcp_sendrecv_all_ports(ptal_t)
|
|
|
|
corenet_non_ipsec_sendrecv(ptal_t)
|
|
|
|
corenet_tcp_bind_all_nodes(ptal_t)
|
|
|
|
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)
|
|
|
|
|
|
|
|
term_dontaudit_use_console(ptal_t)
|
|
|
|
|
|
|
|
domain_use_interactive_fds(ptal_t)
|
|
|
|
|
|
|
|
files_read_etc_files(ptal_t)
|
|
|
|
files_read_etc_runtime_files(ptal_t)
|
|
|
|
|
|
|
|
init_use_fds(ptal_t)
|
|
|
|
init_use_script_ptys(ptal_t)
|
|
|
|
|
|
|
|
libs_use_ld_so(ptal_t)
|
|
|
|
libs_use_shared_libs(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)
|
|
|
|
userdom_dontaudit_search_all_users_home_content(ptal_t)
|
|
|
|
|
|
|
|
ifdef(`targeted_policy', `
|
|
|
|
term_dontaudit_use_unallocated_ttys(ptal_t)
|
|
|
|
term_dontaudit_use_generic_ptys(ptal_t)
|
|
|
|
files_dontaudit_read_root_files(ptal_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
seutil_sigchld_newrole(ptal_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
|
|
|
udev_read_db(ptal_t)
|
|
|
|
')
|