From 189694126f27ebadb2d91582e4c17f696d6814dc Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Thu, 25 May 2006 18:42:32 +0000 Subject: [PATCH] reorganize the file --- refpolicy/policy/modules/services/cups.te | 394 +++++++++++----------- 1 file changed, 197 insertions(+), 197 deletions(-) diff --git a/refpolicy/policy/modules/services/cups.te b/refpolicy/policy/modules/services/cups.te index 14a9d2c4d..500d5643a 100644 --- a/refpolicy/policy/modules/services/cups.te +++ b/refpolicy/policy/modules/services/cups.te @@ -284,203 +284,6 @@ allow cupsd_t var_t:dir { getattr read search }; allow cupsd_t var_t:file r_file_perms; allow cupsd_t var_t:lnk_file { getattr read }; -######################################## -# -# 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) -') - -allow initrc_t printer_device_t:chr_file getattr; - -allow initrc_t ptal_var_run_t:dir rmdir; -allow initrc_t ptal_var_run_t:fifo_file unlink; -allow initrc_t cupsd_rw_etc_t:file r_file_perms; - -######################################## -# -# 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; -# 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) - -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(` - mount_send_nfs_client_request(hplip_t) -') - -optional_policy(` - seutil_sigchld_newrole(hplip_t) -') - -optional_policy(` - udev_read_db(hplip_t) -') - -allow hplip_t devpts_t:dir search; -allow hplip_t devpts_t:chr_file { getattr ioctl }; - ######################################## # # Cups configuration daemon local policy @@ -748,3 +551,200 @@ optional_policy(` optional_policy(` nscd_socket_use(cupsd_lpd_t) ') + +######################################## +# +# 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; +# 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) + +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(` + mount_send_nfs_client_request(hplip_t) +') + +optional_policy(` + seutil_sigchld_newrole(hplip_t) +') + +optional_policy(` + udev_read_db(hplip_t) +') + +allow hplip_t devpts_t:dir search; +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) +') + +allow initrc_t printer_device_t:chr_file getattr; + +allow initrc_t ptal_var_run_t:dir rmdir; +allow initrc_t ptal_var_run_t:fifo_file unlink; +allow initrc_t cupsd_rw_etc_t:file r_file_perms;