|
Chris PeBenito |
dfb86a |
|
|
Chris PeBenito |
3a9aef |
policy_module(udev,1.0)
|
|
Chris PeBenito |
3a9aef |
|
|
Chris PeBenito |
3a9aef |
########################################
|
|
Chris PeBenito |
3a9aef |
#
|
|
Chris PeBenito |
3a9aef |
# Declarations
|
|
Chris PeBenito |
3a9aef |
#
|
|
Chris PeBenito |
3a9aef |
|
|
Chris PeBenito |
96b000 |
type udev_t; # nscd_client_domain
|
|
Chris PeBenito |
dfb86a |
type udev_exec_t;
|
|
Chris PeBenito |
dfb86a |
type udev_helper_exec_t;
|
|
Chris PeBenito |
0fd9dc |
kernel_userland_entry(udev_t,udev_exec_t)
|
|
Chris PeBenito |
8bd678 |
domain_obj_id_change_exempt(udev_t)
|
|
Chris PeBenito |
c9428d |
domain_entry_file(udev_t,udev_helper_exec_t)
|
|
Chris PeBenito |
c9428d |
domain_wide_inherit_fd(udev_t)
|
|
Chris PeBenito |
c9428d |
init_daemon_domain(udev_t,udev_exec_t)
|
|
Chris PeBenito |
dfb86a |
|
|
Chris PeBenito |
dfb86a |
type udev_etc_t alias etc_udev_t;
|
|
Chris PeBenito |
8fd367 |
files_type(udev_etc_t)
|
|
Chris PeBenito |
dfb86a |
|
|
Chris PeBenito |
0bc32e |
# udev_runtime_t is the type of the udev table file
|
|
Chris PeBenito |
0bc32e |
# cjp: this is probably a copy of udev_tbl_t and can be removed
|
|
Chris PeBenito |
0bc32e |
type udev_runtime_t;
|
|
Chris PeBenito |
8fd367 |
files_type(udev_runtime_t)
|
|
Chris PeBenito |
0bc32e |
|
|
Chris PeBenito |
dfb86a |
type udev_tbl_t alias udev_tdb_t;
|
|
Chris PeBenito |
8fd367 |
files_type(udev_tbl_t)
|
|
Chris PeBenito |
3a9aef |
|
|
Chris PeBenito |
3a9aef |
type udev_var_run_t;
|
|
Chris PeBenito |
c9428d |
files_pid_file(udev_var_run_t)
|
|
Chris PeBenito |
3a9aef |
|
|
Chris PeBenito |
3a9aef |
########################################
|
|
Chris PeBenito |
3a9aef |
#
|
|
Chris PeBenito |
3a9aef |
# Local policy
|
|
Chris PeBenito |
3a9aef |
#
|
|
Chris PeBenito |
dfb86a |
|
|
Chris PeBenito |
dfb86a |
allow udev_t self:capability { chown dac_override dac_read_search fowner fsetid sys_admin mknod net_raw net_admin };
|
|
Chris PeBenito |
dfb86a |
allow udev_t self:process ~{ ptrace setcurrent setexec setfscreate setrlimit execmem dyntransition };
|
|
Chris PeBenito |
dfb86a |
allow udev_t self:process { execmem setfscreate };
|
|
Chris PeBenito |
dfb86a |
allow udev_t self:fd use;
|
|
Chris PeBenito |
7edd02 |
allow udev_t self:fifo_file rw_file_perms;
|
|
Chris PeBenito |
dfb86a |
allow udev_t self:unix_stream_socket { listen accept };
|
|
Chris PeBenito |
dfb86a |
allow udev_t self:unix_dgram_socket sendto;
|
|
Chris PeBenito |
dfb86a |
allow udev_t self:unix_stream_socket connectto;
|
|
Chris PeBenito |
7edd02 |
allow udev_t self:shm create_shm_perms;
|
|
Chris PeBenito |
7edd02 |
allow udev_t self:sem create_sem_perms;
|
|
Chris PeBenito |
7edd02 |
allow udev_t self:msgq create_msgq_perms;
|
|
Chris PeBenito |
dfb86a |
allow udev_t self:msg { send receive };
|
|
Chris PeBenito |
7edd02 |
allow udev_t self:rawip_socket create_socket_perms;
|
|
Chris PeBenito |
dfb86a |
|
|
Chris PeBenito |
7edd02 |
allow udev_t udev_exec_t:file write;
|
|
Chris PeBenito |
7edd02 |
can_exec(udev_t, udev_exec_t)
|
|
Chris PeBenito |
f5c42b |
|
|
Chris PeBenito |
7edd02 |
allow udev_t udev_helper_exec_t:dir r_dir_perms;
|
|
Chris PeBenito |
dfb86a |
|
|
Chris PeBenito |
dfb86a |
# read udev config
|
|
Chris PeBenito |
7edd02 |
allow udev_t udev_etc_t:file r_file_perms;
|
|
Chris PeBenito |
dfb86a |
|
|
Chris PeBenito |
dfb86a |
# create udev database in /dev/.udevdb
|
|
Chris PeBenito |
7edd02 |
allow udev_t udev_tbl_t:file create_file_perms;
|
|
Karl MacMillan |
f0c985 |
dev_create_dev_node(udev_t,udev_tbl_t,file)
|
|
Chris PeBenito |
dfb86a |
|
|
Chris PeBenito |
0fd9dc |
allow udev_t udev_var_run_t:dir rw_dir_perms;
|
|
Chris PeBenito |
0fd9dc |
allow udev_t udev_var_run_t:file create_file_perms;
|
|
Chris PeBenito |
3a9aef |
|
|
Chris PeBenito |
dfb86a |
kernel_read_system_state(udev_t)
|
|
Chris PeBenito |
0fd9dc |
kernel_getattr_core(udev_t)
|
|
Chris PeBenito |
0fd9dc |
kernel_use_fd(udev_t)
|
|
Chris PeBenito |
dfb86a |
kernel_read_device_sysctl(udev_t)
|
|
Chris PeBenito |
dfb86a |
kernel_read_hotplug_sysctl(udev_t)
|
|
Chris PeBenito |
dfb86a |
kernel_read_modprobe_sysctl(udev_t)
|
|
Chris PeBenito |
dfb86a |
kernel_read_kernel_sysctl(udev_t)
|
|
Chris PeBenito |
d35c62 |
|
|
Chris PeBenito |
8bd678 |
dev_read_sysfs(udev_t)
|
|
Chris PeBenito |
d35c62 |
dev_manage_dev_nodes(udev_t)
|
|
Chris PeBenito |
d35c62 |
|
|
Chris PeBenito |
d35c62 |
fs_getattr_all_fs(udev_t)
|
|
Chris PeBenito |
d35c62 |
|
|
Chris PeBenito |
5e0da6 |
selinux_get_fs_mount(udev_t)
|
|
Chris PeBenito |
5e0da6 |
selinux_validate_context(udev_t)
|
|
Chris PeBenito |
5e0da6 |
selinux_compute_access_vector(udev_t)
|
|
Chris PeBenito |
5e0da6 |
selinux_compute_create_context(udev_t)
|
|
Chris PeBenito |
5e0da6 |
selinux_compute_relabel_context(udev_t)
|
|
Chris PeBenito |
5e0da6 |
selinux_compute_user_contexts(udev_t)
|
|
Chris PeBenito |
3a9aef |
|
|
Chris PeBenito |
c9428d |
corecmd_exec_bin(udev_t)
|
|
Chris PeBenito |
c9428d |
corecmd_exec_sbin(udev_t)
|
|
Chris PeBenito |
c9428d |
corecmd_exec_shell(udev_t)
|
|
Chris PeBenito |
d490eb |
|
|
Chris PeBenito |
c9428d |
domain_exec_all_entry_files(udev_t)
|
|
Chris PeBenito |
c9428d |
domain_dontaudit_list_all_domains_proc(udev_t)
|
|
Chris PeBenito |
dfb86a |
|
|
Chris PeBenito |
c9428d |
files_read_etc_runtime_files(udev_t)
|
|
Chris PeBenito |
8fd367 |
files_read_etc_files(udev_t)
|
|
Chris PeBenito |
8fd367 |
files_exec_etc_files(udev_t)
|
|
Chris PeBenito |
c9428d |
files_dontaudit_search_isid_type_dir(udev_t)
|
|
Chris PeBenito |
ebdc3b |
files_getattr_generic_locks(udev_t)
|
|
Chris PeBenito |
ebdc3b |
files_search_mnt(udev_t)
|
|
Chris PeBenito |
dfb86a |
|
|
Chris PeBenito |
c9428d |
init_use_fd(udev_t)
|
|
Chris PeBenito |
c9428d |
init_read_script_pid(udev_t)
|
|
Chris PeBenito |
c9428d |
init_dontaudit_write_script_pid(udev_t)
|
|
Chris PeBenito |
dfb86a |
|
|
Chris PeBenito |
c9428d |
libs_use_ld_so(udev_t)
|
|
Chris PeBenito |
c9428d |
libs_use_shared_libs(udev_t)
|
|
Chris PeBenito |
cbeef6 |
|
|
Chris PeBenito |
7a2f20 |
logging_search_logs(udev_t)
|
|
Chris PeBenito |
c9428d |
logging_send_syslog_msg(udev_t)
|
|
Chris PeBenito |
dfb86a |
|
|
Chris PeBenito |
f5c42b |
miscfiles_read_localization(udev_t)
|
|
Chris PeBenito |
f5c42b |
|
|
Chris PeBenito |
c9428d |
modutils_domtrans_insmod(udev_t)
|
|
Chris PeBenito |
f5c42b |
|
|
Chris PeBenito |
5e0da6 |
seutil_read_config(udev_t)
|
|
Chris PeBenito |
5e0da6 |
seutil_read_default_contexts(udev_t)
|
|
Chris PeBenito |
5e0da6 |
seutil_read_file_contexts(udev_t)
|
|
Chris PeBenito |
5e0da6 |
seutil_domtrans_restorecon(udev_t)
|
|
Chris PeBenito |
f5c42b |
|
|
Chris PeBenito |
c9428d |
sysnet_domtrans_ifconfig(udev_t)
|
|
Chris PeBenito |
1e5c2a |
|
|
Chris PeBenito |
fd89e1 |
userdom_use_sysadm_tty(udev_t)
|
|
Chris PeBenito |
fd89e1 |
|
|
Chris PeBenito |
254bbc |
ifdef(`distro_redhat',`
|
|
Chris PeBenito |
ebdc3b |
fs_manage_tmpfs_symlinks(udev_t)
|
|
Chris PeBenito |
ebdc3b |
fs_manage_tmpfs_sockets(udev_t)
|
|
Chris PeBenito |
ebdc3b |
fs_manage_tmpfs_blk_dev(udev_t)
|
|
Chris PeBenito |
ebdc3b |
fs_manage_tmpfs_chr_dev(udev_t)
|
|
Chris PeBenito |
ebdc3b |
fs_relabel_tmpfs_blk_dev(udev_t)
|
|
Chris PeBenito |
ebdc3b |
fs_relabel_tmpfs_chr_dev(udev_t)
|
|
Chris PeBenito |
daa0e0 |
|
|
Chris PeBenito |
0c73cd |
# for arping used for static IP addresses on PCMCIA ethernet
|
|
Chris PeBenito |
c9428d |
netutils_domtrans(udev_t)
|
|
Chris PeBenito |
254bbc |
')
|
|
Chris PeBenito |
daa0e0 |
|
|
Chris PeBenito |
1e5c2a |
optional_policy(`authlogin.te',`
|
|
Chris PeBenito |
c9428d |
auth_read_pam_console_data(udev_t)
|
|
Chris PeBenito |
c9428d |
auth_domtrans_pam_console(udev_t)
|
|
Chris PeBenito |
1e5c2a |
')
|
|
Chris PeBenito |
1e5c2a |
|
|
Chris PeBenito |
0bc32e |
optional_policy(`consoletype.te',`
|
|
Chris PeBenito |
c9428d |
consoletype_exec(udev_t)
|
|
Chris PeBenito |
dfb86a |
')
|
|
Chris PeBenito |
dfb86a |
|
|
Chris PeBenito |
1e5c2a |
optional_policy(`hotplug.te',`
|
|
Chris PeBenito |
0c73cd |
hotplug_read_config(udev_t)
|
|
Chris PeBenito |
1e5c2a |
')
|
|
Chris PeBenito |
1e5c2a |
|
|
Chris PeBenito |
1e5c2a |
optional_policy(`sysnetwork.te',`
|
|
Chris PeBenito |
c9428d |
sysnet_domtrans_dhcpc(udev_t)
|
|
Chris PeBenito |
1e5c2a |
')
|
|
Chris PeBenito |
1e5c2a |
|
|
Chris PeBenito |
fd89e1 |
optional_policy(`xserver.te',`
|
|
Chris PeBenito |
fd89e1 |
xserver_read_xdm_pid(udev_t)
|
|
Chris PeBenito |
fd89e1 |
')
|
|
Chris PeBenito |
fd89e1 |
|
|
Chris PeBenito |
dfb86a |
ifdef(`TODO',`
|
|
Chris PeBenito |
dfb86a |
allow udev_t devpts_t:dir { getattr search };
|
|
Chris PeBenito |
dfb86a |
|
|
Chris PeBenito |
dfb86a |
# Dontaudits
|
|
Chris PeBenito |
dfb86a |
dontaudit udev_t staff_home_dir_t:dir search;
|
|
Chris PeBenito |
dfb86a |
dontaudit udev_t ttyfile:chr_file unlink;
|
|
Chris PeBenito |
dfb86a |
|
|
Chris PeBenito |
dfb86a |
allow udev_t kernel_t:unix_dgram_socket { sendto ioctl read write };
|
|
Chris PeBenito |
dfb86a |
|
|
Chris PeBenito |
dfb86a |
dbusd_client(system, udev)
|
|
Chris PeBenito |
dfb86a |
|
|
Chris PeBenito |
dfb86a |
') dnl endif TODO
|