|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
policy_module(cups,1.0)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
########################################
|
|
Chris PeBenito |
ef5ca0 |
#
|
|
Chris PeBenito |
ef5ca0 |
# Declarations
|
|
Chris PeBenito |
ef5ca0 |
#
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
type cupsd_config_t;
|
|
Chris PeBenito |
ef5ca0 |
type cupsd_config_exec_t;
|
|
Chris PeBenito |
ef5ca0 |
init_daemon_domain(cupsd_config_t,cupsd_config_exec_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
type cupsd_config_var_run_t;
|
|
Chris PeBenito |
ef5ca0 |
files_pid_file(cupsd_config_var_run_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
type cupsd_t;
|
|
Chris PeBenito |
ef5ca0 |
# real declaration moved to mls until
|
|
Chris PeBenito |
ef5ca0 |
# range_transition works in loadable modules
|
|
Chris PeBenito |
ef5ca0 |
gen_require(`
|
|
Chris PeBenito |
ef5ca0 |
type cupsd_exec_t;
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
init_daemon_domain(cupsd_t,cupsd_exec_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
9bbc75 |
type cupsd_etc_t;
|
|
Chris PeBenito |
9bbc75 |
files_config_file(cupsd_etc_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
9bbc75 |
type cupsd_rw_etc_t;
|
|
Chris PeBenito |
9bbc75 |
files_config_file(cupsd_rw_etc_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
type cupsd_log_t;
|
|
Chris PeBenito |
ef5ca0 |
logging_log_file(cupsd_log_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
type cupsd_lpd_t;
|
|
Chris PeBenito |
ef5ca0 |
type cupsd_lpd_exec_t;
|
|
Chris PeBenito |
ef5ca0 |
inetd_service_domain(cupsd_lpd_t,cupsd_lpd_exec_t)
|
|
Chris PeBenito |
ef5ca0 |
role system_r types cupsd_lpd_t;
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
type cupsd_lpd_tmp_t;
|
|
Chris PeBenito |
ef5ca0 |
files_tmp_file(cupsd_lpd_tmp_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
type cupsd_lpd_var_run_t;
|
|
Chris PeBenito |
ef5ca0 |
files_pid_file(cupsd_lpd_var_run_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
type cupsd_tmp_t;
|
|
Chris PeBenito |
ef5ca0 |
files_tmp_file(cupsd_tmp_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
type cupsd_var_run_t;
|
|
Chris PeBenito |
ef5ca0 |
files_pid_file(cupsd_var_run_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
type hplip_t;
|
|
Chris PeBenito |
ef5ca0 |
type hplip_exec_t;
|
|
Chris PeBenito |
ef5ca0 |
init_daemon_domain(hplip_t,hplip_exec_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
9bbc75 |
type hplip_etc_t;
|
|
Chris PeBenito |
9bbc75 |
files_config_file(hplip_etc_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
type hplip_var_run_t;
|
|
Chris PeBenito |
ef5ca0 |
files_pid_file(hplip_var_run_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
type ptal_t;
|
|
Chris PeBenito |
ef5ca0 |
type ptal_exec_t;
|
|
Chris PeBenito |
ef5ca0 |
init_daemon_domain(ptal_t,ptal_exec_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
9bbc75 |
type ptal_etc_t;
|
|
Chris PeBenito |
9bbc75 |
files_config_file(ptal_etc_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
type ptal_var_run_t;
|
|
Chris PeBenito |
ef5ca0 |
files_pid_file(ptal_var_run_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
########################################
|
|
Chris PeBenito |
ef5ca0 |
#
|
|
Chris PeBenito |
ef5ca0 |
# Cups local policy
|
|
Chris PeBenito |
ef5ca0 |
#
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
# /usr/lib/cups/backend/serial needs sys_admin(?!)
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t self:capability { sys_admin dac_read_search kill setgid setuid fsetid net_bind_service fowner chown dac_override sys_tty_config audit_write };
|
|
Chris PeBenito |
9bbc75 |
dontaudit cupsd_t self:capability { sys_tty_config net_admin };
|
|
Chris PeBenito |
9bbc75 |
allow cupsd_t self:process { setsched signal_perms };
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t self:fifo_file rw_file_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t self:unix_stream_socket create_socket_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t self:unix_dgram_socket create_socket_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t self:netlink_audit_socket { create_netlink_socket_perms nlmsg_relay };
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t self:netlink_route_socket { r_netlink_socket_perms };
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t self:tcp_socket { create_stream_socket_perms connectto acceptfrom recvfrom };
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t self:udp_socket create_socket_perms;
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t cupsd_etc_t:file { r_file_perms setattr };
|
|
Chris PeBenito |
9bbc75 |
allow cupsd_t cupsd_etc_t:dir { rw_dir_perms setattr };
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t cupsd_etc_t:lnk_file { getattr read };
|
|
Chris PeBenito |
ef5ca0 |
files_search_etc(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t cupsd_rw_etc_t:file manage_file_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t cupsd_rw_etc_t:dir manage_dir_perms;
|
|
Chris PeBenito |
ef5ca0 |
type_transition cupsd_t cupsd_etc_t:file cupsd_rw_etc_t;
|
|
Chris PeBenito |
ef5ca0 |
files_create_var(cupsd_t,cupsd_rw_etc_t,{ dir file })
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
# allow cups to execute its backend scripts
|
|
Chris PeBenito |
ef5ca0 |
can_exec(cupsd_t, cupsd_exec_t)
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t cupsd_exec_t:dir search;
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t cupsd_exec_t:lnk_file read;
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t cupsd_log_t:file create_file_perms;
|
|
Chris PeBenito |
9bbc75 |
allow cupsd_t cupsd_log_t:dir { setattr rw_dir_perms };
|
|
Chris PeBenito |
ef5ca0 |
logging_create_log(cupsd_t,cupsd_log_t,{ file dir })
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t cupsd_tmp_t:dir create_dir_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t cupsd_tmp_t:file create_file_perms;
|
|
Chris PeBenito |
ef5ca0 |
files_create_tmp_files(cupsd_t, cupsd_tmp_t, { file dir })
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t cupsd_var_run_t:file create_file_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t cupsd_var_run_t:dir rw_dir_perms;
|
|
Chris PeBenito |
ef5ca0 |
files_create_pid(cupsd_t,cupsd_var_run_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t hplip_var_run_t:file { read getattr };
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t ptal_var_run_t:dir search;
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t ptal_var_run_t:sock_file { write setattr };
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t ptal_t:unix_stream_socket connectto;
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
kernel_read_system_state(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
kernel_read_all_sysctl(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
kernel_tcp_recvfrom(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
corenet_tcp_sendrecv_all_if(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_udp_sendrecv_all_if(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_raw_sendrecv_all_if(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_tcp_sendrecv_all_nodes(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_udp_sendrecv_all_nodes(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_raw_sendrecv_all_nodes(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_tcp_sendrecv_all_ports(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_udp_sendrecv_all_ports(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_tcp_bind_all_nodes(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_udp_bind_all_nodes(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_tcp_bind_ipp_port(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_udp_bind_ipp_port(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_tcp_bind_reserved_port(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_dontaudit_tcp_bind_all_reserved_ports(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_tcp_connect_all_ports(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
dev_rw_printer(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
dev_read_urand(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
dev_read_sysfs(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
dev_read_usbfs(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
fs_getattr_all_fs(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
fs_search_auto_mountpoints(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
term_dontaudit_use_console(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
auth_domtrans_chk_passwd(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
# Filter scripts may be shell scripts, and may invoke progs like /bin/mktemp
|
|
Chris PeBenito |
ef5ca0 |
corecmd_exec_shell(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
corecmd_exec_bin(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
corecmd_exec_sbin(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
domain_use_wide_inherit_fd(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
files_read_etc_files(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
files_read_etc_runtime_files(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
# read python modules
|
|
Chris PeBenito |
ef5ca0 |
files_read_usr_files(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
# for /var/lib/defoma
|
|
Chris PeBenito |
ef5ca0 |
files_search_var_lib(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
files_list_world_readable(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
files_read_world_readable_files(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
files_read_world_readable_symlinks(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
init_use_fd(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
init_use_script_pty(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
init_exec_script(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
libs_use_ld_so(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
libs_use_shared_libs(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
# Read /usr/lib/gconv/gconv-modules.* and /usr/lib/python2.2/.*
|
|
Chris PeBenito |
ef5ca0 |
libs_read_lib(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
logging_send_syslog_msg(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
miscfiles_read_localization(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
# invoking ghostscript needs to read fonts
|
|
Chris PeBenito |
ef5ca0 |
miscfiles_read_fonts(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
seutil_dontaudit_read_config(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
sysnet_read_config(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
userdom_dontaudit_use_unpriv_user_fd(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
userdom_dontaudit_search_sysadm_home_dir(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
# Write to /var/spool/cups.
|
|
Chris PeBenito |
ef5ca0 |
lpd_manage_spool(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
ifdef(`targeted_policy',`
|
|
Chris PeBenito |
ef5ca0 |
term_dontaudit_use_unallocated_tty(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
term_dontaudit_use_generic_pty(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
files_dontaudit_read_root_file(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
optional_policy(`dbus.te',`
|
|
Chris PeBenito |
ef5ca0 |
dbus_system_bus_client_template(cupsd,cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
dbus_send_system_bus_msg(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t userdomain:dbus send_msg;
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
optional_policy(`hostname.te',`
|
|
Chris PeBenito |
ef5ca0 |
hostname_exec(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
optional_policy(`mount.te',`
|
|
Chris PeBenito |
ef5ca0 |
mount_send_nfs_client_request(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
optional_policy(`nscd.te',`
|
|
Chris PeBenito |
ef5ca0 |
nscd_use_socket(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
optional_policy(`selinuxutil.te',`
|
|
Chris PeBenito |
ef5ca0 |
seutil_sigchld_newrole(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
optional_policy(`udev.te', `
|
|
Chris PeBenito |
ef5ca0 |
udev_read_db(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
ifdef(`TODO',`
|
|
Chris PeBenito |
ef5ca0 |
optional_policy(`rhgb.te',`
|
|
Chris PeBenito |
ef5ca0 |
rhgb_domain(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
allow web_client_domain cupsd_t:tcp_socket { connectto recvfrom };
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t web_client_domain:tcp_socket { acceptfrom recvfrom };
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t kernel_t:tcp_socket recvfrom;
|
|
Chris PeBenito |
ef5ca0 |
allow web_client_domain kernel_t:tcp_socket recvfrom;
|
|
Chris PeBenito |
ef5ca0 |
') dnl end TODO
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
9bbc75 |
allow cupsd_t usercanread:dir r_dir_perms;
|
|
Chris PeBenito |
9bbc75 |
allow cupsd_t usercanread:file r_file_perms;
|
|
Chris PeBenito |
9bbc75 |
allow cupsd_t usercanread:lnk_file { getattr read };
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t devpts_t:dir search;
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
dontaudit cupsd_t random_device_t:chr_file ioctl;
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
# temporary solution, we need something better
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t serial_device:chr_file rw_file_perms;
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
optional_policy(`logrotate.te',`
|
|
Chris PeBenito |
ef5ca0 |
domain_auto_trans(logrotate_t, cupsd_exec_t, cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
optional_policy(`inetd.te', `
|
|
Chris PeBenito |
ef5ca0 |
domain_auto_trans(inetd_t, cupsd_exec_t, cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
# for /etc/printcap
|
|
Chris PeBenito |
ef5ca0 |
dontaudit cupsd_t etc_t:file write;
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
# Send to portmap.
|
|
Chris PeBenito |
ef5ca0 |
optional_policy(`portmap.te', `
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t portmap_t:udp_socket sendto;
|
|
Chris PeBenito |
ef5ca0 |
allow portmap_t cupsd_t:udp_socket recvfrom;
|
|
Chris PeBenito |
ef5ca0 |
allow portmap_t cupsd_t:udp_socket sendto;
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t portmap_t:udp_socket recvfrom;
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
#
|
|
Chris PeBenito |
ef5ca0 |
# Satisfy readahead
|
|
Chris PeBenito |
ef5ca0 |
#
|
|
Chris PeBenito |
ef5ca0 |
allow initrc_t cupsd_log_t:file { getattr read };
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t var_t:dir { getattr read search };
|
|
Chris PeBenito |
9bbc75 |
allow cupsd_t var_t:file r_file_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t var_t:lnk_file { getattr read };
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
optional_policy(`samba.te', `
|
|
Chris PeBenito |
ef5ca0 |
# cjp: rw_dir_perms here doesnt make sense
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t samba_var_t:dir rw_dir_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t samba_var_t:file rw_file_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t samba_var_t:lnk_file { getattr read };
|
|
Chris PeBenito |
ef5ca0 |
allow smbd_t cupsd_etc_t:dir search;
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
optional_policy(`pam.te', `
|
|
Chris PeBenito |
ef5ca0 |
dontaudit cupsd_t pam_var_run_t:file { getattr read };
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
dontaudit cupsd_t { sysadm_home_dir_t staff_home_dir_t }:dir { getattr search };
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
########################################
|
|
Chris PeBenito |
ef5ca0 |
#
|
|
Chris PeBenito |
ef5ca0 |
# PTAL local policy
|
|
Chris PeBenito |
ef5ca0 |
#
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
allow ptal_t self:capability { chown sys_rawio };
|
|
Chris PeBenito |
ef5ca0 |
dontaudit ptal_t self:capability sys_tty_config;
|
|
Chris PeBenito |
ef5ca0 |
allow ptal_t self:fifo_file rw_file_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow ptal_t self:unix_dgram_socket create_socket_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow ptal_t self:unix_stream_socket create_stream_socket_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow ptal_t self:tcp_socket create_stream_socket_perms;
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
allow ptal_t ptal_etc_t:file r_file_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow ptal_t ptal_etc_t:dir r_dir_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow ptal_t ptal_etc_t:lnk_file { getattr read };
|
|
Chris PeBenito |
ef5ca0 |
files_search_etc(ptal_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
allow ptal_t ptal_var_run_t:dir create_dir_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow ptal_t ptal_var_run_t:file create_file_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow ptal_t ptal_var_run_t:lnk_file create_lnk_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow ptal_t ptal_var_run_t:sock_file create_file_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow ptal_t ptal_var_run_t:fifo_file create_file_perms;
|
|
Chris PeBenito |
ef5ca0 |
files_create_pid(ptal_t,ptal_var_run_t,{ file lnk_file sock_file fifo_file })
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
allow ptal_t ptal_var_run_t:file create_file_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow ptal_t ptal_var_run_t:dir rw_dir_perms;
|
|
Chris PeBenito |
ef5ca0 |
files_create_pid(ptal_t,ptal_var_run_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
kernel_read_kernel_sysctl(ptal_t)
|
|
Chris PeBenito |
ef5ca0 |
kernel_list_proc(ptal_t)
|
|
Chris PeBenito |
ef5ca0 |
kernel_read_proc_symlinks(ptal_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
corenet_tcp_sendrecv_all_if(ptal_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_raw_sendrecv_all_if(ptal_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_tcp_sendrecv_all_nodes(ptal_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_raw_sendrecv_all_nodes(ptal_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_tcp_bind_all_nodes(ptal_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_tcp_sendrecv_all_ports(ptal_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_tcp_bind_ptal_port(ptal_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
dev_read_sysfs(ptal_t)
|
|
Chris PeBenito |
ef5ca0 |
dev_read_usbfs(ptal_t)
|
|
Chris PeBenito |
ef5ca0 |
dev_rw_printer(ptal_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
fs_getattr_all_fs(ptal_t)
|
|
Chris PeBenito |
ef5ca0 |
fs_search_auto_mountpoints(ptal_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
term_dontaudit_use_console(ptal_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
domain_use_wide_inherit_fd(ptal_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
files_read_etc_files(ptal_t)
|
|
Chris PeBenito |
ef5ca0 |
files_read_etc_runtime_files(ptal_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
init_use_fd(ptal_t)
|
|
Chris PeBenito |
ef5ca0 |
init_use_script_pty(ptal_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
libs_use_ld_so(ptal_t)
|
|
Chris PeBenito |
ef5ca0 |
libs_use_shared_libs(ptal_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
logging_send_syslog_msg(ptal_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
miscfiles_read_localization(ptal_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
sysnet_read_config(ptal_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
userdom_dontaudit_use_unpriv_user_fd(ptal_t)
|
|
Chris PeBenito |
ef5ca0 |
userdom_dontaudit_search_sysadm_home_dir(ptal_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
ifdef(`targeted_policy', `
|
|
Chris PeBenito |
ef5ca0 |
term_dontaudit_use_unallocated_tty(ptal_t)
|
|
Chris PeBenito |
ef5ca0 |
term_dontaudit_use_generic_pty(ptal_t)
|
|
Chris PeBenito |
ef5ca0 |
files_dontaudit_read_root_file(ptal_t)
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
optional_policy(`selinuxutil.te',`
|
|
Chris PeBenito |
ef5ca0 |
seutil_sigchld_newrole(ptal_t)
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
optional_policy(`udev.te', `
|
|
Chris PeBenito |
ef5ca0 |
udev_read_db(ptal_t)
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
ifdef(`TODO',`
|
|
Chris PeBenito |
ef5ca0 |
optional_policy(`rhgb.te',`
|
|
Chris PeBenito |
ef5ca0 |
rhgb_domain(ptal_t)
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
') dnl end TODO
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
allow userdomain ptal_t:unix_stream_socket connectto;
|
|
Chris PeBenito |
ef5ca0 |
allow userdomain ptal_var_run_t:sock_file write;
|
|
Chris PeBenito |
ef5ca0 |
allow userdomain ptal_var_run_t:dir search;
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
allow initrc_t printer_device_t:chr_file getattr;
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
dontaudit ptal_t { sysadm_home_dir_t staff_home_dir_t }:dir { getattr search };
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
allow initrc_t ptal_var_run_t:dir rmdir;
|
|
Chris PeBenito |
ef5ca0 |
allow initrc_t ptal_var_run_t:fifo_file unlink;
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
########################################
|
|
Chris PeBenito |
ef5ca0 |
#
|
|
Chris PeBenito |
ef5ca0 |
# HPLIP local policy
|
|
Chris PeBenito |
ef5ca0 |
#
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
dontaudit hplip_t self:capability sys_tty_config;
|
|
Chris PeBenito |
ef5ca0 |
allow hplip_t self:unix_dgram_socket create_socket_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow hplip_t self:unix_stream_socket create_socket_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow hplip_t self:tcp_socket create_stream_socket_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow hplip_t self:udp_socket create_socket_perms;
|
|
Chris PeBenito |
ef5ca0 |
# cjp: raw?
|
|
Chris PeBenito |
ef5ca0 |
allow hplip_t self:rawip_socket create_socket_perms;
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
allow hplip_t cupsd_etc_t:dir search;
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
allow hplip_t hplip_etc_t:file r_file_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow hplip_t hplip_etc_t:dir r_dir_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow hplip_t hplip_etc_t:lnk_file { getattr read };
|
|
Chris PeBenito |
ef5ca0 |
files_search_etc(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
allow hplip_t hplip_var_run_t:file create_file_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow hplip_t hplip_var_run_t:dir rw_dir_perms;
|
|
Chris PeBenito |
ef5ca0 |
files_create_pid(hplip_t,hplip_var_run_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
kernel_read_system_state(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
kernel_read_kernel_sysctl(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
corenet_tcp_sendrecv_all_if(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_udp_sendrecv_all_if(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_raw_sendrecv_all_if(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_tcp_sendrecv_all_nodes(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_udp_sendrecv_all_nodes(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_raw_sendrecv_all_nodes(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_tcp_sendrecv_all_ports(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_udp_sendrecv_all_ports(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_tcp_bind_all_nodes(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_udp_bind_all_nodes(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_tcp_bind_hplip_port(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_tcp_connect_hplip_port(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_tcp_connect_ipp_port(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
dev_read_sysfs(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
dev_rw_printer(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
dev_read_urand(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
fs_getattr_all_fs(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
fs_search_auto_mountpoints(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
term_dontaudit_use_console(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
# for python
|
|
Chris PeBenito |
ef5ca0 |
corecmd_exec_bin(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
corecmd_search_sbin(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
domain_use_wide_inherit_fd(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
files_read_etc_files(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
files_read_etc_runtime_files(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
files_read_usr_files(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
init_use_fd(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
init_use_script_pty(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
libs_use_ld_so(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
libs_use_shared_libs(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
logging_send_syslog_msg(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
miscfiles_read_localization(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
sysnet_read_config(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
userdom_dontaudit_use_unpriv_user_fd(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
userdom_dontaudit_search_sysadm_home_dir(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
lpd_read_config(cupsd_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
ifdef(`targeted_policy', `
|
|
Chris PeBenito |
ef5ca0 |
term_dontaudit_use_unallocated_tty(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
term_dontaudit_use_generic_pty(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
files_dontaudit_read_root_file(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
optional_policy(`mount.te',`
|
|
Chris PeBenito |
ef5ca0 |
mount_send_nfs_client_request(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
optional_policy(`selinuxutil.te',`
|
|
Chris PeBenito |
ef5ca0 |
seutil_sigchld_newrole(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
optional_policy(`udev.te', `
|
|
Chris PeBenito |
ef5ca0 |
udev_read_db(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
ifdef(`TODO',`
|
|
Chris PeBenito |
ef5ca0 |
optional_policy(`rhgb.te',`
|
|
Chris PeBenito |
ef5ca0 |
rhgb_domain(hplip_t)
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
') dnl end TODO
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
allow hplip_t devpts_t:dir search;
|
|
Chris PeBenito |
ef5ca0 |
allow hplip_t devpts_t:chr_file { getattr ioctl };
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
########################################
|
|
Chris PeBenito |
ef5ca0 |
#
|
|
Chris PeBenito |
ef5ca0 |
# Cups configuration daemon local policy
|
|
Chris PeBenito |
ef5ca0 |
#
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_config_t self:capability { chown sys_tty_config };
|
|
Chris PeBenito |
9bbc75 |
allow cupsd_config_t self:process signal_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_config_t self:fifo_file rw_file_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_config_t self:unix_stream_socket create_socket_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_config_t self:unix_dgram_socket create_socket_perms;
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_config_t cupsd_t:tcp_socket { connectto recvfrom };
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t cupsd_config_t:tcp_socket { acceptfrom recvfrom };
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
# old can_ps() on cupsd_t:
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_config_t cupsd_t:process { signal };
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_config_t cupsd_t:{ file lnk_file } { getattr read };
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_config_t cupsd_t:dir { search getattr read };
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_config_t cupsd_t:{ file lnk_file } { read getattr };
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_config_t cupsd_t:process getattr;
|
|
Chris PeBenito |
ef5ca0 |
# We need to suppress this denial because procps tries to access
|
|
Chris PeBenito |
ef5ca0 |
# /proc/pid/environ and this now triggers a ptrace check in recent kernels
|
|
Chris PeBenito |
ef5ca0 |
# (2.4 and 2.6). Might want to change procps to not do this, or only if
|
|
Chris PeBenito |
ef5ca0 |
# running in a privileged domain.
|
|
Chris PeBenito |
ef5ca0 |
dontaudit cupsd_config_t cupsd_t:process ptrace;
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_config_t cupsd_config_var_run_t:file create_file_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_config_t cupsd_config_var_run_t:dir rw_dir_perms;
|
|
Chris PeBenito |
ef5ca0 |
files_create_pid(cupsd_config_t,cupsd_config_var_run_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
can_exec(cupsd_config_t, cupsd_config_exec_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_config_t cupsd_etc_t:dir rw_dir_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_config_t cupsd_etc_t:file create_file_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_config_t cupsd_etc_t:lnk_file create_lnk_perms;
|
|
Chris PeBenito |
ef5ca0 |
type_transition cupsd_config_t cupsd_etc_t:file cupsd_rw_etc_t;
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_config_t cupsd_rw_etc_t:dir rw_dir_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_config_t cupsd_rw_etc_t:file manage_file_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_config_t cupsd_rw_etc_t:lnk_file create_lnk_perms;
|
|
Chris PeBenito |
ef5ca0 |
files_create_var(cupsd_config_t,cupsd_rw_etc_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_config_t cupsd_var_run_t:file { getattr read };
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
kernel_read_system_state(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
kernel_read_kernel_sysctl(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
kernel_tcp_recvfrom(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
corenet_tcp_sendrecv_all_if(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_raw_sendrecv_all_if(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_tcp_sendrecv_all_nodes(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_raw_sendrecv_all_nodes(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_tcp_sendrecv_all_ports(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_tcp_bind_all_nodes(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_tcp_connect_all_ports(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
dev_read_sysfs(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
dev_read_urand(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
fs_getattr_all_fs(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
fs_search_auto_mountpoints(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
term_dontaudit_use_console(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
corecmd_exec_bin(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
corecmd_exec_sbin(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
corecmd_exec_shell(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
domain_use_wide_inherit_fd(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
files_read_usr_files(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
init_use_fd(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
init_use_script_pty(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
libs_use_ld_so(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
libs_use_shared_libs(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
logging_send_syslog_msg(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
miscfiles_read_localization(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
seutil_dontaudit_search_config(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
sysnet_read_config(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
userdom_dontaudit_use_unpriv_user_fd(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
userdom_dontaudit_search_sysadm_home_dir(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
ifdef(`targeted_policy', `
|
|
Chris PeBenito |
ef5ca0 |
term_dontaudit_use_unallocated_tty(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
term_dontaudit_use_generic_pty(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
files_dontaudit_read_root_file(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
optional_policy(`nis.te',`
|
|
Chris PeBenito |
ef5ca0 |
nis_use_ypbind(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
optional_policy(`hostname.te',`
|
|
Chris PeBenito |
ef5ca0 |
hostname_exec(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
optional_policy(`logrotate.te',`
|
|
Chris PeBenito |
ef5ca0 |
logrotate_use_fd(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
optional_policy(`nscd.te',`
|
|
Chris PeBenito |
ef5ca0 |
nscd_use_socket(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
optional_policy(`selinuxutil.te',`
|
|
Chris PeBenito |
ef5ca0 |
seutil_sigchld_newrole(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
optional_policy(`udev.te', `
|
|
Chris PeBenito |
ef5ca0 |
udev_read_db(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
ifdef(`TODO',`
|
|
Chris PeBenito |
ef5ca0 |
optional_policy(`rhgb.te',`
|
|
Chris PeBenito |
ef5ca0 |
rhgb_domain(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
') dnl end TODO
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_config_t devpts_t:dir search;
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_config_t devpts_t:chr_file { getattr ioctl };
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
ifdef(`distro_redhat', `
|
|
Chris PeBenito |
ef5ca0 |
optional_policy(`rpm.te',`
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_config_t rpm_var_lib_t:dir { getattr search };
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_config_t rpm_var_lib_t:file { getattr read };
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_config_t initrc_exec_t:file getattr;
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_config_t var_t:lnk_file read;
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
optional_policy(`dbus.te',`
|
|
Chris PeBenito |
ef5ca0 |
dbus_system_bus_client_template(cupsd_config,cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
dbus_connect_system_bus(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
dbus_send_system_bus_msg(cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_config_t userdomain:dbus send_msg;
|
|
Chris PeBenito |
ef5ca0 |
allow userdomain cupsd_config_t:dbus send_msg;
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
optional_policy(`hal.te', `
|
|
Chris PeBenito |
ef5ca0 |
optional_policy(`dbus.te', `
|
|
Chris PeBenito |
ef5ca0 |
allow { cupsd_t cupsd_config_t } hald_t:dbus send_msg;
|
|
Chris PeBenito |
ef5ca0 |
allow hald_t { cupsd_t cupsd_config_t }:dbus send_msg;
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
allow hald_t cupsd_config_t:process signal;
|
|
Chris PeBenito |
ef5ca0 |
domain_auto_trans(hald_t, cupsd_config_exec_t, cupsd_config_t)
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
# killall causes the following
|
|
Chris PeBenito |
ef5ca0 |
dontaudit cupsd_config_t domain:dir { getattr search };
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_config_t var_lib_t:dir { getattr search };
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_config_t rpm_var_lib_t:file { getattr read };
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_config_t printconf_t:file { getattr read };
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_config_t system_crond_t:fd use;
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_config_t crond_t:fifo_file r_file_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t crond_t:fifo_file read;
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t crond_t:fd use;
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
# Alternatives asks for this
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_config_t initrc_exec_t:file getattr;
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
ifdef(`targeted_policy', `
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t initrc_t:unix_stream_socket connectto;
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_t initrc_t:dbus send_msg;
|
|
Chris PeBenito |
ef5ca0 |
allow initrc_t cupsd_t:dbus send_msg;
|
|
Chris PeBenito |
ef5ca0 |
allow { cupsd_config_t cupsd_t } unconfined_t:dbus send_msg;
|
|
Chris PeBenito |
ef5ca0 |
allow unconfined_t cupsd_config_t:dbus send_msg;
|
|
Chris PeBenito |
ef5ca0 |
allow { cupsd_t cupsd_config_t } unconfined_t:fifo_file read;
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
########################################
|
|
Chris PeBenito |
ef5ca0 |
#
|
|
Chris PeBenito |
ef5ca0 |
# Cups lpd support
|
|
Chris PeBenito |
ef5ca0 |
#
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_lpd_t self:process signal_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_lpd_t self:fifo_file rw_file_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_lpd_t self:tcp_socket connected_stream_socket_perms;
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
# for identd
|
|
Chris PeBenito |
ef5ca0 |
# cjp: this should probably only be inetd_child rules?
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_lpd_t self:netlink_tcpdiag_socket r_netlink_socket_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_lpd_t self:capability { setuid setgid };
|
|
Chris PeBenito |
ef5ca0 |
files_search_home(cupsd_lpd_t)
|
|
Chris PeBenito |
ef5ca0 |
optional_policy(`kerberos.te',`
|
|
Chris PeBenito |
ef5ca0 |
kerberos_use(cupsd_lpd_t)
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
#end for identd
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
9bbc75 |
allow cupsd_lpd_t cupsd_etc_t:dir list_dir_perms;
|
|
Chris PeBenito |
9bbc75 |
allow cupsd_lpd_t cupsd_etc_t:file r_file_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_lpd_t cupsd_etc_t:lnk_file { getattr read };
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_lpd_t cupsd_lpd_tmp_t:dir create_dir_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_lpd_t cupsd_lpd_tmp_t:file create_file_perms;
|
|
Chris PeBenito |
ef5ca0 |
files_create_tmp_files(cupsd_lpd_t, cupsd_lpd_tmp_t, { file dir })
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_lpd_t cupsd_lpd_var_run_t:file create_file_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_lpd_t cupsd_lpd_var_run_t:dir rw_dir_perms;
|
|
Chris PeBenito |
ef5ca0 |
files_create_pid(cupsd_lpd_t,cupsd_lpd_var_run_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
9bbc75 |
allow cupsd_lpd_t cupsd_rw_etc_t:dir list_dir_perms;
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_lpd_t cupsd_rw_etc_t:file { read getattr };
|
|
Chris PeBenito |
ef5ca0 |
allow cupsd_lpd_t cupsd_rw_etc_t:lnk_file { getattr read };
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
kernel_read_kernel_sysctl(cupsd_lpd_t)
|
|
Chris PeBenito |
ef5ca0 |
kernel_read_system_state(cupsd_lpd_t)
|
|
Chris PeBenito |
ef5ca0 |
kernel_read_network_state(cupsd_lpd_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
corenet_tcp_sendrecv_all_if(cupsd_lpd_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_udp_sendrecv_all_if(cupsd_lpd_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_raw_sendrecv_all_if(cupsd_lpd_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_tcp_sendrecv_all_nodes(cupsd_lpd_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_udp_sendrecv_all_nodes(cupsd_lpd_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_raw_sendrecv_all_nodes(cupsd_lpd_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_tcp_sendrecv_all_ports(cupsd_lpd_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_udp_sendrecv_all_ports(cupsd_lpd_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_tcp_bind_all_nodes(cupsd_lpd_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_udp_bind_all_nodes(cupsd_lpd_t)
|
|
Chris PeBenito |
ef5ca0 |
corenet_tcp_connect_ipp_port(cupsd_lpd_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
dev_read_urand(cupsd_lpd_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
fs_getattr_xattr_fs(cupsd_lpd_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
files_read_etc_files(cupsd_lpd_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
libs_use_ld_so(cupsd_lpd_t)
|
|
Chris PeBenito |
ef5ca0 |
libs_use_shared_libs(cupsd_lpd_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
logging_send_syslog_msg(cupsd_lpd_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
miscfiles_read_localization(cupsd_lpd_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
sysnet_read_config(cupsd_lpd_t)
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
optional_policy(`nis.te',`
|
|
Chris PeBenito |
ef5ca0 |
nis_use_ypbind(cupsd_lpd_t)
|
|
Chris PeBenito |
ef5ca0 |
')
|
|
Chris PeBenito |
ef5ca0 |
|
|
Chris PeBenito |
ef5ca0 |
optional_policy(`nscd.te',`
|
|
Chris PeBenito |
ef5ca0 |
nscd_use_socket(cupsd_lpd_t)
|
|
Chris PeBenito |
ef5ca0 |
')
|