2005-07-14 20:57:17 +00:00
|
|
|
|
2007-12-14 14:23:18 +00:00
|
|
|
policy_module(pcmcia,1.4.0)
|
2005-07-14 20:57:17 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type cardmgr_t;
|
|
|
|
type cardmgr_exec_t;
|
|
|
|
init_daemon_domain(cardmgr_t,cardmgr_exec_t)
|
|
|
|
|
|
|
|
# Create symbolic links in /dev.
|
|
|
|
# cjp: this should probably be eliminated
|
|
|
|
type cardmgr_lnk_t;
|
|
|
|
files_type(cardmgr_lnk_t)
|
|
|
|
|
2005-07-15 19:18:55 +00:00
|
|
|
type cardmgr_var_lib_t;
|
|
|
|
files_type(cardmgr_var_lib_t)
|
|
|
|
|
2005-07-14 20:57:17 +00:00
|
|
|
type cardmgr_var_run_t;
|
|
|
|
files_pid_file(cardmgr_var_run_t)
|
|
|
|
|
|
|
|
type cardctl_exec_t;
|
2007-07-19 18:57:48 +00:00
|
|
|
application_domain(cardmgr_t,cardctl_exec_t)
|
2005-07-14 20:57:17 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
# Use capabilities (net_admin for route), setuid for cardctl
|
|
|
|
allow cardmgr_t self:capability { dac_read_search dac_override setuid net_admin sys_admin sys_nice sys_tty_config mknod };
|
|
|
|
dontaudit cardmgr_t self:capability sys_tty_config;
|
2005-10-21 19:36:49 +00:00
|
|
|
allow cardmgr_t self:process signal_perms;
|
2006-12-12 20:08:08 +00:00
|
|
|
allow cardmgr_t self:fifo_file rw_fifo_file_perms;
|
2005-07-14 20:57:17 +00:00
|
|
|
allow cardmgr_t self:unix_dgram_socket create_socket_perms;
|
|
|
|
allow cardmgr_t self:unix_stream_socket create_socket_perms;
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow cardmgr_t cardmgr_lnk_t:lnk_file manage_lnk_file_perms;
|
2006-02-21 18:40:44 +00:00
|
|
|
dev_filetrans(cardmgr_t,cardmgr_lnk_t,lnk_file)
|
2005-07-14 20:57:17 +00:00
|
|
|
|
2005-07-15 19:18:55 +00:00
|
|
|
# Create stab file
|
2006-12-12 20:08:08 +00:00
|
|
|
manage_files_pattern(cardmgr_t,cardmgr_var_lib_t,cardmgr_var_lib_t)
|
2006-03-02 23:41:11 +00:00
|
|
|
files_var_lib_filetrans(cardmgr_t,cardmgr_var_lib_t,file)
|
2005-07-15 19:18:55 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow cardmgr_t cardmgr_var_run_t:file manage_file_perms;
|
2006-03-02 23:41:11 +00:00
|
|
|
files_pid_filetrans(cardmgr_t,cardmgr_var_run_t,file)
|
2005-07-14 20:57:17 +00:00
|
|
|
|
|
|
|
kernel_read_system_state(cardmgr_t)
|
2006-01-31 16:49:43 +00:00
|
|
|
kernel_read_kernel_sysctls(cardmgr_t)
|
2005-07-15 15:17:57 +00:00
|
|
|
kernel_dontaudit_getattr_message_if(cardmgr_t)
|
2005-07-14 20:57:17 +00:00
|
|
|
|
2006-03-02 23:41:11 +00:00
|
|
|
files_search_kernel_modules(cardmgr_t)
|
2005-09-22 21:59:50 +00:00
|
|
|
|
2005-07-14 20:57:17 +00:00
|
|
|
dev_read_sysfs(cardmgr_t)
|
2006-01-31 16:08:56 +00:00
|
|
|
dev_manage_cardmgr_dev(cardmgr_t)
|
|
|
|
dev_create_cardmgr_dev(cardmgr_t)
|
2005-07-15 15:17:57 +00:00
|
|
|
dev_getattr_all_chr_files(cardmgr_t)
|
|
|
|
dev_getattr_all_blk_files(cardmgr_t)
|
2005-07-14 20:57:17 +00:00
|
|
|
# for SSP
|
|
|
|
dev_read_urand(cardmgr_t)
|
|
|
|
|
|
|
|
fs_getattr_all_fs(cardmgr_t)
|
|
|
|
fs_search_auto_mountpoints(cardmgr_t)
|
|
|
|
|
2006-02-02 21:08:12 +00:00
|
|
|
term_use_unallocated_ttys(cardmgr_t)
|
2005-07-15 15:17:57 +00:00
|
|
|
term_getattr_all_user_ttys(cardmgr_t)
|
2005-07-15 19:18:55 +00:00
|
|
|
term_dontaudit_getattr_all_user_ptys(cardmgr_t)
|
2005-07-14 20:57:17 +00:00
|
|
|
|
2006-04-19 21:43:02 +00:00
|
|
|
corecmd_exec_all_executables(cardmgr_t)
|
2005-07-14 20:57:17 +00:00
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
domain_use_interactive_fds(cardmgr_t)
|
2005-07-15 15:53:54 +00:00
|
|
|
# Read /proc/PID directories for all domains (for fuser).
|
2005-09-15 15:34:31 +00:00
|
|
|
domain_read_confined_domains_state(cardmgr_t)
|
2005-09-16 14:54:36 +00:00
|
|
|
domain_getattr_confined_domains(cardmgr_t)
|
|
|
|
domain_dontaudit_ptrace_confined_domains(cardmgr_t)
|
2005-07-15 15:17:57 +00:00
|
|
|
# cjp: these look excessive:
|
2005-11-25 19:38:45 +00:00
|
|
|
domain_dontaudit_getattr_all_pipes(cardmgr_t)
|
2005-07-15 15:53:54 +00:00
|
|
|
domain_dontaudit_getattr_all_sockets(cardmgr_t)
|
2005-07-14 20:57:17 +00:00
|
|
|
|
2005-09-22 21:59:50 +00:00
|
|
|
files_list_usr(cardmgr_t)
|
2005-07-14 20:57:17 +00:00
|
|
|
files_search_home(cardmgr_t)
|
|
|
|
files_read_etc_runtime_files(cardmgr_t)
|
|
|
|
files_exec_etc_files(cardmgr_t)
|
2005-07-15 19:18:55 +00:00
|
|
|
# for /var/lib/misc/pcmcia-scheme
|
|
|
|
# would be better to have it in a different type if I knew how it was created..
|
|
|
|
files_read_var_lib_files(cardmgr_t)
|
2005-07-15 15:17:57 +00:00
|
|
|
# cjp: these look excessive:
|
|
|
|
files_dontaudit_getattr_all_dirs(cardmgr_t)
|
|
|
|
files_dontaudit_getattr_all_files(cardmgr_t)
|
|
|
|
files_dontaudit_getattr_all_symlinks(cardmgr_t)
|
|
|
|
files_dontaudit_getattr_all_pipes(cardmgr_t)
|
|
|
|
files_dontaudit_getattr_all_sockets(cardmgr_t)
|
2005-07-14 20:57:17 +00:00
|
|
|
|
|
|
|
libs_use_ld_so(cardmgr_t)
|
|
|
|
libs_use_shared_libs(cardmgr_t)
|
|
|
|
libs_exec_ld_so(cardmgr_t)
|
|
|
|
libs_exec_lib_files(cardmgr_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(cardmgr_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(cardmgr_t)
|
|
|
|
|
2005-09-22 21:59:50 +00:00
|
|
|
modutils_domtrans_insmod(cardmgr_t)
|
|
|
|
|
2005-07-14 20:57:17 +00:00
|
|
|
sysnet_domtrans_ifconfig(cardmgr_t)
|
|
|
|
# for /etc/resolv.conf
|
2006-02-21 18:40:44 +00:00
|
|
|
sysnet_etc_filetrans_config(cardmgr_t)
|
2005-07-14 20:57:17 +00:00
|
|
|
sysnet_manage_config(cardmgr_t)
|
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
userdom_dontaudit_use_unpriv_user_fds(cardmgr_t)
|
2006-02-21 18:40:44 +00:00
|
|
|
userdom_dontaudit_search_sysadm_home_dirs(cardmgr_t)
|
2005-07-14 20:57:17 +00:00
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-10-21 19:36:49 +00:00
|
|
|
seutil_dontaudit_read_config(cardmgr_t)
|
2005-07-14 20:57:17 +00:00
|
|
|
seutil_sigchld_newrole(cardmgr_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-08-04 20:54:51 +00:00
|
|
|
sysnet_domtrans_dhcpc(cardmgr_t)
|
|
|
|
|
|
|
|
sysnet_read_dhcpc_pid(cardmgr_t)
|
2005-09-22 21:59:50 +00:00
|
|
|
sysnet_delete_dhcpc_pid(cardmgr_t)
|
2005-08-04 20:54:51 +00:00
|
|
|
sysnet_kill_dhcpc(cardmgr_t)
|
|
|
|
sysnet_sigchld_dhcpc(cardmgr_t)
|
|
|
|
sysnet_signal_dhcpc(cardmgr_t)
|
|
|
|
sysnet_signull_dhcpc(cardmgr_t)
|
|
|
|
sysnet_sigstop_dhcpc(cardmgr_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-07-14 20:57:17 +00:00
|
|
|
udev_read_db(cardmgr_t)
|
|
|
|
')
|
|
|
|
|
2005-10-24 18:40:24 +00:00
|
|
|
# Create device files in /tmp.
|
|
|
|
# cjp: why is this created all over the place?
|
2005-11-29 21:27:15 +00:00
|
|
|
allow cardmgr_t { var_run_t cardmgr_var_run_t tmp_t }:dir rw_dir_perms;
|
|
|
|
type_transition cardmgr_t { var_run_t cardmgr_var_run_t tmp_t }:{ chr_file blk_file } cardmgr_dev_t;
|