|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
0251df |
policy_module(pcmcia,1.2.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 |
17de1b |
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 |
17de1b |
domain_entry_file(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 |
17de1b |
dev_filetrans(cardmgr_t,cardmgr_lnk_t,lnk_file)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# Create stab file
|
|
Chris PeBenito |
c0868a |
manage_files_pattern(cardmgr_t,cardmgr_var_lib_t,cardmgr_var_lib_t)
|
|
Chris PeBenito |
17de1b |
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 |
17de1b |
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 |
17de1b |
files_search_kernel_modules(cardmgr_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
dev_read_sysfs(cardmgr_t)
|
|
Chris PeBenito |
17de1b |
dev_manage_cardmgr_dev(cardmgr_t)
|
|
Chris PeBenito |
17de1b |
dev_create_cardmgr_dev(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 |
fs_getattr_all_fs(cardmgr_t)
|
|
Chris PeBenito |
17de1b |
fs_search_auto_mountpoints(cardmgr_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
term_use_unallocated_ttys(cardmgr_t)
|
|
Chris PeBenito |
17de1b |
term_getattr_all_user_ttys(cardmgr_t)
|
|
Chris PeBenito |
17de1b |
term_dontaudit_getattr_all_user_ptys(cardmgr_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
corecmd_exec_all_executables(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 |
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 |
17de1b |
libs_use_ld_so(cardmgr_t)
|
|
Chris PeBenito |
17de1b |
libs_use_shared_libs(cardmgr_t)
|
|
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 |
17de1b |
userdom_dontaudit_use_unpriv_user_fds(cardmgr_t)
|
|
Chris PeBenito |
17de1b |
userdom_dontaudit_search_sysadm_home_dirs(cardmgr_t)
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
ifdef(`targeted_policy',`
|
|
Chris PeBenito |
17de1b |
term_use_unallocated_ttys(cardmgr_t)
|
|
Chris PeBenito |
17de1b |
term_use_generic_ptys(cardmgr_t)
|
|
Chris PeBenito |
17de1b |
term_dontaudit_use_unallocated_ttys(cardmgr_t)
|
|
Chris PeBenito |
17de1b |
term_dontaudit_use_generic_ptys(cardmgr_t)
|
|
Chris PeBenito |
17de1b |
files_dontaudit_read_root_files(cardmgr_t)
|
|
Chris PeBenito |
17de1b |
')
|
|
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 |
17de1b |
allow cardmgr_t { var_run_t cardmgr_var_run_t tmp_t }:dir rw_dir_perms;
|
|
Chris PeBenito |
17de1b |
type_transition cardmgr_t { var_run_t cardmgr_var_run_t tmp_t }:{ chr_file blk_file } cardmgr_dev_t;
|