|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
141cff |
policy_module(oav,1.0.1)
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
########################################
|
|
Chris PeBenito |
2e9cd9 |
#
|
|
Chris PeBenito |
2e9cd9 |
# Declarations
|
|
Chris PeBenito |
2e9cd9 |
#
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
type oav_update_t;
|
|
Chris PeBenito |
2e9cd9 |
type oav_update_exec_t;
|
|
Chris PeBenito |
2e9cd9 |
domain_type(oav_update_t)
|
|
Chris PeBenito |
2e9cd9 |
domain_entry_file(oav_update_t,oav_update_exec_t)
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
# cjp: may be collapsable to etc_t
|
|
Chris PeBenito |
2e9cd9 |
type oav_update_etc_t;
|
|
Chris PeBenito |
2e9cd9 |
files_type(oav_update_etc_t)
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
type oav_update_var_lib_t;
|
|
Chris PeBenito |
2e9cd9 |
files_type(oav_update_var_lib_t)
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
type scannerdaemon_t;
|
|
Chris PeBenito |
2e9cd9 |
type scannerdaemon_exec_t;
|
|
Chris PeBenito |
2e9cd9 |
init_daemon_domain(scannerdaemon_t,scannerdaemon_exec_t)
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
type scannerdaemon_etc_t;
|
|
Chris PeBenito |
2e9cd9 |
files_type(scannerdaemon_etc_t)
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
type scannerdaemon_log_t;
|
|
Chris PeBenito |
2e9cd9 |
logging_log_file(scannerdaemon_log_t)
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
type scannerdaemon_var_run_t;
|
|
Chris PeBenito |
2e9cd9 |
files_pid_file(scannerdaemon_var_run_t)
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
########################################
|
|
Chris PeBenito |
2e9cd9 |
#
|
|
Chris PeBenito |
2e9cd9 |
# OAV update local policy
|
|
Chris PeBenito |
2e9cd9 |
#
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
allow oav_update_t self:tcp_socket create_stream_socket_perms;
|
|
Chris PeBenito |
2e9cd9 |
allow oav_update_t self:udp_socket create_socket_perms;
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
# Can read /etc/oav-update/* files
|
|
Chris PeBenito |
2e9cd9 |
allow oav_update_t oav_update_etc_t:dir r_dir_perms;
|
|
Chris PeBenito |
2e9cd9 |
allow oav_update_t oav_update_etc_t:file r_file_perms;
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
# Can read /var/lib/oav-update/current
|
|
Chris PeBenito |
2e9cd9 |
allow oav_update_t oav_update_var_lib_t:dir manage_dir_perms;
|
|
Chris PeBenito |
2e9cd9 |
allow oav_update_t oav_update_var_lib_t:file manage_file_perms;
|
|
Chris PeBenito |
2e9cd9 |
allow oav_update_t oav_update_var_lib_t:lnk_file r_file_perms;
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
corecmd_exec_all_executables(oav_update_t)
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
141cff |
corenet_non_ipsec_sendrecv(oav_update_t)
|
|
Chris PeBenito |
2e9cd9 |
corenet_tcp_sendrecv_generic_if(oav_update_t)
|
|
Chris PeBenito |
2e9cd9 |
corenet_udp_sendrecv_generic_if(oav_update_t)
|
|
Chris PeBenito |
2e9cd9 |
corenet_tcp_sendrecv_all_nodes(oav_update_t)
|
|
Chris PeBenito |
2e9cd9 |
corenet_udp_sendrecv_all_nodes(oav_update_t)
|
|
Chris PeBenito |
2e9cd9 |
corenet_tcp_sendrecv_all_ports(oav_update_t)
|
|
Chris PeBenito |
2e9cd9 |
corenet_udp_sendrecv_all_ports(oav_update_t)
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
files_exec_etc_files(oav_update_t)
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
libs_use_ld_so(oav_update_t)
|
|
Chris PeBenito |
2e9cd9 |
libs_use_shared_libs(oav_update_t)
|
|
Chris PeBenito |
2e9cd9 |
libs_exec_ld_so(oav_update_t)
|
|
Chris PeBenito |
2e9cd9 |
libs_exec_lib_files(oav_update_t)
|
|
Chris PeBenito |
2e9cd9 |
libs_use_ld_so(oav_update_t)
|
|
Chris PeBenito |
2e9cd9 |
libs_use_shared_libs(oav_update_t)
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
logging_send_syslog_msg(oav_update_t)
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
sysnet_read_config(oav_update_t)
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
optional_policy(`
|
|
Chris PeBenito |
2e9cd9 |
cron_system_entry(oav_update_t,oav_update_exec_t)
|
|
Chris PeBenito |
2e9cd9 |
')
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
########################################
|
|
Chris PeBenito |
2e9cd9 |
#
|
|
Chris PeBenito |
2e9cd9 |
# Scannerdaemon local policy
|
|
Chris PeBenito |
2e9cd9 |
#
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
dontaudit scannerdaemon_t self:capability sys_tty_config;
|
|
Chris PeBenito |
2e9cd9 |
allow scannerdaemon_t self:process signal_perms;
|
|
Chris PeBenito |
2e9cd9 |
allow scannerdaemon_t self:fifo_file { read write };
|
|
Chris PeBenito |
2e9cd9 |
allow scannerdaemon_t self:tcp_socket create_stream_socket_perms;
|
|
Chris PeBenito |
2e9cd9 |
allow scannerdaemon_t self:udp_socket create_socket_perms;
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
allow scannerdaemon_t oav_update_var_lib_t:dir r_dir_perms;
|
|
Chris PeBenito |
2e9cd9 |
allow scannerdaemon_t oav_update_var_lib_t:file r_file_perms;
|
|
Chris PeBenito |
2e9cd9 |
files_search_var_lib(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
allow scannerdaemon_t scannerdaemon_etc_t:file r_file_perms;
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
allow scannerdaemon_t scannerdaemon_log_t:file create_file_perms;
|
|
Chris PeBenito |
2e9cd9 |
logging_log_filetrans(scannerdaemon_t,scannerdaemon_log_t,file)
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
allow scannerdaemon_t scannerdaemon_var_run_t:file create_file_perms;
|
|
Chris PeBenito |
2e9cd9 |
allow scannerdaemon_t scannerdaemon_var_run_t:dir rw_dir_perms;
|
|
Chris PeBenito |
2e9cd9 |
files_pid_filetrans(scannerdaemon_t,scannerdaemon_var_run_t,file)
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
kernel_read_system_state(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
kernel_read_kernel_sysctls(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
# Can run kaffe
|
|
Chris PeBenito |
2e9cd9 |
corecmd_exec_all_executables(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
141cff |
corenet_non_ipsec_sendrecv(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
corenet_tcp_sendrecv_generic_if(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
corenet_udp_sendrecv_generic_if(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
corenet_tcp_sendrecv_all_nodes(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
corenet_udp_sendrecv_all_nodes(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
corenet_tcp_sendrecv_all_ports(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
corenet_udp_sendrecv_all_ports(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
dev_read_sysfs(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
domain_use_interactive_fds(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
files_read_etc_files(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
files_read_etc_runtime_files(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
# Can run kaffe
|
|
Chris PeBenito |
2e9cd9 |
files_exec_etc_files(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
fs_getattr_all_fs(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
fs_search_auto_mountpoints(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
term_dontaudit_use_console(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
auth_dontaudit_read_shadow(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
init_use_fds(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
init_use_script_ptys(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
libs_use_ld_so(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
libs_use_shared_libs(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
# Can run kaffe
|
|
Chris PeBenito |
2e9cd9 |
libs_use_ld_so(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
libs_use_shared_libs(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
libs_exec_ld_so(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
libs_exec_lib_files(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
logging_send_syslog_msg(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
miscfiles_read_localization(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
sysnet_read_config(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
userdom_dontaudit_use_unpriv_user_fds(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
userdom_dontaudit_search_sysadm_home_dirs(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
ifdef(`targeted_policy',`
|
|
Chris PeBenito |
2e9cd9 |
term_dontaudit_use_unallocated_ttys(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
term_dontaudit_use_generic_ptys(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
files_dontaudit_read_root_files(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
')
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
optional_policy(`
|
|
Chris PeBenito |
2e9cd9 |
seutil_sigchld_newrole(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
')
|
|
Chris PeBenito |
2e9cd9 |
|
|
Chris PeBenito |
2e9cd9 |
optional_policy(`
|
|
Chris PeBenito |
2e9cd9 |
udev_read_db(scannerdaemon_t)
|
|
Chris PeBenito |
2e9cd9 |
')
|