Chris PeBenito 17de1b
Chris PeBenito 17ec8c
policy_module(pcmcia, 1.6.0)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Declarations
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type cardmgr_t;
Chris PeBenito 17de1b
type cardmgr_exec_t;
Chris PeBenito 3f67f7
init_daemon_domain(cardmgr_t, cardmgr_exec_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
# Create symbolic links in /dev.
Chris PeBenito 17de1b
# cjp: this should probably be eliminated
Chris PeBenito 17de1b
type cardmgr_lnk_t;
Chris PeBenito 17de1b
files_type(cardmgr_lnk_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type cardmgr_var_lib_t;
Chris PeBenito 17de1b
files_type(cardmgr_var_lib_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type cardmgr_var_run_t;
Chris PeBenito 17de1b
files_pid_file(cardmgr_var_run_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type cardctl_exec_t;
Chris PeBenito 3f67f7
application_domain(cardmgr_t, cardctl_exec_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Local policy
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
# Use capabilities (net_admin for route), setuid for cardctl
Chris PeBenito 17de1b
allow cardmgr_t self:capability { dac_read_search dac_override setuid net_admin sys_admin sys_nice sys_tty_config mknod };
Chris PeBenito 17de1b
dontaudit cardmgr_t self:capability sys_tty_config;
Chris PeBenito 17de1b
allow cardmgr_t self:process signal_perms;
Chris PeBenito c0868a
allow cardmgr_t self:fifo_file rw_fifo_file_perms;
Chris PeBenito 17de1b
allow cardmgr_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito 17de1b
allow cardmgr_t self:unix_stream_socket create_socket_perms;
Chris PeBenito 17de1b
Chris PeBenito c0868a
allow cardmgr_t cardmgr_lnk_t:lnk_file manage_lnk_file_perms;
Chris PeBenito 3f67f7
dev_filetrans(cardmgr_t, cardmgr_lnk_t, lnk_file)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
# Create stab file
Chris PeBenito 3f67f7
manage_files_pattern(cardmgr_t, cardmgr_var_lib_t, cardmgr_var_lib_t)
Chris PeBenito 3f67f7
files_var_lib_filetrans(cardmgr_t, cardmgr_var_lib_t, file)
Chris PeBenito 17de1b
Chris PeBenito c0868a
allow cardmgr_t cardmgr_var_run_t:file manage_file_perms;
Chris PeBenito 3f67f7
files_pid_filetrans(cardmgr_t, cardmgr_var_run_t, file)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
kernel_read_system_state(cardmgr_t)
Chris PeBenito 17de1b
kernel_read_kernel_sysctls(cardmgr_t)
Chris PeBenito 17de1b
kernel_dontaudit_getattr_message_if(cardmgr_t)
Chris PeBenito 17de1b
Chris PeBenito 4b218b
corecmd_exec_all_executables(cardmgr_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
dev_read_sysfs(cardmgr_t)
Chris PeBenito 17de1b
dev_manage_cardmgr_dev(cardmgr_t)
Chris PeBenito e27827
dev_filetrans_cardmgr(cardmgr_t)
Chris PeBenito 17de1b
dev_getattr_all_chr_files(cardmgr_t)
Chris PeBenito 17de1b
dev_getattr_all_blk_files(cardmgr_t)
Chris PeBenito 17de1b
# for SSP
Chris PeBenito 17de1b
dev_read_urand(cardmgr_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
domain_use_interactive_fds(cardmgr_t)
Chris PeBenito 17de1b
# Read /proc/PID directories for all domains (for fuser).
Chris PeBenito 17de1b
domain_read_confined_domains_state(cardmgr_t)
Chris PeBenito 17de1b
domain_getattr_confined_domains(cardmgr_t)
Chris PeBenito 17de1b
domain_dontaudit_ptrace_confined_domains(cardmgr_t)
Chris PeBenito 17de1b
# cjp: these look excessive:
Chris PeBenito 17de1b
domain_dontaudit_getattr_all_pipes(cardmgr_t)
Chris PeBenito 17de1b
domain_dontaudit_getattr_all_sockets(cardmgr_t)
Chris PeBenito 17de1b
Chris PeBenito 4b218b
files_search_kernel_modules(cardmgr_t)
Chris PeBenito 17de1b
files_list_usr(cardmgr_t)
Chris PeBenito 17de1b
files_search_home(cardmgr_t)
Chris PeBenito 17de1b
files_read_etc_runtime_files(cardmgr_t)
Chris PeBenito 17de1b
files_exec_etc_files(cardmgr_t)
Chris PeBenito 17de1b
# for /var/lib/misc/pcmcia-scheme
Chris PeBenito 17de1b
# would be better to have it in a different type if I knew how it was created..
Chris PeBenito 17de1b
files_read_var_lib_files(cardmgr_t)
Chris PeBenito 17de1b
# cjp: these look excessive:
Chris PeBenito 17de1b
files_dontaudit_getattr_all_dirs(cardmgr_t)
Chris PeBenito 17de1b
files_dontaudit_getattr_all_files(cardmgr_t)
Chris PeBenito 17de1b
files_dontaudit_getattr_all_symlinks(cardmgr_t)
Chris PeBenito 17de1b
files_dontaudit_getattr_all_pipes(cardmgr_t)
Chris PeBenito 17de1b
files_dontaudit_getattr_all_sockets(cardmgr_t)
Chris PeBenito 17de1b
Chris PeBenito 4b218b
fs_getattr_all_fs(cardmgr_t)
Chris PeBenito 4b218b
fs_search_auto_mountpoints(cardmgr_t)
Chris PeBenito 4b218b
Chris PeBenito 4b218b
term_use_unallocated_ttys(cardmgr_t)
Chris PeBenito c3c753
term_getattr_all_ttys(cardmgr_t)
Chris PeBenito c3c753
term_dontaudit_getattr_all_ptys(cardmgr_t)
Chris PeBenito 4b218b
Chris PeBenito 17de1b
libs_exec_ld_so(cardmgr_t)
Chris PeBenito 17de1b
libs_exec_lib_files(cardmgr_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
logging_send_syslog_msg(cardmgr_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
miscfiles_read_localization(cardmgr_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
modutils_domtrans_insmod(cardmgr_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
sysnet_domtrans_ifconfig(cardmgr_t)
Chris PeBenito 17de1b
# for /etc/resolv.conf
Chris PeBenito 17de1b
sysnet_etc_filetrans_config(cardmgr_t)
Chris PeBenito 17de1b
sysnet_manage_config(cardmgr_t)
Chris PeBenito 17de1b
Chris PeBenito 296273
userdom_use_user_terminals(cardmgr_t)
Chris PeBenito 17de1b
userdom_dontaudit_use_unpriv_user_fds(cardmgr_t)
Chris PeBenito 296273
userdom_dontaudit_search_user_home_dirs(cardmgr_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	seutil_dontaudit_read_config(cardmgr_t)
Chris PeBenito 17de1b
	seutil_sigchld_newrole(cardmgr_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	sysnet_domtrans_dhcpc(cardmgr_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	sysnet_read_dhcpc_pid(cardmgr_t)
Chris PeBenito 17de1b
	sysnet_delete_dhcpc_pid(cardmgr_t)
Chris PeBenito 17de1b
	sysnet_kill_dhcpc(cardmgr_t)
Chris PeBenito 17de1b
	sysnet_sigchld_dhcpc(cardmgr_t)
Chris PeBenito 17de1b
	sysnet_signal_dhcpc(cardmgr_t)
Chris PeBenito 17de1b
	sysnet_signull_dhcpc(cardmgr_t)
Chris PeBenito 17de1b
	sysnet_sigstop_dhcpc(cardmgr_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	udev_read_db(cardmgr_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
# Create device files in /tmp.
Chris PeBenito 17de1b
# cjp: why is this created all over the place?
Chris PeBenito aa7c46
files_pid_filetrans(cardmgr_t, cardmgr_dev_t, { chr_file blk_file })
Chris PeBenito aa7c46
files_tmp_filetrans(cardmgr_t, cardmgr_dev_t, { chr_file blk_file })
Chris PeBenito aa7c46
filetrans_pattern(cardmgr_t, cardmgr_var_run_t, cardmgr_dev_t, { chr_file blk_file })