Chris PeBenito 9570b2
policy_module(oav, 1.9.0)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Declarations
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type oav_update_t;
Chris PeBenito 17de1b
type oav_update_exec_t;
Chris PeBenito 0bfccd
application_domain(oav_update_t, oav_update_exec_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
# cjp: may be collapsable to etc_t
Chris PeBenito 17de1b
type oav_update_etc_t;
Chris PeBenito 8a948c
files_config_file(oav_update_etc_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type oav_update_var_lib_t;
Chris PeBenito 17de1b
files_type(oav_update_var_lib_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type scannerdaemon_t;
Chris PeBenito 17de1b
type scannerdaemon_exec_t;
Chris PeBenito 0bfccd
init_daemon_domain(scannerdaemon_t, scannerdaemon_exec_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type scannerdaemon_etc_t;
Chris PeBenito 8a948c
files_config_file(scannerdaemon_etc_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type scannerdaemon_log_t;
Chris PeBenito 17de1b
logging_log_file(scannerdaemon_log_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type scannerdaemon_var_run_t;
Chris PeBenito 17de1b
files_pid_file(scannerdaemon_var_run_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# OAV update local policy
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
allow oav_update_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito 17de1b
allow oav_update_t self:udp_socket create_socket_perms;
Chris PeBenito 17de1b
Chris PeBenito 17de1b
# Can read /etc/oav-update/* files
Chris PeBenito c0868a
allow oav_update_t oav_update_etc_t:dir list_dir_perms;
Chris PeBenito c0868a
allow oav_update_t oav_update_etc_t:file read_file_perms;
Chris PeBenito 17de1b
Chris PeBenito 17de1b
# Can read /var/lib/oav-update/current
Chris PeBenito 0bfccd
manage_dirs_pattern(oav_update_t, oav_update_var_lib_t, oav_update_var_lib_t)
Chris PeBenito 0bfccd
manage_files_pattern(oav_update_t, oav_update_var_lib_t, oav_update_var_lib_t)
Chris PeBenito 0bfccd
read_lnk_files_pattern(oav_update_t, oav_update_var_lib_t, oav_update_var_lib_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
corecmd_exec_all_executables(oav_update_t)
Chris PeBenito 17de1b
Chris PeBenito 190066
corenet_all_recvfrom_unlabeled(oav_update_t)
Chris PeBenito 190066
corenet_all_recvfrom_netlabel(oav_update_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_generic_if(oav_update_t)
Chris PeBenito 17de1b
corenet_udp_sendrecv_generic_if(oav_update_t)
Chris PeBenito c12621
corenet_tcp_sendrecv_generic_node(oav_update_t)
Chris PeBenito c12621
corenet_udp_sendrecv_generic_node(oav_update_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_all_ports(oav_update_t)
Chris PeBenito 17de1b
corenet_udp_sendrecv_all_ports(oav_update_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
files_exec_etc_files(oav_update_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
libs_exec_ld_so(oav_update_t)
Chris PeBenito 17de1b
libs_exec_lib_files(oav_update_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
logging_send_syslog_msg(oav_update_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
sysnet_read_config(oav_update_t)
Chris PeBenito 17de1b
Chris PeBenito 296273
userdom_use_user_terminals(oav_update_t)
Chris PeBenito 296273
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 0bfccd
	cron_system_entry(oav_update_t, oav_update_exec_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Scannerdaemon local policy
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
dontaudit scannerdaemon_t self:capability sys_tty_config;
Chris PeBenito 17de1b
allow scannerdaemon_t self:process signal_perms;
Chris PeBenito 0b36a2
allow scannerdaemon_t self:fifo_file rw_fifo_file_perms;
Chris PeBenito 17de1b
allow scannerdaemon_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito 17de1b
allow scannerdaemon_t self:udp_socket create_socket_perms;
Chris PeBenito 17de1b
Chris PeBenito c0868a
allow scannerdaemon_t oav_update_var_lib_t:dir list_dir_perms;
Chris PeBenito c0868a
allow scannerdaemon_t oav_update_var_lib_t:file read_file_perms;
Chris PeBenito 17de1b
files_search_var_lib(scannerdaemon_t)
Chris PeBenito 17de1b
Chris PeBenito c0868a
allow scannerdaemon_t scannerdaemon_etc_t:file read_file_perms;
Chris PeBenito 17de1b
Chris PeBenito c0868a
allow scannerdaemon_t scannerdaemon_log_t:file manage_file_perms;
Chris PeBenito 0bfccd
logging_log_filetrans(scannerdaemon_t, scannerdaemon_log_t, file)
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
manage_files_pattern(scannerdaemon_t, scannerdaemon_var_run_t, scannerdaemon_var_run_t)
Chris PeBenito 0bfccd
files_pid_filetrans(scannerdaemon_t, scannerdaemon_var_run_t, file)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
kernel_read_system_state(scannerdaemon_t)
Chris PeBenito 17de1b
kernel_read_kernel_sysctls(scannerdaemon_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
# Can run kaffe
Chris PeBenito 17de1b
corecmd_exec_all_executables(scannerdaemon_t)
Chris PeBenito 17de1b
Chris PeBenito 190066
corenet_all_recvfrom_unlabeled(scannerdaemon_t)
Chris PeBenito 190066
corenet_all_recvfrom_netlabel(scannerdaemon_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_generic_if(scannerdaemon_t)
Chris PeBenito 17de1b
corenet_udp_sendrecv_generic_if(scannerdaemon_t)
Chris PeBenito c12621
corenet_tcp_sendrecv_generic_node(scannerdaemon_t)
Chris PeBenito c12621
corenet_udp_sendrecv_generic_node(scannerdaemon_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_all_ports(scannerdaemon_t)
Chris PeBenito 17de1b
corenet_udp_sendrecv_all_ports(scannerdaemon_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
dev_read_sysfs(scannerdaemon_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
domain_use_interactive_fds(scannerdaemon_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
files_read_etc_files(scannerdaemon_t)
Chris PeBenito 17de1b
files_read_etc_runtime_files(scannerdaemon_t)
Chris PeBenito 17de1b
# Can run kaffe
Chris PeBenito 17de1b
files_exec_etc_files(scannerdaemon_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
fs_getattr_all_fs(scannerdaemon_t)
Chris PeBenito 17de1b
fs_search_auto_mountpoints(scannerdaemon_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
auth_dontaudit_read_shadow(scannerdaemon_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
# Can run kaffe
Chris PeBenito 17de1b
libs_exec_ld_so(scannerdaemon_t)
Chris PeBenito 17de1b
libs_exec_lib_files(scannerdaemon_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
logging_send_syslog_msg(scannerdaemon_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
miscfiles_read_localization(scannerdaemon_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
sysnet_read_config(scannerdaemon_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
userdom_dontaudit_use_unpriv_user_fds(scannerdaemon_t)
Chris PeBenito 296273
userdom_dontaudit_search_user_home_dirs(scannerdaemon_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	seutil_sigchld_newrole(scannerdaemon_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	udev_read_db(scannerdaemon_t)
Chris PeBenito 17de1b
')