1 ## <summary>Policy for user domains</summary>
3 #######################################
5 ## The template containing the most basic rules common to all users.
9 ## The template containing the most basic rules common to all users.
12 ## This template creates a user domain, types, and
13 ## rules for the user's tty and pty.
16 ## <param name="userdomain_prefix">
18 ## The prefix of the user domain (e.g., user
19 ## is the prefix for user_t).
24 template(`userdom_base_user_template',`
28 type user_devpts_t, user_tty_device_t;
29 class context contains;
32 attribute $1_file_type;
33 attribute $1_usertype;
35 type $1_t, userdomain, $1_usertype;
38 corecmd_shell_entry_type($1_t)
39 corecmd_bin_entry_type($1_t)
40 domain_user_exemption_target($1_t)
41 ubac_constrained($1_t)
45 term_user_pty($1_t, user_devpts_t)
47 term_user_tty($1_t, user_tty_device_t)
48 term_dontaudit_getattr_generic_ptys($1_t)
50 allow $1_usertype $1_usertype:process { ptrace signal_perms getsched setsched share getpgid setpgid getcap setcap getsession getattr };
51 allow $1_usertype $1_usertype:fd use;
52 allow $1_usertype $1_t:key { create view read write search link setattr };
54 allow $1_usertype $1_usertype:fifo_file rw_fifo_file_perms;
55 allow $1_usertype $1_usertype:unix_dgram_socket { create_socket_perms sendto };
56 allow $1_usertype $1_usertype:unix_stream_socket { create_stream_socket_perms connectto };
57 allow $1_usertype $1_usertype:shm create_shm_perms;
58 allow $1_usertype $1_usertype:sem create_sem_perms;
59 allow $1_usertype $1_usertype:msgq create_msgq_perms;
60 allow $1_usertype $1_usertype:msg { send receive };
61 allow $1_usertype $1_usertype:context contains;
62 dontaudit $1_usertype $1_usertype:socket create;
64 allow $1_usertype user_devpts_t:chr_file { setattr rw_chr_file_perms };
65 term_create_pty($1_usertype, user_devpts_t)
66 # avoid annoying messages on terminal hangup on role change
67 dontaudit $1_usertype user_devpts_t:chr_file ioctl;
69 allow $1_usertype user_tty_device_t:chr_file { setattr rw_chr_file_perms };
70 # avoid annoying messages on terminal hangup on role change
71 dontaudit $1_usertype user_tty_device_t:chr_file ioctl;
73 application_exec_all($1_usertype)
75 kernel_read_kernel_sysctls($1_usertype)
76 kernel_read_all_sysctls($1_usertype)
77 kernel_dontaudit_list_unlabeled($1_usertype)
78 kernel_dontaudit_getattr_unlabeled_files($1_usertype)
79 kernel_dontaudit_getattr_unlabeled_symlinks($1_usertype)
80 kernel_dontaudit_getattr_unlabeled_pipes($1_usertype)
81 kernel_dontaudit_getattr_unlabeled_sockets($1_usertype)
82 kernel_dontaudit_getattr_unlabeled_blk_files($1_usertype)
83 kernel_dontaudit_getattr_unlabeled_chr_files($1_usertype)
84 kernel_dontaudit_list_proc($1_usertype)
86 dev_dontaudit_getattr_all_blk_files($1_usertype)
87 dev_dontaudit_getattr_all_chr_files($1_usertype)
88 dev_getattr_mtrr_dev($1_t)
90 # When the user domain runs ps, there will be a number of access
91 # denials when ps tries to search /proc. Do not audit these denials.
92 domain_dontaudit_read_all_domains_state($1_usertype)
93 domain_dontaudit_getattr_all_domains($1_usertype)
94 domain_dontaudit_getsession_all_domains($1_usertype)
95 dev_dontaudit_all_access_check($1_usertype)
97 files_read_etc_files($1_usertype)
98 files_list_mnt($1_usertype)
99 files_list_var($1_usertype)
100 files_read_mnt_files($1_usertype)
101 files_dontaudit_access_check_mnt($1_usertype)
102 files_read_etc_runtime_files($1_usertype)
103 files_read_usr_files($1_usertype)
104 files_read_usr_src_files($1_usertype)
105 # Read directories and files with the readable_t type.
106 # This type is a general type for "world"-readable files.
107 files_list_world_readable($1_usertype)
108 files_read_world_readable_files($1_usertype)
109 files_read_world_readable_symlinks($1_usertype)
110 files_read_world_readable_pipes($1_usertype)
111 files_read_world_readable_sockets($1_usertype)
112 # old broswer_domain():
113 files_dontaudit_getattr_all_dirs($1_usertype)
114 files_dontaudit_list_non_security($1_usertype)
115 files_dontaudit_getattr_all_files($1_usertype)
116 files_dontaudit_getattr_non_security_symlinks($1_usertype)
117 files_dontaudit_getattr_non_security_pipes($1_usertype)
118 files_dontaudit_getattr_non_security_sockets($1_usertype)
119 files_dontaudit_setattr_etc_runtime_files($1_usertype)
121 files_exec_usr_files($1_t)
123 fs_list_cgroup_dirs($1_usertype)
124 fs_dontaudit_rw_cgroup_files($1_usertype)
126 storage_rw_fuse($1_usertype)
128 auth_use_nsswitch($1_t)
130 init_stream_connect($1_usertype)
131 # The library functions always try to open read-write first,
132 # then fall back to read-only if it fails.
133 init_dontaudit_rw_utmp($1_usertype)
135 libs_exec_ld_so($1_usertype)
137 logging_send_audit_msgs($1_t)
139 miscfiles_read_localization($1_t)
140 miscfiles_read_generic_certs($1_t)
142 miscfiles_read_all_certs($1_usertype)
143 miscfiles_read_localization($1_usertype)
144 miscfiles_read_man_pages($1_usertype)
145 miscfiles_read_public_files($1_usertype)
147 systemd_dbus_chat_logind($1_usertype)
149 tunable_policy(`allow_execmem',`
150 # Allow loading DSOs that require executable stack.
151 allow $1_t self:process execmem;
154 tunable_policy(`allow_execmem && allow_execstack',`
155 # Allow making the stack executable via mprotect.
156 allow $1_t self:process execstack;
160 abrt_stream_connect($1_usertype)
164 fs_list_cgroup_dirs($1_usertype)
168 ssh_rw_stream_sockets($1_usertype)
174 #######################################
176 ## Allow a home directory for which the
177 ## role has read-only access.
181 ## Allow a home directory for which the
182 ## role has read-only access.
185 ## This does not allow execute access.
188 ## <param name="role">
193 ## <param name="userdomain">
200 interface(`userdom_ro_home_role',`
202 type user_home_t, user_home_dir_t;
205 role $1 types { user_home_t user_home_dir_t };
207 ##############################
209 # Domain access to home dir
212 type_member $2 user_home_dir_t:dir user_home_dir_t;
214 # read-only home directory
215 allow $2 user_home_dir_t:dir list_dir_perms;
216 allow $2 user_home_t:dir list_dir_perms;
217 allow $2 user_home_t:file entrypoint;
218 read_files_pattern($2, { user_home_t user_home_dir_t }, user_home_t)
219 read_lnk_files_pattern($2, { user_home_t user_home_dir_t }, user_home_t)
220 read_fifo_files_pattern($2, { user_home_t user_home_dir_t }, user_home_t)
221 read_sock_files_pattern($2, { user_home_t user_home_dir_t }, user_home_t)
226 #######################################
228 ## Allow a home directory for which the
229 ## role has full access.
233 ## Allow a home directory for which the
234 ## role has full access.
237 ## This does not allow execute access.
240 ## <param name="role">
245 ## <param name="userdomain">
252 interface(`userdom_manage_home_role',`
254 type user_home_t, user_home_dir_t;
255 attribute user_home_type;
258 role $1 types { user_home_type user_home_dir_t };
260 ##############################
262 # Domain access to home dir
265 type_member $2 user_home_dir_t:dir user_home_dir_t;
267 # full control of the home directory
268 allow $2 user_home_t:dir mounton;
269 allow $2 user_home_t:file entrypoint;
271 allow $2 user_home_type:dir_file_class_set { relabelto relabelfrom };
272 allow $2 user_home_dir_t:lnk_file read_lnk_file_perms;
273 manage_dirs_pattern($2, { user_home_dir_t user_home_type }, user_home_type)
274 manage_files_pattern($2, { user_home_dir_t user_home_type }, user_home_type)
275 manage_lnk_files_pattern($2, { user_home_dir_t user_home_type }, user_home_type)
276 manage_sock_files_pattern($2, { user_home_dir_t user_home_type }, user_home_type)
277 manage_fifo_files_pattern($2, { user_home_dir_t user_home_type }, user_home_type)
278 relabel_dirs_pattern($2, { user_home_dir_t user_home_type }, user_home_type)
279 relabel_files_pattern($2, { user_home_dir_t user_home_type }, user_home_type)
280 relabel_lnk_files_pattern($2, { user_home_dir_t user_home_type }, user_home_type)
281 relabel_sock_files_pattern($2, { user_home_dir_t user_home_type }, user_home_type)
282 relabel_fifo_files_pattern($2, { user_home_dir_t user_home_type }, user_home_type)
283 filetrans_pattern($2, user_home_dir_t, user_home_t, { dir file lnk_file sock_file fifo_file })
286 # cjp: this should probably be removed:
287 allow $2 user_home_dir_t:dir { manage_dir_perms relabel_dir_perms };
289 tunable_policy(`use_nfs_home_dirs',`
292 fs_manage_nfs_dirs($2)
293 fs_manage_nfs_files($2)
294 fs_manage_nfs_symlinks($2)
295 fs_manage_nfs_named_sockets($2)
296 fs_manage_nfs_named_pipes($2)
299 tunable_policy(`use_samba_home_dirs',`
302 fs_manage_cifs_dirs($2)
303 fs_manage_cifs_files($2)
304 fs_manage_cifs_symlinks($2)
305 fs_manage_cifs_named_sockets($2)
306 fs_manage_cifs_named_pipes($2)
310 #######################################
312 ## Manage user temporary files
314 ## <param name="role">
316 ## Role allowed access.
319 ## <param name="domain">
321 ## Domain allowed access.
326 interface(`userdom_manage_tmp_role',`
328 attribute user_tmp_type;
332 role $1 types user_tmp_t;
334 files_poly_member_tmp($2, user_tmp_t)
336 manage_dirs_pattern($2, user_tmp_type, user_tmp_type)
337 manage_files_pattern($2, user_tmp_type, user_tmp_type)
338 manage_lnk_files_pattern($2, user_tmp_type, user_tmp_type)
339 manage_sock_files_pattern($2, user_tmp_type, user_tmp_type)
340 manage_fifo_files_pattern($2, user_tmp_type, user_tmp_type)
341 files_tmp_filetrans($2, user_tmp_t, { dir file lnk_file sock_file fifo_file })
342 relabel_dirs_pattern($2, user_tmp_type, user_tmp_type)
343 relabel_files_pattern($2, user_tmp_type, user_tmp_type)
344 relabel_lnk_files_pattern($2, user_tmp_type, user_tmp_type)
345 relabel_sock_files_pattern($2, user_tmp_type, user_tmp_type)
346 relabel_fifo_files_pattern($2, user_tmp_type, user_tmp_type)
349 #######################################
351 ## Dontaudit search of user bin dirs.
353 ## <param name="domain">
355 ## Domain to not audit.
359 interface(`userdom_dontaudit_search_user_bin_dirs',`
364 dontaudit $1 home_bin_t:dir search_dir_perms;
367 #######################################
369 ## Execute user bin files.
371 ## <param name="domain">
373 ## Domain allowed access.
377 interface(`userdom_exec_user_bin_files',`
379 attribute user_home_type;
380 type home_bin_t, user_home_dir_t;
383 exec_files_pattern($1, { user_home_dir_t user_home_type }, home_bin_t)
384 files_search_home($1)
387 #######################################
389 ## The execute access user temporary files.
391 ## <param name="domain">
393 ## Domain allowed access.
398 interface(`userdom_exec_user_tmp_files',`
403 exec_files_pattern($1, user_tmp_t, user_tmp_t)
404 dontaudit $1 user_tmp_t:sock_file execute;
408 #######################################
410 ## Role access for the user tmpfs type
411 ## that the user has full access.
415 ## Role access for the user tmpfs type
416 ## that the user has full access.
419 ## This does not allow execute access.
422 ## <param name="role">
424 ## Role allowed access.
427 ## <param name="domain">
429 ## Domain allowed access.
434 interface(`userdom_manage_tmpfs_role',`
436 attribute user_tmpfs_type;
440 role $1 types user_tmpfs_t;
442 manage_dirs_pattern($2, user_tmpfs_type, user_tmpfs_type)
443 manage_files_pattern($2, user_tmpfs_type, user_tmpfs_type)
444 manage_lnk_files_pattern($2, user_tmpfs_type, user_tmpfs_type)
445 manage_sock_files_pattern($2, user_tmpfs_type, user_tmpfs_type)
446 manage_fifo_files_pattern($2, user_tmpfs_type, user_tmpfs_type)
447 fs_tmpfs_filetrans($2, user_tmpfs_t, { dir file lnk_file sock_file fifo_file })
448 relabel_dirs_pattern($2, user_tmpfs_type, user_tmpfs_type)
449 relabel_files_pattern($2, user_tmpfs_type, user_tmpfs_type)
450 relabel_lnk_files_pattern($2, user_tmpfs_type, user_tmpfs_type)
451 relabel_sock_files_pattern($2, user_tmpfs_type, user_tmpfs_type)
452 relabel_fifo_files_pattern($2, user_tmpfs_type, user_tmpfs_type)
455 #######################################
457 ## The interface allowing the user basic
458 ## network permissions
460 ## <param name="userdomain">
467 interface(`userdom_basic_networking',`
469 allow $1 self:tcp_socket create_stream_socket_perms;
470 allow $1 self:udp_socket create_socket_perms;
472 corenet_all_recvfrom_unlabeled($1)
473 corenet_all_recvfrom_netlabel($1)
474 corenet_tcp_sendrecv_generic_if($1)
475 corenet_udp_sendrecv_generic_if($1)
476 corenet_tcp_sendrecv_generic_node($1)
477 corenet_udp_sendrecv_generic_node($1)
478 corenet_tcp_sendrecv_all_ports($1)
479 corenet_udp_sendrecv_all_ports($1)
480 corenet_tcp_connect_all_ports($1)
481 corenet_sendrecv_all_client_packets($1)
484 init_tcp_recvfrom_all_daemons($1)
485 init_udp_recvfrom_all_daemons($1)
489 ipsec_match_default_spd($1)
494 #######################################
496 ## The template for creating a user xwindows client. (Deprecated)
498 ## <param name="userdomain_prefix">
500 ## The prefix of the user domain (e.g., user
501 ## is the prefix for user_t).
506 template(`userdom_xwindows_client_template',`
507 refpolicywarn(`$0() has been deprecated, please use xserver_role() instead.')
509 type $1_t, user_tmpfs_t;
512 dev_rw_xserver_misc($1_t)
513 dev_rw_power_management($1_t)
517 # open office is looking for the following
518 dev_getattr_agp_dev($1_t)
519 dev_dontaudit_rw_dri($1_t)
520 # GNOME checks for usb and other devices:
522 dev_rw_generic_usb_dev($1_t)
524 xserver_user_x_domain_template($1, $1_t, user_tmpfs_t)
525 xserver_xsession_entry_type($1_t)
526 xserver_dontaudit_write_log($1_t)
527 xserver_stream_connect_xdm($1_t)
528 # certain apps want to read xdm.pid file
529 xserver_read_xdm_pid($1_t)
530 # gnome-session creates socket under /tmp/.ICE-unix/
531 xserver_create_xdm_tmp_sockets($1_t)
532 # Needed for escd, remove if we get escd policy
533 xserver_manage_xdm_tmp_files($1_t)
536 #######################################
538 ## The template for allowing the user to change passwords.
540 ## <param name="userdomain_prefix">
542 ## The prefix of the user domain (e.g., user
543 ## is the prefix for user_t).
548 template(`userdom_change_password_template',`
555 usermanage_run_chfn($1_t,$1_r)
556 usermanage_run_passwd($1_t,$1_r)
560 #######################################
562 ## The template containing rules common to unprivileged
563 ## users and administrative users.
567 ## This template creates a user domain, types, and
568 ## rules for the user's tty, pty, tmp, and tmpfs files.
571 ## <param name="userdomain_prefix">
573 ## The prefix of the user domain (e.g., user
574 ## is the prefix for user_t).
578 template(`userdom_common_user_template',`
580 attribute unpriv_userdomain;
583 userdom_basic_networking($1_usertype)
585 ##############################
587 # User domain Local policy
590 # evolution and gnome-session try to create a netlink socket
591 dontaudit $1_t self:netlink_socket { create ioctl read getattr write setattr append bind connect getopt setopt shutdown };
592 dontaudit $1_t self:netlink_route_socket { create ioctl read getattr write setattr append bind connect getopt setopt shutdown nlmsg_read nlmsg_write };
593 allow $1_t self:netlink_kobject_uevent_socket create_socket_perms;
594 allow $1_t self:socket create_socket_perms;
596 allow $1_usertype unpriv_userdomain:fd use;
598 kernel_read_system_state($1_usertype)
599 kernel_read_network_state($1_usertype)
600 kernel_read_software_raid_state($1_usertype)
601 kernel_read_net_sysctls($1_usertype)
602 # Very permissive allowing every domain to see every type:
603 kernel_get_sysvipc_info($1_usertype)
604 # Find CDROM devices:
605 kernel_read_device_sysctls($1_usertype)
606 kernel_request_load_module($1_usertype)
608 corenet_udp_bind_generic_node($1_usertype)
609 corenet_udp_bind_generic_port($1_usertype)
611 dev_read_rand($1_usertype)
612 dev_write_sound($1_usertype)
613 dev_read_sound($1_usertype)
614 dev_read_sound_mixer($1_usertype)
615 dev_write_sound_mixer($1_usertype)
617 files_exec_etc_files($1_usertype)
618 files_search_locks($1_usertype)
619 # Check to see if cdrom is mounted
620 files_search_mnt($1_usertype)
621 # cjp: perhaps should cut back on file reads:
622 files_read_var_files($1_usertype)
623 files_read_var_symlinks($1_usertype)
624 files_read_generic_spool($1_usertype)
625 files_read_var_lib_files($1_usertype)
627 files_getattr_lost_found_dirs($1_usertype)
628 files_read_config_files($1_usertype)
629 fs_read_noxattr_fs_files($1_usertype)
630 fs_read_noxattr_fs_symlinks($1_usertype)
631 fs_rw_cgroup_files($1_usertype)
633 application_getattr_socket($1_usertype)
635 logging_send_syslog_msg($1_usertype)
636 logging_send_audit_msgs($1_usertype)
637 selinux_get_enforce_mode($1_usertype)
639 # cjp: some of this probably can be removed
640 selinux_get_fs_mount($1_usertype)
641 selinux_validate_context($1_usertype)
642 selinux_compute_access_vector($1_usertype)
643 selinux_compute_create_context($1_usertype)
644 selinux_compute_relabel_context($1_usertype)
645 selinux_compute_user_contexts($1_usertype)
648 storage_getattr_fixed_disk_dev($1_usertype)
650 auth_read_login_records($1_usertype)
651 auth_run_pam($1_t,$1_r)
652 auth_run_utempter($1_t,$1_r)
654 init_read_utmp($1_usertype)
656 seutil_read_file_contexts($1_usertype)
657 seutil_read_default_contexts($1_usertype)
658 seutil_run_newrole($1_t,$1_r)
659 seutil_exec_checkpolicy($1_t)
660 seutil_exec_setfiles($1_usertype)
661 # for when the network connection is killed
662 # this is needed when a login role can change
664 seutil_dontaudit_signal_newrole($1_t)
666 tunable_policy(`user_direct_mouse',`
667 dev_read_mouse($1_usertype)
670 tunable_policy(`user_ttyfile_stat',`
671 term_getattr_all_ttys($1_t)
675 alsa_read_rw_config($1_usertype)
676 alsa_manage_home_files($1_t)
677 alsa_relabel_home_files($1_t)
678 alsa_filetrans_named_content($1_t)
682 # Allow graphical boot to check battery lifespan
683 apm_stream_connect($1_usertype)
687 canna_stream_connect($1_usertype)
691 chrome_role($1_r, $1_usertype)
695 colord_read_lib_files($1_usertype)
699 dbus_system_bus_client($1_usertype)
701 allow $1_usertype $1_usertype:dbus send_msg;
704 avahi_dbus_chat($1_usertype)
708 policykit_dbus_chat($1_usertype)
712 bluetooth_dbus_chat($1_usertype)
716 consolekit_dbus_chat($1_usertype)
717 consolekit_read_log($1_usertype)
721 devicekit_dbus_chat($1_usertype)
722 devicekit_dbus_chat_power($1_usertype)
723 devicekit_dbus_chat_disk($1_usertype)
727 evolution_dbus_chat($1_usertype)
728 evolution_alarm_dbus_chat($1_usertype)
732 gnome_dbus_chat_gconfdefault($1_usertype)
736 hal_dbus_chat($1_usertype)
740 kde_dbus_chat_backlighthelper($1_usertype)
744 modemmanager_dbus_chat($1_usertype)
748 networkmanager_dbus_chat($1_usertype)
749 networkmanager_read_lib_files($1_usertype)
753 vpn_dbus_chat($1_usertype)
758 git_session_role($1_r, $1_usertype)
762 inetd_use_fds($1_usertype)
763 inetd_rw_tcp_sockets($1_usertype)
767 inn_read_config($1_usertype)
768 inn_read_news_lib($1_usertype)
769 inn_read_news_spool($1_usertype)
773 lircd_stream_connect($1_usertype)
777 locate_read_lib_files($1_usertype)
780 # for running depmod as part of the kernel packaging process
782 modutils_read_module_config($1_usertype)
786 mta_rw_spool($1_usertype)
787 mta_manage_queue($1_usertype)
788 mta_filetrans_home_content($1_usertype)
792 nsplugin_role($1_r, $1_usertype)
796 tunable_policy(`allow_user_mysql_connect',`
797 mysql_stream_connect($1_t)
802 oident_manage_user_content($1_t)
803 oident_relabel_user_content($1_t)
807 # to allow monitoring of pcmcia status
808 pcmcia_read_pid($1_usertype)
812 pcscd_read_pub_files($1_usertype)
813 pcscd_stream_connect($1_usertype)
817 tunable_policy(`allow_user_postgresql_connect',`
818 postgresql_stream_connect($1_usertype)
819 postgresql_tcp_connect($1_usertype)
824 resmgr_stream_connect($1_usertype)
828 rpc_dontaudit_getattr_exports($1_usertype)
829 rpc_manage_nfs_rw_content($1_usertype)
833 rpcbind_stream_connect($1_usertype)
837 samba_stream_connect_winbind($1_usertype)
841 sandbox_transition($1_usertype, $1_r)
845 seunshare_role_template($1, $1_r, $1_t)
849 slrnpull_search_spool($1_usertype)
854 #######################################
856 ## The template for creating a login user.
860 ## This template creates a user domain, types, and
861 ## rules for the user's tty, pty, home directories,
862 ## tmp, and tmpfs files.
865 ## <param name="userdomain_prefix">
867 ## The prefix of the user domain (e.g., user
868 ## is the prefix for user_t).
872 template(`userdom_login_user_template', `
874 class context contains;
877 userdom_base_user_template($1)
879 userdom_manage_home_role($1_r, $1_usertype)
881 userdom_manage_tmp_role($1_r, $1_usertype)
882 userdom_manage_tmpfs_role($1_r, $1_usertype)
884 ifelse(`$1',`unconfined',`',`
885 gen_tunable(allow_$1_exec_content, true)
887 tunable_policy(`allow_$1_exec_content',`
888 userdom_exec_user_tmp_files($1_usertype)
889 userdom_exec_user_home_content_files($1_usertype)
891 tunable_policy(`allow_$1_exec_content && use_nfs_home_dirs',`
892 fs_exec_nfs_files($1_usertype)
895 tunable_policy(`allow_$1_exec_content && use_samba_home_dirs',`
896 fs_exec_cifs_files($1_usertype)
900 userdom_change_password_template($1)
902 ##############################
904 # User domain Local policy
907 allow $1_t self:capability { setgid chown fowner };
908 dontaudit $1_t self:capability { sys_nice fsetid };
910 allow $1_t self:process ~{ setcurrent setexec setrlimit execmem execstack execheap };
911 dontaudit $1_t self:process setrlimit;
912 dontaudit $1_t self:netlink_route_socket { create ioctl read getattr write setattr append bind connect getopt setopt shutdown nlmsg_read nlmsg_write };
914 allow $1_t self:context contains;
916 kernel_dontaudit_read_system_state($1_usertype)
917 kernel_dontaudit_list_all_proc($1_usertype)
919 dev_read_sysfs($1_usertype)
920 dev_read_urand($1_usertype)
922 domain_use_interactive_fds($1_usertype)
923 # Command completion can fire hundreds of denials
924 domain_dontaudit_exec_all_entry_files($1_usertype)
926 files_dontaudit_list_default($1_usertype)
927 files_dontaudit_read_default_files($1_usertype)
929 files_getattr_lost_found_dirs($1_usertype)
931 fs_get_all_fs_quotas($1_usertype)
932 fs_getattr_all_fs($1_usertype)
933 fs_search_all($1_usertype)
934 fs_list_inotifyfs($1_usertype)
935 fs_rw_anon_inodefs_files($1_usertype)
937 auth_dontaudit_write_login_records($1_t)
940 application_exec_all($1_t)
941 # The library functions always try to open read-write first,
942 # then fall back to read-only if it fails.
943 init_dontaudit_rw_utmp($1_t)
945 # Stop warnings about access to /dev/console
946 init_dontaudit_use_fds($1_usertype)
947 init_dontaudit_use_script_fds($1_usertype)
949 libs_exec_lib_files($1_usertype)
951 logging_dontaudit_getattr_all_logs($1_usertype)
953 # for running TeX programs
954 miscfiles_read_tetex_data($1_usertype)
955 miscfiles_exec_tetex_data($1_usertype)
957 seutil_read_config($1_usertype)
960 cups_read_config($1_usertype)
961 cups_stream_connect($1_usertype)
962 cups_stream_connect_ptal($1_usertype)
966 kerberos_use($1_usertype)
967 kerberos_filetrans_home_content($1_usertype)
971 mta_dontaudit_read_spool_symlinks($1_usertype)
975 quota_dontaudit_getattr_db($1_usertype)
979 rpm_read_db($1_usertype)
980 rpm_dontaudit_manage_db($1_usertype)
981 rpm_read_cache($1_usertype)
985 oddjob_run_mkhomedir($1_t, $1_r)
989 #######################################
991 ## The template for creating a unprivileged login user.
995 ## This template creates a user domain, types, and
996 ## rules for the user's tty, pty, home directories,
997 ## tmp, and tmpfs files.
1000 ## <param name="userdomain_prefix">
1002 ## The prefix of the user domain (e.g., user
1003 ## is the prefix for user_t).
1007 template(`userdom_restricted_user_template',`
1009 attribute unpriv_userdomain;
1012 userdom_login_user_template($1)
1014 typeattribute $1_t unpriv_userdomain;
1015 domain_interactive_fd($1_t)
1017 allow $1_usertype self:netlink_kobject_uevent_socket create_socket_perms;
1018 dontaudit $1_usertype self:netlink_audit_socket create_socket_perms;
1020 ##############################
1026 loadkeys_run($1_t, $1_r)
1030 #######################################
1032 ## The template for creating a unprivileged xwindows login user.
1036 ## The template for creating a unprivileged xwindows login user.
1039 ## This template creates a user domain, types, and
1040 ## rules for the user's tty, pty, home directories,
1041 ## tmp, and tmpfs files.
1044 ## <param name="userdomain_prefix">
1046 ## The prefix of the user domain (e.g., user
1047 ## is the prefix for user_t).
1051 template(`userdom_restricted_xwindows_user_template',`
1053 userdom_restricted_user_template($1)
1055 ##############################
1060 auth_role($1_r, $1_t)
1061 auth_search_pam_console_data($1_usertype)
1062 auth_dontaudit_read_login_records($1_usertype)
1064 dev_read_sound($1_usertype)
1065 dev_write_sound($1_usertype)
1066 # gnome keyring wants to read this.
1067 dev_dontaudit_read_rand($1_usertype)
1068 # temporarily allow since openoffice requires this
1069 dev_read_rand($1_usertype)
1071 dev_read_video_dev($1_usertype)
1072 dev_write_video_dev($1_usertype)
1073 dev_rw_wireless($1_usertype)
1075 libs_dontaudit_setattr_lib_files($1_usertype)
1077 tunable_policy(`user_rw_noexattrfile',`
1079 dev_rw_generic_usb_dev($1_usertype)
1081 fs_manage_noxattr_fs_files($1_usertype)
1082 fs_manage_noxattr_fs_dirs($1_usertype)
1083 fs_manage_dos_dirs($1_usertype)
1084 fs_manage_dos_files($1_usertype)
1085 storage_raw_read_removable_device($1_usertype)
1086 storage_raw_write_removable_device($1_usertype)
1089 logging_send_syslog_msg($1_usertype)
1090 logging_dontaudit_send_audit_msgs($1_t)
1092 # Need to to this just so screensaver will work. Should be moved to screensaver domain
1093 logging_send_audit_msgs($1_t)
1094 selinux_get_enforce_mode($1_t)
1095 seutil_exec_restorecond($1_t)
1096 seutil_read_file_contexts($1_t)
1097 seutil_read_default_contexts($1_t)
1099 xserver_restricted_role($1_r, $1_t)
1102 alsa_read_rw_config($1_usertype)
1105 # cjp: needed by KDE apps
1108 gnome_read_usr_config($1_usertype)
1109 gnome_role_gkeyringd($1, $1_r, $1_usertype)
1110 # cjp: telepathy F15 bugs
1111 telepathy_role($1_r, $1_t, $1)
1115 dbus_role_template($1, $1_r, $1_usertype)
1116 dbus_system_bus_client($1_usertype)
1117 allow $1_usertype $1_usertype:dbus send_msg;
1120 abrt_dbus_chat($1_usertype)
1121 abrt_run_helper($1_usertype, $1_r)
1125 consolekit_dontaudit_read_log($1_usertype)
1126 consolekit_dbus_chat($1_usertype)
1130 cups_dbus_chat($1_usertype)
1131 cups_dbus_chat_config($1_usertype)
1135 devicekit_dbus_chat($1_usertype)
1136 devicekit_dbus_chat_disk($1_usertype)
1137 devicekit_dbus_chat_power($1_usertype)
1141 fprintd_dbus_chat($1_t)
1146 openoffice_role_template($1, $1_r, $1_usertype)
1150 policykit_role($1_r, $1_usertype)
1154 pulseaudio_role($1_r, $1_usertype)
1155 pulseaudio_filetrans_admin_home_content($1_usertype)
1156 pulseaudio_filetrans_home_content($1_usertype)
1160 rtkit_scheduled($1_usertype)
1164 setroubleshoot_dontaudit_stream_connect($1_t)
1168 udev_read_db($1_usertype)
1172 wm_role_template($1, $1_r, $1_t)
1176 #######################################
1178 ## The template for creating a unprivileged user roughly
1179 ## equivalent to a regular linux user.
1183 ## The template for creating a unprivileged user roughly
1184 ## equivalent to a regular linux user.
1187 ## This template creates a user domain, types, and
1188 ## rules for the user's tty, pty, home directories,
1189 ## tmp, and tmpfs files.
1192 ## <param name="userdomain_prefix">
1194 ## The prefix of the user domain (e.g., user
1195 ## is the prefix for user_t).
1199 template(`userdom_unpriv_user_template', `
1201 ##############################
1206 # Inherit rules for ordinary users.
1207 userdom_restricted_xwindows_user_template($1)
1208 userdom_common_user_template($1)
1210 ##############################
1215 # port access is audited even if dac would not have allowed it, so dontaudit it here
1216 # corenet_dontaudit_tcp_bind_all_reserved_ports($1_t)
1217 # Need the following rule to allow users to run vpnc
1218 corenet_tcp_bind_xserver_port($1_t)
1219 corenet_tcp_bind_generic_node($1_usertype)
1221 storage_rw_fuse($1_t)
1223 files_exec_usr_files($1_t)
1225 files_read_kernel_symbol_table($1_t)
1227 ifndef(`enable_mls',`
1228 fs_exec_noxattr($1_t)
1230 tunable_policy(`user_rw_noexattrfile',`
1231 fs_manage_noxattr_fs_files($1_t)
1232 fs_manage_noxattr_fs_dirs($1_t)
1234 storage_raw_read_removable_device($1_t)
1235 storage_raw_write_removable_device($1_t)
1237 storage_raw_read_removable_device($1_t)
1241 miscfiles_read_hwdata($1_usertype)
1243 # Allow users to run TCP servers (bind to ports and accept connection from
1244 # the same domain and outside users) disabling this forces FTP passive mode
1245 # and may change other protocols
1247 tunable_policy(`user_share_music',`
1248 corenet_tcp_bind_daap_port($1_usertype)
1251 tunable_policy(`user_tcp_server',`
1252 corenet_tcp_bind_all_unreserved_ports($1_usertype)
1255 tunable_policy(`user_setrlimit',`
1256 allow $1_usertype self:process setrlimit;
1260 cdrecord_role($1_r, $1_t)
1264 cron_role($1_r, $1_t)
1268 games_rw_data($1_usertype)
1272 gpg_role($1_r, $1_usertype)
1276 gnomeclock_dbus_chat($1_t)
1280 gpm_stream_connect($1_usertype)
1284 execmem_role_template($1, $1_r, $1_t)
1288 java_role_template($1, $1_r, $1_t)
1292 mono_role_template($1, $1_r, $1_t)
1296 mount_run_fusermount($1_t, $1_r)
1297 mount_read_pid_files($1_t)
1301 wine_role_template($1, $1_r, $1_t)
1305 postfix_run_postdrop($1_t, $1_r)
1308 # Run pppd in pppd_t by default for user
1310 ppp_run_cond($1_t, $1_r)
1314 #######################################
1316 ## The template for creating an administrative user.
1320 ## This template creates a user domain, types, and
1321 ## rules for the user's tty, pty, home directories,
1322 ## tmp, and tmpfs files.
1325 ## The privileges given to administrative users are:
1327 ## <li>Raw disk access</li>
1328 ## <li>Set all sysctls</li>
1329 ## <li>All kernel ring buffer controls</li>
1330 ## <li>Create, read, write, and delete all files but shadow</li>
1331 ## <li>Manage source and binary format SELinux policy</li>
1332 ## <li>Run insmod</li>
1336 ## <param name="userdomain_prefix">
1338 ## The prefix of the user domain (e.g., sysadm
1339 ## is the prefix for sysadm_t).
1343 template(`userdom_admin_user_template',`
1345 attribute admindomain;
1346 class passwd { passwd chfn chsh rootok crontab };
1349 ##############################
1354 # Inherit rules for ordinary users.
1355 userdom_login_user_template($1)
1356 userdom_common_user_template($1)
1358 domain_obj_id_change_exemption($1_t)
1359 role system_r types $1_t;
1361 typeattribute $1_t admindomain;
1363 ifdef(`direct_sysadm_daemon',`
1364 domain_system_change_exemption($1_t)
1367 ##############################
1372 allow $1_t self:capability ~{ sys_module audit_control audit_write };
1373 allow $1_t self:capability2 syslog;
1374 allow $1_t self:process { setexec setfscreate };
1375 allow $1_t self:netlink_audit_socket nlmsg_readpriv;
1376 allow $1_t self:tun_socket create;
1377 # Set password information for other users.
1378 allow $1_t self:passwd { passwd chfn chsh };
1379 # Skip authentication when pam_rootok is specified.
1380 allow $1_t self:passwd rootok;
1382 # Manipulate other users crontab.
1383 allow $1_t self:passwd crontab;
1385 kernel_read_software_raid_state($1_t)
1386 kernel_getattr_core_if($1_t)
1387 kernel_getattr_message_if($1_t)
1388 kernel_change_ring_buffer_level($1_t)
1389 kernel_clear_ring_buffer($1_t)
1390 kernel_read_ring_buffer($1_t)
1391 kernel_get_sysvipc_info($1_t)
1392 kernel_rw_all_sysctls($1_t)
1393 # signal unlabeled processes:
1394 kernel_kill_unlabeled($1_t)
1395 kernel_signal_unlabeled($1_t)
1396 kernel_sigstop_unlabeled($1_t)
1397 kernel_signull_unlabeled($1_t)
1398 kernel_sigchld_unlabeled($1_t)
1401 corenet_tcp_bind_generic_port($1_t)
1402 # allow setting up tunnels
1403 corenet_rw_tun_tap_dev($1_t)
1405 dev_getattr_generic_blk_files($1_t)
1406 dev_getattr_generic_chr_files($1_t)
1408 dev_getattr_mtrr_dev($1_t)
1409 # Allow MAKEDEV to work
1410 dev_create_all_blk_files($1_t)
1411 dev_create_all_chr_files($1_t)
1412 dev_delete_all_blk_files($1_t)
1413 dev_delete_all_chr_files($1_t)
1414 dev_rename_all_blk_files($1_t)
1415 dev_rename_all_chr_files($1_t)
1416 dev_create_generic_symlinks($1_t)
1417 dev_rw_generic_usb_dev($1_t)
1420 domain_setpriority_all_domains($1_t)
1421 domain_read_all_domains_state($1_t)
1422 domain_getattr_all_domains($1_t)
1423 domain_getcap_all_domains($1_t)
1424 domain_dontaudit_ptrace_all_domains($1_t)
1425 # signal all domains:
1426 domain_kill_all_domains($1_t)
1427 domain_signal_all_domains($1_t)
1428 domain_signull_all_domains($1_t)
1429 domain_sigstop_all_domains($1_t)
1430 domain_sigstop_all_domains($1_t)
1431 domain_sigchld_all_domains($1_t)
1433 domain_getattr_all_sockets($1_t)
1434 domain_dontaudit_getattr_all_sockets($1_t)
1436 files_exec_usr_src_files($1_t)
1438 fs_getattr_all_fs($1_t)
1439 fs_getattr_all_files($1_t)
1441 fs_set_all_quotas($1_t)
1442 fs_exec_noxattr($1_t)
1444 storage_raw_read_removable_device($1_t)
1445 storage_raw_write_removable_device($1_t)
1446 storage_dontaudit_read_fixed_disk($1_t)
1448 term_use_all_inherited_terms($1_t)
1449 term_use_unallocated_ttys($1_t)
1451 auth_getattr_shadow($1_t)
1452 # Manage almost all files
1453 files_manage_non_security_dirs($1_t)
1454 files_manage_non_security_files($1_t)
1455 # Relabel almost all files
1456 files_relabel_non_security_files($1_t)
1460 logging_send_syslog_msg($1_t)
1463 modutils_domtrans_insmod($1_t)
1464 modutils_domtrans_depmod($1_t)
1467 # The following rule is temporary until such time that a complete
1468 # policy management infrastructure is in place so that an administrator
1469 # cannot directly manipulate policy files with arbitrary programs.
1470 seutil_manage_src_policy($1_t)
1471 # Violates the goal of limiting write access to checkpolicy.
1472 # But presently necessary for installing the file_contexts file.
1473 seutil_manage_bin_policy($1_t)
1475 systemd_config_all_services($1_t)
1477 userdom_manage_user_home_content_dirs($1_t)
1478 userdom_manage_user_home_content_files($1_t)
1479 userdom_manage_user_home_content_symlinks($1_t)
1480 userdom_manage_user_home_content_pipes($1_t)
1481 userdom_manage_user_home_content_sockets($1_t)
1482 userdom_user_home_dir_filetrans_user_home_content($1_t, { dir file lnk_file fifo_file sock_file })
1484 tunable_policy(`user_rw_noexattrfile',`
1485 fs_manage_noxattr_fs_files($1_t)
1486 fs_manage_noxattr_fs_dirs($1_t)
1488 fs_read_noxattr_fs_files($1_t)
1492 postgresql_unconfined($1_t)
1496 userhelper_exec($1_t)
1500 ########################################
1502 ## Allow user to run as a secadm
1506 ## Create objects in a user home directory
1507 ## with an automatic type transition to
1508 ## a specified private type.
1511 ## This is a templated interface, and should only
1512 ## be called from a per-userdomain template.
1515 ## <param name="domain">
1517 ## Domain allowed access.
1520 ## <param name="role">
1522 ## The role of the object to create.
1526 template(`userdom_security_admin_template',`
1527 allow $1 self:capability { dac_read_search dac_override };
1529 corecmd_exec_shell($1)
1531 domain_obj_id_change_exemption($1)
1533 dev_relabel_all_dev_nodes($1)
1535 files_create_boot_flag($1)
1536 files_create_default_dir($1)
1537 files_root_filetrans_default($1, dir)
1539 # Necessary for managing /boot/efi
1540 fs_manage_dos_files($1)
1542 mls_process_read_up($1)
1543 mls_file_read_all_levels($1)
1544 mls_file_upgrade($1)
1545 mls_file_downgrade($1)
1547 selinux_set_enforce_mode($1)
1548 selinux_set_all_booleans($1)
1549 selinux_set_parameters($1)
1550 selinux_read_policy($1)
1552 files_relabel_all_files($1)
1553 auth_relabel_shadow($1)
1557 logging_send_syslog_msg($1)
1558 logging_read_audit_log($1)
1559 logging_read_generic_logs($1)
1560 logging_read_audit_config($1)
1562 seutil_manage_bin_policy($1)
1563 seutil_manage_default_contexts($1)
1564 seutil_manage_file_contexts($1)
1565 seutil_manage_module_store($1)
1566 seutil_manage_config($1)
1567 seutil_run_checkpolicy($1,$2)
1568 seutil_run_loadpolicy($1,$2)
1569 seutil_run_semanage($1,$2)
1570 seutil_run_setsebool($1,$2)
1571 seutil_run_setfiles($1, $2)
1573 seutil_manage_bin_policy($1)
1574 seutil_manage_default_contexts($1)
1575 seutil_manage_file_contexts($1)
1576 seutil_manage_module_store($1)
1577 seutil_manage_config($1)
1584 consoletype_exec($1)
1592 ipsec_run_setkey($1,$2)
1596 netlabel_run_mgmt($1,$2)
1604 ########################################
1606 ## Make the specified type usable in a
1607 ## user home directory.
1609 ## <param name="type">
1611 ## Type to be used as a file in the
1612 ## user home directory.
1616 interface(`userdom_user_home_content',`
1619 attribute user_home_type;
1622 allow $1 user_home_t:filesystem associate;
1624 ubac_constrained($1)
1626 files_poly_member($1)
1627 typeattribute $1 user_home_type;
1630 ########################################
1632 ## Make the specified type usable in a
1633 ## generic temporary directory.
1635 ## <param name="type">
1637 ## Type to be used as a file in the
1638 ## generic temporary directory.
1642 interface(`userdom_user_tmp_content',`
1644 attribute user_tmp_type;
1647 typeattribute $1 user_tmp_type;
1650 ubac_constrained($1)
1653 ########################################
1655 ## Make the specified type usable in a
1656 ## generic tmpfs_t directory.
1658 ## <param name="type">
1660 ## Type to be used as a file in the
1661 ## generic temporary directory.
1665 interface(`userdom_user_tmpfs_content',`
1667 attribute user_tmpfs_type;
1670 typeattribute $1 user_tmpfs_type;
1672 files_tmpfs_file($1)
1673 ubac_constrained($1)
1676 ########################################
1678 ## Allow domain to attach to TUN devices created by administrative users.
1680 ## <param name="domain">
1682 ## Domain allowed access.
1686 interface(`userdom_attach_admin_tun_iface',`
1688 attribute admindomain;
1691 allow $1 admindomain:tun_socket relabelfrom;
1692 allow $1 self:tun_socket relabelto;
1695 ########################################
1697 ## Set the attributes of a user pty.
1699 ## <param name="domain">
1701 ## Domain allowed access.
1705 interface(`userdom_setattr_user_ptys',`
1710 allow $1 user_devpts_t:chr_file setattr_chr_file_perms;
1713 ########################################
1715 ## Create a user pty.
1717 ## <param name="domain">
1719 ## Domain allowed access.
1723 interface(`userdom_create_user_pty',`
1728 term_create_pty($1, user_devpts_t)
1731 ########################################
1733 ## Get the attributes of user home directories.
1735 ## <param name="domain">
1737 ## Domain allowed access.
1741 interface(`userdom_getattr_user_home_dirs',`
1743 type user_home_dir_t;
1746 allow $1 user_home_dir_t:dir getattr_dir_perms;
1747 files_search_home($1)
1750 ########################################
1752 ## Do not audit attempts to get the attributes of user home directories.
1754 ## <param name="domain">
1756 ## Domain to not audit.
1760 interface(`userdom_dontaudit_getattr_user_home_dirs',`
1762 type user_home_dir_t;
1765 dontaudit $1 user_home_dir_t:dir getattr_dir_perms;
1768 ########################################
1770 ## Search user home directories.
1772 ## <param name="domain">
1774 ## Domain allowed access.
1778 interface(`userdom_search_user_home_dirs',`
1780 type user_home_dir_t;
1783 allow $1 user_home_dir_t:dir search_dir_perms;
1784 allow $1 user_home_dir_t:lnk_file read_lnk_file_perms;
1785 files_search_home($1)
1788 ########################################
1790 ## Do not audit attempts to search user home directories.
1794 ## Do not audit attempts to search user home directories.
1795 ## This will supress SELinux denial messages when the specified
1796 ## domain is denied the permission to search these directories.
1799 ## <param name="domain">
1801 ## Domain to not audit.
1804 ## <infoflow type="none"/>
1806 interface(`userdom_dontaudit_search_user_home_dirs',`
1808 type user_home_dir_t;
1811 dontaudit $1 user_home_dir_t:dir search_dir_perms;
1814 ########################################
1816 ## List user home directories.
1818 ## <param name="domain">
1820 ## Domain allowed access.
1824 interface(`userdom_list_user_home_dirs',`
1826 type user_home_dir_t;
1829 allow $1 user_home_dir_t:dir list_dir_perms;
1830 files_search_home($1)
1832 tunable_policy(`use_nfs_home_dirs',`
1836 tunable_policy(`use_samba_home_dirs',`
1841 ########################################
1843 ## Do not audit attempts to list user home subdirectories.
1845 ## <param name="domain">
1847 ## Domain to not audit.
1851 interface(`userdom_dontaudit_list_user_home_dirs',`
1853 type user_home_dir_t;
1857 dontaudit $1 user_home_dir_t:dir list_dir_perms;
1858 dontaudit $1 user_home_t:dir list_dir_perms;
1861 ########################################
1863 ## Create user home directories.
1865 ## <param name="domain">
1867 ## Domain allowed access.
1871 interface(`userdom_create_user_home_dirs',`
1873 type user_home_dir_t;
1876 allow $1 user_home_dir_t:dir create_dir_perms;
1879 ########################################
1881 ## Create user home directories.
1883 ## <param name="domain">
1885 ## Domain allowed access.
1889 interface(`userdom_manage_user_home_dirs',`
1891 type user_home_dir_t;
1894 allow $1 user_home_dir_t:dir manage_dir_perms;
1897 ########################################
1899 ## Relabel to user home directories.
1901 ## <param name="domain">
1903 ## Domain allowed access.
1907 interface(`userdom_relabelto_user_home_dirs',`
1909 type user_home_dir_t;
1912 allow $1 user_home_dir_t:dir relabelto;
1916 ########################################
1918 ## Relabel to user home files.
1920 ## <param name="domain">
1922 ## Domain allowed access.
1926 interface(`userdom_relabelto_user_home_files',`
1931 allow $1 user_home_t:file relabelto;
1933 ########################################
1935 ## Relabel user home files.
1937 ## <param name="domain">
1939 ## Domain allowed access.
1943 interface(`userdom_relabel_user_home_files',`
1948 allow $1 user_home_t:file relabel_file_perms;
1951 ########################################
1953 ## Create directories in the home dir root with
1954 ## the user home directory type.
1956 ## <param name="domain">
1958 ## Domain allowed access.
1962 interface(`userdom_home_filetrans_user_home_dir',`
1964 type user_home_dir_t;
1967 files_home_filetrans($1, user_home_dir_t, dir)
1970 ########################################
1972 ## Do a domain transition to the specified
1973 ## domain when executing a program in the
1974 ## user home directory.
1978 ## Do a domain transition to the specified
1979 ## domain when executing a program in the
1980 ## user home directory.
1983 ## No interprocess communication (signals, pipes,
1984 ## etc.) is provided by this interface since
1985 ## the domains are not owned by this module.
1988 ## <param name="source_domain">
1990 ## Domain allowed to transition.
1993 ## <param name="target_domain">
1995 ## Domain to transition to.
1999 interface(`userdom_user_home_domtrans',`
2001 type user_home_dir_t, user_home_t;
2004 domain_auto_trans($1, user_home_t, $2)
2005 allow $1 user_home_dir_t:dir search_dir_perms;
2006 files_search_home($1)
2009 ########################################
2011 ## Do not audit attempts to search user home content directories.
2013 ## <param name="domain">
2015 ## Domain to not audit.
2019 interface(`userdom_dontaudit_search_user_home_content',`
2024 dontaudit $1 user_home_t:dir search_dir_perms;
2025 fs_dontaudit_list_nfs($1)
2026 fs_dontaudit_list_cifs($1)
2029 ########################################
2031 ## List contents of users home directory.
2033 ## <param name="domain">
2035 ## Domain allowed access.
2039 interface(`userdom_list_user_home_content',`
2041 type user_home_dir_t;
2042 attribute user_home_type;
2046 allow $1 { user_home_dir_t user_home_type }:dir list_dir_perms;
2049 ########################################
2051 ## Create, read, write, and delete directories
2052 ## in a user home subdirectory.
2054 ## <param name="domain">
2056 ## Domain allowed access.
2060 interface(`userdom_manage_user_home_content_dirs',`
2062 type user_home_dir_t, user_home_t;
2065 manage_dirs_pattern($1, { user_home_dir_t user_home_t }, user_home_t)
2066 files_search_home($1)
2069 ########################################
2071 ## Delete directories in a user home subdirectory.
2073 ## <param name="domain">
2075 ## Domain allowed access.
2079 interface(`userdom_delete_user_home_content_dirs',`
2084 allow $1 user_home_t:dir delete_dir_perms;
2087 ########################################
2089 ## Delete all directories in a user home subdirectory.
2091 ## <param name="domain">
2093 ## Domain allowed access.
2097 interface(`userdom_delete_all_user_home_content_dirs',`
2099 attribute user_home_type;
2102 allow $1 user_home_type:dir delete_dir_perms;
2105 ########################################
2107 ## Set the attributes of user home files.
2109 ## <param name="domain">
2111 ## Domain allowed access.
2116 interface(`userdom_setattr_user_home_content_files',`
2121 allow $1 user_home_t:file setattr;
2124 ########################################
2126 ## Do not audit attempts to set the
2127 ## attributes of user home files.
2129 ## <param name="domain">
2131 ## Domain to not audit.
2135 interface(`userdom_dontaudit_setattr_user_home_content_files',`
2140 dontaudit $1 user_home_t:file setattr_file_perms;
2143 ########################################
2145 ## Set the attributes of all user home directories.
2147 ## <param name="domain">
2149 ## Domain allowed access.
2154 interface(`userdom_setattr_all_user_home_content_dirs',`
2156 attribute user_home_type;
2159 allow $1 user_home_type:dir setattr_dir_perms;
2162 ########################################
2164 ## Mmap user home files.
2166 ## <param name="domain">
2168 ## Domain allowed access.
2172 interface(`userdom_mmap_user_home_content_files',`
2174 type user_home_dir_t, user_home_t;
2177 mmap_files_pattern($1, { user_home_dir_t user_home_t }, user_home_t)
2178 files_search_home($1)
2181 ########################################
2183 ## Read user home files.
2185 ## <param name="domain">
2187 ## Domain allowed access.
2191 interface(`userdom_read_user_home_content_files',`
2193 type user_home_dir_t, user_home_t;
2196 list_dirs_pattern($1, { user_home_dir_t user_home_t }, { user_home_dir_t user_home_t })
2197 read_files_pattern($1, { user_home_dir_t user_home_t }, user_home_t)
2198 files_search_home($1)
2201 ########################################
2203 ## Do not audit attempts to getattr user home files.
2205 ## <param name="domain">
2207 ## Domain to not audit.
2211 interface(`userdom_dontaudit_getattr_user_home_content',`
2213 attribute user_home_type;
2216 dontaudit $1 user_home_type:dir getattr;
2217 dontaudit $1 user_home_type:file getattr;
2220 ########################################
2222 ## Do not audit attempts to read user home files.
2224 ## <param name="domain">
2226 ## Domain to not audit.
2230 interface(`userdom_dontaudit_read_user_home_content_files',`
2232 attribute user_home_type;
2233 type user_home_dir_t;
2236 dontaudit $1 user_home_dir_t:dir list_dir_perms;
2237 dontaudit $1 user_home_type:dir list_dir_perms;
2238 dontaudit $1 user_home_type:file read_file_perms;
2239 dontaudit $1 user_home_type:lnk_file read_lnk_file_perms;
2242 ########################################
2244 ## Do not audit attempts to append user home files.
2246 ## <param name="domain">
2248 ## Domain to not audit.
2252 interface(`userdom_dontaudit_append_user_home_content_files',`
2257 dontaudit $1 user_home_t:file append_file_perms;
2260 ########################################
2262 ## Do not audit attempts to write user home files.
2264 ## <param name="domain">
2266 ## Domain to not audit.
2270 interface(`userdom_dontaudit_write_user_home_content_files',`
2275 dontaudit $1 user_home_t:file write_file_perms;
2278 ########################################
2280 ## Delete files in a user home subdirectory.
2282 ## <param name="domain">
2284 ## Domain allowed access.
2288 interface(`userdom_delete_user_home_content_files',`
2293 allow $1 user_home_t:file delete_file_perms;
2296 ########################################
2298 ## Delete all files in a user home subdirectory.
2300 ## <param name="domain">
2302 ## Domain allowed access.
2306 interface(`userdom_delete_all_user_home_content_files',`
2308 attribute user_home_type;
2311 allow $1 user_home_type:file delete_file_perms;
2314 ########################################
2316 ## Delete sock files in a user home subdirectory.
2318 ## <param name="domain">
2320 ## Domain allowed access.
2324 interface(`userdom_delete_user_home_content_sock_files',`
2329 allow $1 user_home_t:sock_file delete_file_perms;
2332 ########################################
2334 ## Delete all sock files in a user home subdirectory.
2336 ## <param name="domain">
2338 ## Domain allowed access.
2342 interface(`userdom_delete_all_user_home_content_sock_files',`
2344 attribute user_home_type;
2347 allow $1 user_home_type:sock_file delete_file_perms;
2350 ########################################
2352 ## Do not audit attempts to write user home files.
2354 ## <param name="domain">
2356 ## Domain to not audit.
2360 interface(`userdom_dontaudit_relabel_user_home_content_files',`
2365 dontaudit $1 user_home_t:file relabel_file_perms;
2368 ########################################
2370 ## Read user home subdirectory symbolic links.
2372 ## <param name="domain">
2374 ## Domain allowed access.
2378 interface(`userdom_read_user_home_content_symlinks',`
2380 type user_home_dir_t, user_home_t;
2383 allow $1 { user_home_dir_t user_home_t }:lnk_file read_lnk_file_perms;
2386 ########################################
2388 ## Execute user home files.
2390 ## <param name="domain">
2392 ## Domain allowed access.
2397 interface(`userdom_exec_user_home_content_files',`
2399 type user_home_dir_t;
2400 attribute user_home_type;
2403 files_search_home($1)
2404 exec_files_pattern($1, { user_home_dir_t user_home_type }, user_home_type)
2405 dontaudit $1 user_home_type:sock_file execute;
2408 ########################################
2410 ## Do not audit attempts to execute user home files.
2412 ## <param name="domain">
2414 ## Domain to not audit.
2418 interface(`userdom_dontaudit_exec_user_home_content_files',`
2423 dontaudit $1 user_home_t:file exec_file_perms;
2426 ########################################
2428 ## Create, read, write, and delete files
2429 ## in a user home subdirectory.
2431 ## <param name="domain">
2433 ## Domain allowed access.
2437 interface(`userdom_manage_user_home_content_files',`
2439 type user_home_dir_t, user_home_t;
2442 manage_files_pattern($1, user_home_t, user_home_t)
2443 allow $1 user_home_dir_t:dir search_dir_perms;
2444 files_search_home($1)
2447 ########################################
2449 ## Do not audit attempts to create, read, write, and delete directories
2450 ## in a user home subdirectory.
2452 ## <param name="domain">
2454 ## Domain to not audit.
2458 interface(`userdom_dontaudit_manage_user_home_content_dirs',`
2460 type user_home_dir_t, user_home_t;
2463 dontaudit $1 user_home_t:dir manage_dir_perms;
2466 ########################################
2468 ## Create, read, write, and delete symbolic links
2469 ## in a user home subdirectory.
2471 ## <param name="domain">
2473 ## Domain allowed access.
2477 interface(`userdom_manage_user_home_content_symlinks',`
2479 type user_home_dir_t, user_home_t;
2482 manage_lnk_files_pattern($1, user_home_t, user_home_t)
2483 allow $1 user_home_dir_t:dir search_dir_perms;
2484 files_search_home($1)
2487 ########################################
2489 ## Delete symbolic links in a user home directory.
2491 ## <param name="domain">
2493 ## Domain allowed access.
2497 interface(`userdom_delete_user_home_content_symlinks',`
2502 allow $1 user_home_t:lnk_file delete_lnk_file_perms;
2505 ########################################
2507 ## Delete all symbolic links in a user home directory.
2509 ## <param name="domain">
2511 ## Domain allowed access.
2515 interface(`userdom_delete_all_user_home_content_symlinks',`
2517 attribute user_home_type;
2520 allow $1 user_home_type:lnk_file delete_lnk_file_perms;
2523 ########################################
2525 ## Create, read, write, and delete named pipes
2526 ## in a user home subdirectory.
2528 ## <param name="domain">
2530 ## Domain allowed access.
2534 interface(`userdom_manage_user_home_content_pipes',`
2536 type user_home_dir_t, user_home_t;
2539 manage_fifo_files_pattern($1, user_home_t, user_home_t)
2540 allow $1 user_home_dir_t:dir search_dir_perms;
2541 files_search_home($1)
2544 ########################################
2546 ## Create, read, write, and delete named sockets
2547 ## in a user home subdirectory.
2549 ## <param name="domain">
2551 ## Domain allowed access.
2555 interface(`userdom_manage_user_home_content_sockets',`
2557 type user_home_dir_t, user_home_t;
2560 allow $1 user_home_dir_t:dir search_dir_perms;
2561 manage_sock_files_pattern($1, user_home_t, user_home_t)
2562 files_search_home($1)
2565 ########################################
2567 ## Create objects in a user home directory
2568 ## with an automatic type transition to
2569 ## a specified private type.
2571 ## <param name="domain">
2573 ## Domain allowed access.
2576 ## <param name="private_type">
2578 ## The type of the object to create.
2581 ## <param name="object_class">
2583 ## The class of the object to be created.
2587 interface(`userdom_user_home_dir_filetrans',`
2589 type user_home_dir_t;
2592 filetrans_pattern($1, user_home_dir_t, $2, $3, $4)
2593 files_search_home($1)
2596 ########################################
2598 ## Create objects in a user home directory
2599 ## with an automatic type transition to
2600 ## a specified private type.
2602 ## <param name="domain">
2604 ## Domain allowed access.
2607 ## <param name="private_type">
2609 ## The type of the object to create.
2612 ## <param name="object_class">
2614 ## The class of the object to be created.
2618 interface(`userdom_user_home_content_filetrans',`
2620 type user_home_dir_t, user_home_t;
2623 filetrans_pattern($1, user_home_t, $2, $3)
2624 allow $1 user_home_dir_t:dir search_dir_perms;
2625 files_search_home($1)
2628 ########################################
2630 ## Create objects in a user home directory
2631 ## with an automatic type transition to
2632 ## the user home file type.
2634 ## <param name="domain">
2636 ## Domain allowed access.
2639 ## <param name="object_class">
2641 ## The class of the object to be created.
2645 interface(`userdom_user_home_dir_filetrans_user_home_content',`
2647 type user_home_dir_t, user_home_t;
2650 filetrans_pattern($1, user_home_dir_t, user_home_t, $2)
2651 files_search_home($1)
2654 ########################################
2656 ## Write to user temporary named sockets.
2658 ## <param name="domain">
2660 ## Domain allowed access.
2664 interface(`userdom_write_user_tmp_sockets',`
2669 allow $1 user_tmp_t:sock_file write_sock_file_perms;
2670 files_search_tmp($1)
2673 ########################################
2675 ## List user temporary directories.
2677 ## <param name="domain">
2679 ## Domain allowed access.
2683 interface(`userdom_list_user_tmp',`
2688 allow $1 user_tmp_t:dir list_dir_perms;
2689 files_search_tmp($1)
2692 ########################################
2694 ## Do not audit attempts to list user
2695 ## temporary directories.
2697 ## <param name="domain">
2699 ## Domain to not audit.
2703 interface(`userdom_dontaudit_list_user_tmp',`
2708 dontaudit $1 user_tmp_t:dir list_dir_perms;
2711 ########################################
2713 ## Do not audit attempts to manage users
2714 ## temporary directories.
2716 ## <param name="domain">
2718 ## Domain to not audit.
2722 interface(`userdom_dontaudit_manage_user_tmp_dirs',`
2727 dontaudit $1 user_tmp_t:dir manage_dir_perms;
2730 ########################################
2732 ## Read user temporary files.
2734 ## <param name="domain">
2736 ## Domain allowed access.
2740 interface(`userdom_read_user_tmp_files',`
2745 read_files_pattern($1, user_tmp_t, user_tmp_t)
2746 allow $1 user_tmp_t:dir list_dir_perms;
2747 files_search_tmp($1)
2750 ########################################
2752 ## Do not audit attempts to read users
2755 ## <param name="domain">
2757 ## Domain to not audit.
2761 interface(`userdom_dontaudit_read_user_tmp_files',`
2766 dontaudit $1 user_tmp_t:file read_inherited_file_perms;
2769 ########################################
2771 ## Do not audit attempts to append users
2774 ## <param name="domain">
2776 ## Domain to not audit.
2780 interface(`userdom_dontaudit_append_user_tmp_files',`
2785 dontaudit $1 user_tmp_t:file append_file_perms;
2788 ########################################
2790 ## Read and write user temporary files.
2792 ## <param name="domain">
2794 ## Domain allowed access.
2798 interface(`userdom_rw_user_tmp_files',`
2803 allow $1 user_tmp_t:dir list_dir_perms;
2804 rw_files_pattern($1, user_tmp_t, user_tmp_t)
2805 files_search_tmp($1)
2808 ########################################
2810 ## Do not audit attempts to manage users
2813 ## <param name="domain">
2815 ## Domain to not audit.
2819 interface(`userdom_dontaudit_manage_user_tmp_files',`
2824 dontaudit $1 user_tmp_t:file manage_file_perms;
2827 ########################################
2829 ## Read user temporary symbolic links.
2831 ## <param name="domain">
2833 ## Domain allowed access.
2837 interface(`userdom_read_user_tmp_symlinks',`
2842 read_lnk_files_pattern($1, user_tmp_t, user_tmp_t)
2843 allow $1 user_tmp_t:dir list_dir_perms;
2844 files_search_tmp($1)
2847 ########################################
2849 ## Create, read, write, and delete user
2850 ## temporary directories.
2852 ## <param name="domain">
2854 ## Domain allowed access.
2858 interface(`userdom_manage_user_tmp_dirs',`
2863 manage_dirs_pattern($1, user_tmp_t, user_tmp_t)
2864 files_search_tmp($1)
2867 ########################################
2869 ## Create, read, write, and delete user
2872 ## <param name="domain">
2874 ## Domain allowed access.
2878 interface(`userdom_manage_user_tmp_files',`
2883 manage_files_pattern($1, user_tmp_t, user_tmp_t)
2884 files_search_tmp($1)
2887 ########################################
2889 ## Create, read, write, and delete user
2890 ## temporary symbolic links.
2892 ## <param name="domain">
2894 ## Domain allowed access.
2898 interface(`userdom_manage_user_tmp_symlinks',`
2903 manage_lnk_files_pattern($1, user_tmp_t, user_tmp_t)
2904 files_search_tmp($1)
2907 ########################################
2909 ## Create, read, write, and delete user
2910 ## temporary named pipes.
2912 ## <param name="domain">
2914 ## Domain allowed access.
2918 interface(`userdom_manage_user_tmp_pipes',`
2923 manage_fifo_files_pattern($1, user_tmp_t, user_tmp_t)
2924 files_search_tmp($1)
2927 ########################################
2929 ## Create, read, write, and delete user
2930 ## temporary named sockets.
2932 ## <param name="domain">
2934 ## Domain allowed access.
2938 interface(`userdom_manage_user_tmp_sockets',`
2943 manage_sock_files_pattern($1, user_tmp_t, user_tmp_t)
2944 files_search_tmp($1)
2947 ########################################
2949 ## Create objects in a user temporary directory
2950 ## with an automatic type transition to
2951 ## a specified private type.
2953 ## <param name="domain">
2955 ## Domain allowed access.
2958 ## <param name="private_type">
2960 ## The type of the object to create.
2963 ## <param name="object_class">
2965 ## The class of the object to be created.
2969 interface(`userdom_user_tmp_filetrans',`
2974 filetrans_pattern($1, user_tmp_t, $2, $3)
2975 files_search_tmp($1)
2978 ########################################
2980 ## Create objects in the temporary directory
2981 ## with an automatic type transition to
2982 ## the user temporary type.
2984 ## <param name="domain">
2986 ## Domain allowed access.
2989 ## <param name="object_class">
2991 ## The class of the object to be created.
2995 interface(`userdom_tmp_filetrans_user_tmp',`
3000 files_tmp_filetrans($1, user_tmp_t, $2)
3003 ########################################
3005 ## Read user tmpfs files.
3007 ## <param name="domain">
3009 ## Domain allowed access.
3013 interface(`userdom_read_user_tmpfs_files',`
3018 read_files_pattern($1, user_tmpfs_t, user_tmpfs_t)
3019 read_lnk_files_pattern($1, user_tmpfs_t, user_tmpfs_t)
3020 allow $1 user_tmpfs_t:dir list_dir_perms;
3024 ########################################
3026 ## Read/Write user tmpfs files.
3028 ## <param name="domain">
3030 ## Domain allowed access.
3034 interface(`userdom_rw_user_tmpfs_files',`
3039 rw_files_pattern($1, user_tmpfs_t, user_tmpfs_t)
3040 read_lnk_files_pattern($1, user_tmpfs_t, user_tmpfs_t)
3041 allow $1 user_tmpfs_t:dir list_dir_perms;
3045 ########################################
3047 ## Get the attributes of a user domain tty.
3049 ## <param name="domain">
3051 ## Domain allowed access.
3055 interface(`userdom_getattr_user_ttys',`
3057 type user_tty_device_t;
3060 allow $1 user_tty_device_t:chr_file getattr_chr_file_perms;
3063 ########################################
3065 ## Do not audit attempts to get the attributes of a user domain tty.
3067 ## <param name="domain">
3069 ## Domain to not audit.
3073 interface(`userdom_dontaudit_getattr_user_ttys',`
3075 type user_tty_device_t;
3078 dontaudit $1 user_tty_device_t:chr_file getattr_chr_file_perms;
3081 ########################################
3083 ## Set the attributes of a user domain tty.
3085 ## <param name="domain">
3087 ## Domain allowed access.
3091 interface(`userdom_setattr_user_ttys',`
3093 type user_tty_device_t;
3096 allow $1 user_tty_device_t:chr_file setattr_chr_file_perms;
3099 ########################################
3101 ## Do not audit attempts to set the attributes of a user domain tty.
3103 ## <param name="domain">
3105 ## Domain to not audit.
3109 interface(`userdom_dontaudit_setattr_user_ttys',`
3111 type user_tty_device_t;
3114 dontaudit $1 user_tty_device_t:chr_file setattr_chr_file_perms;
3117 ########################################
3119 ## Read and write a user domain tty.
3121 ## <param name="domain">
3123 ## Domain allowed access.
3127 interface(`userdom_use_user_ttys',`
3129 type user_tty_device_t;
3132 allow $1 user_tty_device_t:chr_file rw_term_perms;
3135 ########################################
3137 ## Read and write a inherited user domain tty.
3139 ## <param name="domain">
3141 ## Domain allowed access.
3145 interface(`userdom_use_inherited_user_ttys',`
3147 type user_tty_device_t;
3150 allow $1 user_tty_device_t:chr_file rw_inherited_term_perms;
3153 ########################################
3155 ## Read and write a user domain pty.
3157 ## <param name="domain">
3159 ## Domain allowed access.
3163 interface(`userdom_use_user_ptys',`
3168 allow $1 user_devpts_t:chr_file rw_term_perms;
3171 ########################################
3173 ## Read and write a inherited user domain pty.
3175 ## <param name="domain">
3177 ## Domain allowed access.
3181 interface(`userdom_use_inherited_user_ptys',`
3186 allow $1 user_devpts_t:chr_file rw_inherited_term_perms;
3189 ########################################
3191 ## Read and write a inherited user TTYs and PTYs.
3195 ## Allow the specified domain to read and write inherited user
3196 ## TTYs and PTYs. This will allow the domain to
3197 ## interact with the user via the terminal. Typically
3198 ## all interactive applications will require this
3202 ## <param name="domain">
3204 ## Domain allowed access.
3207 ## <infoflow type="both" weight="10"/>
3209 interface(`userdom_use_inherited_user_terminals',`
3211 type user_tty_device_t, user_devpts_t;
3214 allow $1 user_tty_device_t:chr_file rw_inherited_term_perms;
3215 allow $1 user_devpts_t:chr_file rw_inherited_term_perms;
3218 #######################################
3220 ## Allow attempts to read and write
3221 ## a user domain tty and pty.
3223 ## <param name="domain">
3225 ## Domain to not audit.
3229 interface(`userdom_use_user_terminals',`
3231 type user_tty_device_t, user_devpts_t;
3234 allow $1 user_tty_device_t:chr_file rw_term_perms;
3235 allow $1 user_devpts_t:chr_file rw_term_perms;
3238 ########################################
3240 ## Do not audit attempts to read and write
3241 ## a user domain tty and pty.
3243 ## <param name="domain">
3245 ## Domain to not audit.
3249 interface(`userdom_dontaudit_use_user_terminals',`
3251 type user_tty_device_t, user_devpts_t;
3254 dontaudit $1 user_tty_device_t:chr_file rw_term_perms;
3255 dontaudit $1 user_devpts_t:chr_file rw_term_perms;
3259 ########################################
3261 ## Get attributes of user domain tty and pty.
3263 ## <param name="domain">
3265 ## Domain allowed access.
3269 interface(`userdom_getattr_user_terminals',`
3271 type user_tty_device_t, user_devpts_t;
3274 allow $1 { user_tty_device_t user_devpts_t }:chr_file getattr_chr_file_perms;
3277 ########################################
3279 ## Execute a shell in all user domains. This
3280 ## is an explicit transition, requiring the
3281 ## caller to use setexeccon().
3283 ## <param name="domain">
3285 ## Domain allowed to transition.
3289 interface(`userdom_spec_domtrans_all_users',`
3291 attribute userdomain;
3294 corecmd_shell_spec_domtrans($1, userdomain)
3295 allow userdomain $1:fd use;
3296 allow userdomain $1:fifo_file rw_file_perms;
3297 allow userdomain $1:process sigchld;
3300 ########################################
3302 ## Execute an Xserver session in all unprivileged user domains. This
3303 ## is an explicit transition, requiring the
3304 ## caller to use setexeccon().
3306 ## <param name="domain">
3308 ## Domain allowed to transition.
3312 interface(`userdom_xsession_spec_domtrans_all_users',`
3314 attribute userdomain;
3317 xserver_xsession_spec_domtrans($1, userdomain)
3318 allow userdomain $1:fd use;
3319 allow userdomain $1:fifo_file rw_file_perms;
3320 allow userdomain $1:process sigchld;
3323 ########################################
3325 ## Execute a shell in all unprivileged user domains. This
3326 ## is an explicit transition, requiring the
3327 ## caller to use setexeccon().
3329 ## <param name="domain">
3331 ## Domain allowed to transition.
3335 interface(`userdom_spec_domtrans_unpriv_users',`
3337 attribute unpriv_userdomain;
3340 corecmd_shell_spec_domtrans($1, unpriv_userdomain)
3341 allow unpriv_userdomain $1:fd use;
3342 allow unpriv_userdomain $1:fifo_file rw_file_perms;
3343 allow unpriv_userdomain $1:process sigchld;
3346 ########################################
3348 ## Execute an Xserver session in all unprivileged user domains. This
3349 ## is an explicit transition, requiring the
3350 ## caller to use setexeccon().
3352 ## <param name="domain">
3354 ## Domain allowed to transition.
3358 interface(`userdom_xsession_spec_domtrans_unpriv_users',`
3360 attribute unpriv_userdomain;
3363 xserver_xsession_spec_domtrans($1, unpriv_userdomain)
3364 allow unpriv_userdomain $1:fd use;
3365 allow unpriv_userdomain $1:fifo_file rw_file_perms;
3366 allow unpriv_userdomain $1:process sigchld;
3369 ########################################
3371 ## Manage unpriviledged user SysV sempaphores.
3373 ## <param name="domain">
3375 ## Domain allowed access.
3379 interface(`userdom_manage_unpriv_user_semaphores',`
3381 attribute unpriv_userdomain;
3384 allow $1 unpriv_userdomain:sem create_sem_perms;
3387 ########################################
3389 ## Manage unpriviledged user SysV shared
3392 ## <param name="domain">
3394 ## Domain allowed access.
3398 interface(`userdom_manage_unpriv_user_shared_mem',`
3400 attribute unpriv_userdomain;
3403 allow $1 unpriv_userdomain:shm create_shm_perms;
3406 ########################################
3408 ## Execute bin_t in the unprivileged user domains. This
3409 ## is an explicit transition, requiring the
3410 ## caller to use setexeccon().
3412 ## <param name="domain">
3414 ## Domain allowed to transition.
3418 interface(`userdom_bin_spec_domtrans_unpriv_users',`
3420 attribute unpriv_userdomain;
3423 corecmd_bin_spec_domtrans($1, unpriv_userdomain)
3424 allow unpriv_userdomain $1:fd use;
3425 allow unpriv_userdomain $1:fifo_file rw_file_perms;
3426 allow unpriv_userdomain $1:process sigchld;
3429 ########################################
3431 ## Execute all entrypoint files in unprivileged user
3432 ## domains. This is an explicit transition, requiring the
3433 ## caller to use setexeccon().
3435 ## <param name="domain">
3437 ## Domain allowed access.
3441 interface(`userdom_entry_spec_domtrans_unpriv_users',`
3443 attribute unpriv_userdomain;
3446 domain_entry_file_spec_domtrans($1, unpriv_userdomain)
3447 allow unpriv_userdomain $1:fd use;
3448 allow unpriv_userdomain $1:fifo_file rw_fifo_file_perms;
3449 allow unpriv_userdomain $1:process sigchld;
3452 ########################################
3454 ## Search users home directories.
3456 ## <param name="domain">
3458 ## Domain allowed access.
3462 interface(`userdom_search_user_home_content',`
3464 type user_home_dir_t;
3465 attribute user_home_type;
3469 allow $1 { user_home_dir_t user_home_type }:dir search_dir_perms;
3470 allow $1 { user_home_dir_t user_home_type }:lnk_file read_lnk_file_perms;
3473 ########################################
3475 ## Send general signals to unprivileged user domains.
3477 ## <param name="domain">
3479 ## Domain allowed access.
3483 interface(`userdom_signal_unpriv_users',`
3485 attribute unpriv_userdomain;
3488 allow $1 unpriv_userdomain:process signal;
3491 ########################################
3493 ## Inherit the file descriptors from unprivileged user domains.
3495 ## <param name="domain">
3497 ## Domain allowed access.
3501 interface(`userdom_use_unpriv_users_fds',`
3503 attribute unpriv_userdomain;
3506 allow $1 unpriv_userdomain:fd use;
3509 ########################################
3511 ## Do not audit attempts to inherit the file descriptors
3512 ## from unprivileged user domains.
3516 ## Do not audit attempts to inherit the file descriptors
3517 ## from unprivileged user domains. This will supress
3518 ## SELinux denial messages when the specified domain is denied
3519 ## the permission to inherit these file descriptors.
3522 ## <param name="domain">
3524 ## Domain to not audit.
3527 ## <infoflow type="none"/>
3529 interface(`userdom_dontaudit_use_unpriv_user_fds',`
3531 attribute unpriv_userdomain;
3534 dontaudit $1 unpriv_userdomain:fd use;
3537 ########################################
3539 ## Do not audit attempts to use user ptys.
3541 ## <param name="domain">
3543 ## Domain to not audit.
3547 interface(`userdom_dontaudit_use_user_ptys',`
3552 dontaudit $1 user_devpts_t:chr_file rw_inherited_file_perms;
3555 ########################################
3557 ## Relabel files to unprivileged user pty types.
3559 ## <param name="domain">
3561 ## Domain allowed access.
3565 interface(`userdom_relabelto_user_ptys',`
3570 allow $1 user_devpts_t:chr_file relabelto;
3573 ########################################
3575 ## Do not audit attempts to relabel files from
3578 ## <param name="domain">
3580 ## Domain to not audit.
3584 interface(`userdom_dontaudit_relabelfrom_user_ptys',`
3589 dontaudit $1 user_devpts_t:chr_file relabelfrom;
3592 ########################################
3594 ## Write all users files in /tmp
3596 ## <param name="domain">
3598 ## Domain allowed access.
3602 interface(`userdom_write_user_tmp_files',`
3607 write_files_pattern($1, user_tmp_t, user_tmp_t)
3610 ########################################
3612 ## Do not audit attempts to write users
3615 ## <param name="domain">
3617 ## Domain to not audit.
3621 interface(`userdom_dontaudit_write_user_tmp_files',`
3626 dontaudit $1 user_tmp_t:file write;
3629 ########################################
3631 ## Do not audit attempts to read/write users
3632 ## temporary fifo files.
3634 ## <param name="domain">
3636 ## Domain to not audit.
3640 interface(`userdom_dontaudit_rw_user_tmp_pipes',`
3645 dontaudit $1 user_tmp_t:fifo_file rw_inherited_fifo_file_perms;
3648 ########################################
3650 ## Do not audit attempts to use user ttys.
3652 ## <param name="domain">
3654 ## Domain to not audit.
3658 interface(`userdom_dontaudit_use_user_ttys',`
3660 type user_tty_device_t;
3663 dontaudit $1 user_tty_device_t:chr_file rw_file_perms;
3666 ########################################
3668 ## Read the process state of all user domains.
3670 ## <param name="domain">
3672 ## Domain allowed access.
3676 interface(`userdom_read_all_users_state',`
3678 attribute userdomain;
3681 read_files_pattern($1, userdomain, userdomain)
3682 read_lnk_files_pattern($1,userdomain,userdomain)
3683 kernel_search_proc($1)
3686 ########################################
3688 ## Get the attributes of all user domains.
3690 ## <param name="domain">
3692 ## Domain allowed access.
3696 interface(`userdom_getattr_all_users',`
3698 attribute userdomain;
3701 allow $1 userdomain:process getattr;
3704 ########################################
3706 ## Inherit the file descriptors from all user domains
3708 ## <param name="domain">
3710 ## Domain allowed access.
3714 interface(`userdom_use_all_users_fds',`
3716 attribute userdomain;
3719 allow $1 userdomain:fd use;
3722 ########################################
3724 ## Do not audit attempts to inherit the file
3725 ## descriptors from any user domains.
3727 ## <param name="domain">
3729 ## Domain to not audit.
3733 interface(`userdom_dontaudit_use_all_users_fds',`
3735 attribute userdomain;
3738 dontaudit $1 userdomain:fd use;
3741 ########################################
3743 ## Send general signals to all user domains.
3745 ## <param name="domain">
3747 ## Domain allowed access.
3751 interface(`userdom_signal_all_users',`
3753 attribute userdomain;
3756 allow $1 userdomain:process signal;
3759 ########################################
3761 ## Send kill signals to all user domains.
3763 ## <param name="domain">
3765 ## Domain allowed access.
3769 interface(`userdom_kill_all_users',`
3771 attribute userdomain;
3774 allow $1 userdomain:process sigkill;
3777 ########################################
3779 ## Send a SIGCHLD signal to all user domains.
3781 ## <param name="domain">
3783 ## Domain allowed access.
3787 interface(`userdom_sigchld_all_users',`
3789 attribute userdomain;
3792 allow $1 userdomain:process sigchld;
3795 ########################################
3797 ## Create keys for all user domains.
3799 ## <param name="domain">
3801 ## Domain allowed access.
3805 interface(`userdom_create_all_users_keys',`
3807 attribute userdomain;
3810 allow $1 userdomain:key create;
3813 ########################################
3815 ## Send a dbus message to all user domains.
3817 ## <param name="domain">
3819 ## Domain allowed access.
3823 interface(`userdom_dbus_send_all_users',`
3825 attribute userdomain;
3826 class dbus send_msg;
3829 allow $1 userdomain:dbus send_msg;
3832 ########################################
3834 ## Allow apps to set rlimits on userdomain
3836 ## <param name="domain">
3838 ## Domain allowed access.
3842 interface(`userdom_set_rlimitnh',`
3844 attribute userdomain;
3847 allow $1 userdomain:process rlimitinh;
3850 ########################################
3852 ## Define this type as a Allow apps to set rlimits on userdomain
3854 ## <param name="domain">
3856 ## Domain allowed access.
3859 ## <param name="userdomain_prefix">
3861 ## The prefix of the user domain (e.g., user
3862 ## is the prefix for user_t).
3865 ## <param name="domain">
3867 ## Domain allowed access.
3871 template(`userdom_unpriv_usertype',`
3873 attribute unpriv_userdomain, userdomain;
3874 attribute $1_usertype;
3876 typeattribute $2 $1_usertype;
3877 typeattribute $2 unpriv_userdomain;
3878 typeattribute $2 userdomain;
3880 auth_use_nsswitch($2)
3881 ubac_constrained($2)
3884 ########################################
3886 ## Connect to users over an unix stream socket.
3888 ## <param name="domain">
3890 ## Domain allowed access.
3894 interface(`userdom_stream_connect',`
3897 attribute userdomain;
3900 stream_connect_pattern($1, user_tmp_t, user_tmp_t, userdomain)
3903 ########################################
3905 ## Ptrace user domains.
3907 ## <param name="domain">
3909 ## Domain allowed access.
3913 interface(`userdom_ptrace_all_users',`
3915 attribute userdomain;
3918 allow $1 userdomain:process ptrace;
3921 ########################################
3923 ## dontaudit Search /root
3925 ## <param name="domain">
3927 ## Domain to not audit.
3931 interface(`userdom_dontaudit_search_admin_dir',`
3936 dontaudit $1 admin_home_t:dir search_dir_perms;
3939 ########################################
3941 ## dontaudit list /root
3943 ## <param name="domain">
3945 ## Domain to not audit.
3949 interface(`userdom_dontaudit_list_admin_dir',`
3954 dontaudit $1 admin_home_t:dir list_dir_perms;
3957 ########################################
3959 ## Allow domain to list /root
3961 ## <param name="domain">
3963 ## Domain allowed access.
3967 interface(`userdom_list_admin_dir',`
3972 allow $1 admin_home_t:dir list_dir_perms;
3975 ########################################
3977 ## Allow Search /root
3979 ## <param name="domain">
3981 ## Domain allowed access.
3985 interface(`userdom_search_admin_dir',`
3990 allow $1 admin_home_t:dir search_dir_perms;
3993 ########################################
3995 ## RW unpriviledged user SysV sempaphores.
3997 ## <param name="domain">
3999 ## Domain allowed access.
4003 interface(`userdom_rw_semaphores',`
4005 attribute unpriv_userdomain;
4008 allow $1 unpriv_userdomain:sem rw_sem_perms;
4011 ########################################
4013 ## Send a message to unpriv users over a unix domain
4016 ## <param name="domain">
4018 ## Domain allowed access.
4022 interface(`userdom_dgram_send',`
4024 attribute unpriv_userdomain;
4027 allow $1 unpriv_userdomain:unix_dgram_socket sendto;
4030 ######################################
4032 ## Send a message to users over a unix domain
4035 ## <param name="domain">
4037 ## Domain allowed access.
4041 interface(`userdom_users_dgram_send',`
4043 attribute userdomain;
4046 allow $1 userdomain:unix_dgram_socket sendto;
4049 #######################################
4051 ## Allow execmod on files in homedirectory
4053 ## <param name="domain">
4055 ## Domain allowed access.
4060 interface(`userdom_execmod_user_home_files',`
4062 type user_home_type;
4065 allow $1 user_home_type:file execmod;
4068 ########################################
4070 ## Read admin home files.
4072 ## <param name="domain">
4074 ## Domain allowed access.
4079 interface(`userdom_read_admin_home_files',`
4084 read_files_pattern($1, admin_home_t, admin_home_t)
4087 ########################################
4089 ## Execute admin home files.
4091 ## <param name="domain">
4093 ## Domain allowed access.
4098 interface(`userdom_exec_admin_home_files',`
4103 exec_files_pattern($1, admin_home_t, admin_home_t)
4106 ########################################
4108 ## Append files inherited
4109 ## in the /root directory.
4111 ## <param name="domain">
4113 ## Domain allowed access.
4117 interface(`userdom_inherit_append_admin_home_files',`
4122 allow $1 admin_home_t:file { getattr append };
4126 #######################################
4128 ## Manage all files/directories in the homedir
4130 ## <param name="userdomain">
4137 interface(`userdom_manage_user_home_content',`
4139 type user_home_dir_t, user_home_t;
4140 attribute user_home_type;
4144 manage_dirs_pattern($1, { user_home_dir_t user_home_type }, user_home_type)
4145 manage_files_pattern($1, { user_home_dir_t user_home_type }, user_home_type)
4146 manage_lnk_files_pattern($1, { user_home_dir_t user_home_type }, user_home_type)
4147 manage_sock_files_pattern($1, { user_home_dir_t user_home_type }, user_home_type)
4148 manage_fifo_files_pattern($1, { user_home_dir_t user_home_type }, user_home_type)
4149 filetrans_pattern($1, user_home_dir_t, user_home_t, { dir file lnk_file sock_file fifo_file })
4154 ########################################
4156 ## Create objects in a user home directory
4157 ## with an automatic type transition to
4158 ## the user home file type.
4160 ## <param name="domain">
4162 ## Domain allowed access.
4165 ## <param name="object_class">
4167 ## The class of the object to be created.
4171 interface(`userdom_user_home_dir_filetrans_pattern',`
4173 type user_home_dir_t, user_home_t;
4176 type_transition $1 user_home_dir_t:$2 user_home_t;
4179 ########################################
4181 ## Create objects in the /root directory
4182 ## with an automatic type transition to
4183 ## a specified private type.
4185 ## <param name="domain">
4187 ## Domain allowed access.
4190 ## <param name="private_type">
4192 ## The type of the object to create.
4195 ## <param name="object_class">
4197 ## The class of the object to be created.
4201 interface(`userdom_admin_home_dir_filetrans',`
4206 filetrans_pattern($1, admin_home_t, $2, $3, $4)
4209 ########################################
4211 ## Send signull to unprivileged user domains.
4213 ## <param name="domain">
4215 ## Domain allowed access.
4219 interface(`userdom_signull_unpriv_users',`
4221 attribute unpriv_userdomain;
4224 allow $1 unpriv_userdomain:process signull;
4227 ########################################
4229 ## Write all users files in /tmp
4231 ## <param name="domain">
4233 ## Domain allowed access.
4237 interface(`userdom_write_user_tmp_dirs',`
4242 write_files_pattern($1, user_tmp_t, user_tmp_t)
4245 ########################################
4247 ## Manage keys for all user domains.
4249 ## <param name="domain">
4251 ## Domain allowed access.
4255 interface(`userdom_manage_all_users_keys',`
4257 attribute userdomain;
4260 allow $1 userdomain:key manage_key_perms;
4264 ########################################
4266 ## Do not audit attempts to read and write
4267 ## unserdomain stream.
4269 ## <param name="domain">
4271 ## Domain to not audit.
4275 interface(`userdom_dontaudit_rw_stream',`
4277 attribute userdomain;
4280 dontaudit $1 userdomain:unix_stream_socket rw_socket_perms;
4283 ########################################
4285 ## Do not audit attempts to read and write
4286 ## unserdomain datagram socket.
4288 ## <param name="domain">
4290 ## Domain to not audit.
4294 interface(`userdom_dontaudit_rw_dgram_socket',`
4296 attribute userdomain;
4299 dontaudit $1 userdomain:unix_dgram_socket { read write };
4302 ########################################
4305 ## in a user home subdirectory.
4307 ## <param name="domain">
4309 ## Domain allowed access.
4313 interface(`userdom_append_user_home_content_files',`
4315 type user_home_dir_t, user_home_t;
4318 append_files_pattern($1, user_home_t, user_home_t)
4319 allow $1 user_home_dir_t:dir search_dir_perms;
4320 files_search_home($1)
4323 ########################################
4325 ## Read files inherited
4326 ## in a user home subdirectory.
4328 ## <param name="domain">
4330 ## Domain allowed access.
4334 interface(`userdom_read_inherited_user_home_content_files',`
4336 attribute user_home_type;
4339 allow $1 user_home_type:file { getattr read };
4342 ########################################
4344 ## Append files inherited
4345 ## in a user home subdirectory.
4347 ## <param name="domain">
4349 ## Domain allowed access.
4353 interface(`userdom_inherit_append_user_home_content_files',`
4358 allow $1 user_home_t:file { getattr append };
4361 ########################################
4363 ## Append files inherited
4364 ## in a user tmp files.
4366 ## <param name="domain">
4368 ## Domain allowed access.
4372 interface(`userdom_inherit_append_user_tmp_files',`
4377 allow $1 user_tmp_t:file { getattr append };
4380 ######################################
4382 ## Read audio files in the users homedir.
4384 ## <param name="domain">
4386 ## Domain allowed access.
4391 interface(`userdom_read_home_audio_files',`
4396 userdom_search_user_home_dirs($1)
4397 allow $1 audio_home_t:dir list_dir_perms;
4398 read_files_pattern($1, audio_home_t, audio_home_t)
4399 read_lnk_files_pattern($1, audio_home_t, audio_home_t)
4402 ########################################
4404 ## Do not audit attempts to write all user home content files.
4406 ## <param name="domain">
4408 ## Domain to not audit.
4412 interface(`userdom_dontaudit_write_all_user_home_content_files',`
4414 attribute user_home_type;
4417 dontaudit $1 user_home_type:file write_file_perms;
4420 ########################################
4422 ## Do not audit attempts to write all user tmp content files.
4424 ## <param name="domain">
4426 ## Domain to not audit.
4430 interface(`userdom_dontaudit_write_all_user_tmp_content_files',`
4432 attribute user_tmp_type;
4435 dontaudit $1 user_tmp_type:file write_file_perms;
4438 ########################################
4440 ## Manage all user temporary content.
4442 ## <param name="domain">
4444 ## Domain allowed access.
4448 interface(`userdom_manage_all_user_tmp_content',`
4450 attribute user_tmp_type;
4453 manage_dirs_pattern($1, user_tmp_type, user_tmp_type)
4454 manage_files_pattern($1, user_tmp_type, user_tmp_type)
4455 manage_lnk_files_pattern($1, user_tmp_type, user_tmp_type)
4456 manage_sock_files_pattern($1, user_tmp_type, user_tmp_type)
4457 manage_fifo_files_pattern($1, user_tmp_type, user_tmp_type)
4458 files_search_tmp($1)
4461 ########################################
4463 ## List all user temporary content.
4465 ## <param name="domain">
4467 ## Domain allowed access.
4471 interface(`userdom_list_all_user_tmp_content',`
4473 attribute user_tmp_type;
4476 list_dirs_pattern($1, user_tmp_type, user_tmp_type)
4477 getattr_files_pattern($1, user_tmp_type, user_tmp_type)
4478 read_lnk_files_pattern($1, user_tmp_type, user_tmp_type)
4479 getattr_sock_files_pattern($1, user_tmp_type, user_tmp_type)
4480 getattr_fifo_files_pattern($1, user_tmp_type, user_tmp_type)
4481 files_search_var($1)
4482 files_search_tmp($1)
4485 ########################################
4487 ## Manage all user tmpfs content.
4489 ## <param name="domain">
4491 ## Domain allowed access.
4495 interface(`userdom_manage_all_user_tmpfs_content',`
4497 attribute user_tmpfs_type;
4500 manage_dirs_pattern($1, user_tmpfs_type, user_tmpfs_type)
4501 manage_files_pattern($1, user_tmpfs_type, user_tmpfs_type)
4502 manage_lnk_files_pattern($1, user_tmpfs_type, user_tmpfs_type)
4503 manage_sock_files_pattern($1, user_tmpfs_type, user_tmpfs_type)
4504 manage_fifo_files_pattern($1, user_tmpfs_type, user_tmpfs_type)
4508 ########################################
4510 ## Delete all user temporary content.
4512 ## <param name="domain">
4514 ## Domain allowed access.
4518 interface(`userdom_delete_all_user_tmp_content',`
4520 attribute user_tmp_type;
4523 delete_dirs_pattern($1, user_tmp_type, user_tmp_type)
4524 delete_files_pattern($1, user_tmp_type, user_tmp_type)
4525 delete_lnk_files_pattern($1, user_tmp_type, user_tmp_type)
4526 delete_sock_files_pattern($1, user_tmp_type, user_tmp_type)
4527 delete_fifo_files_pattern($1, user_tmp_type, user_tmp_type)
4529 files_search_var($1)
4530 files_delete_tmp_dir_entry($1)
4533 ########################################
4535 ## Read system SSL certificates in the users homedir.
4537 ## <param name="domain">
4539 ## Domain allowed access.
4543 interface(`userdom_read_home_certs',`
4548 userdom_search_user_home_content($1)
4549 allow $1 home_cert_t:dir list_dir_perms;
4550 read_files_pattern($1, home_cert_t, home_cert_t)
4551 read_lnk_files_pattern($1, home_cert_t, home_cert_t)
4554 #######################################
4556 ## Dontaudit Write system SSL certificates in the users homedir.
4558 ## <param name="domain">
4560 ## Domain to not audit.
4564 interface(`userdom_dontaudit_write_home_certs',`
4569 dontaudit $1 home_cert_t:file write;
4572 ########################################
4574 ## dontaudit Search getatrr /root files
4576 ## <param name="domain">
4578 ## Domain to not audit.
4582 interface(`userdom_dontaudit_getattr_admin_home_files',`
4587 dontaudit $1 admin_home_t:file getattr;
4590 ########################################
4592 ## dontaudit read /root lnk files
4594 ## <param name="domain">
4596 ## Domain to not audit.
4600 interface(`userdom_dontaudit_read_admin_home_lnk_files',`
4605 dontaudit $1 admin_home_t:lnk_file read;
4608 ########################################
4610 ## dontaudit read /root files
4612 ## <param name="domain">
4614 ## Domain to not audit.
4618 interface(`userdom_dontaudit_read_admin_home_files',`
4623 dontaudit $1 admin_home_t:file read_file_perms;
4626 ########################################
4628 ## Create, read, write, and delete user
4629 ## temporary chr files.
4631 ## <param name="domain">
4633 ## Domain allowed access.
4637 interface(`userdom_manage_user_tmp_chr_files',`
4642 manage_chr_files_pattern($1, user_tmp_t, user_tmp_t)
4643 files_search_tmp($1)
4646 ########################################
4648 ## Create, read, write, and delete user
4649 ## temporary blk files.
4651 ## <param name="domain">
4653 ## Domain allowed access.
4657 interface(`userdom_manage_user_tmp_blk_files',`
4662 manage_blk_files_pattern($1, user_tmp_t, user_tmp_t)
4663 files_search_tmp($1)
4666 ########################################
4668 ## Dontaudit attempt to set attributes on user temporary directories.
4670 ## <param name="domain">
4672 ## Domain to not audit.
4676 interface(`userdom_dontaudit_setattr_user_tmp',`
4681 dontaudit $1 user_tmp_t:dir setattr;
4684 ########################################
4686 ## Write all inherited users files in /tmp
4688 ## <param name="domain">
4690 ## Domain allowed access.
4694 interface(`userdom_write_inherited_user_tmp_files',`
4699 allow $1 user_tmp_t:file write;
4702 ########################################
4704 ## Delete all users files in /tmp
4706 ## <param name="domain">
4708 ## Domain allowed access.
4712 interface(`userdom_delete_user_tmp_files',`
4717 allow $1 user_tmp_t:file delete_file_perms;
4720 ########################################
4722 ## Delete user tmpfs files.
4724 ## <param name="domain">
4726 ## Domain allowed access.
4730 interface(`userdom_delete_user_tmpfs_files',`
4735 allow $1 user_tmpfs_t:file delete_file_perms;
4738 ########################################
4740 ## Read/Write unpriviledged user SysV shared
4743 ## <param name="domain">
4745 ## Domain allowed access.
4749 interface(`userdom_rw_unpriv_user_shared_mem',`
4751 attribute unpriv_userdomain;
4754 allow $1 unpriv_userdomain:shm rw_shm_perms;
4757 ########################################
4759 ## Do not audit attempts to search user
4760 ## temporary directories.
4762 ## <param name="domain">
4764 ## Domain to not audit.
4768 interface(`userdom_dontaudit_search_user_tmp',`
4773 dontaudit $1 user_tmp_t:dir search_dir_perms;
4776 ########################################
4778 ## Execute a file in a user home directory
4779 ## in the specified domain.
4783 ## Execute a file in a user home directory
4784 ## in the specified domain.
4787 ## No interprocess communication (signals, pipes,
4788 ## etc.) is provided by this interface since
4789 ## the domains are not owned by this module.
4792 ## <param name="domain">
4794 ## Domain allowed access.
4797 ## <param name="target_domain">
4799 ## The type of the new process.
4803 interface(`userdom_domtrans_user_home',`
4808 read_lnk_files_pattern($1, user_home_t, user_home_t)
4809 domain_transition_pattern($1, user_home_t, $2)
4810 type_transition $1 user_home_t:process $2;
4813 ########################################
4815 ## Execute a file in a user tmp directory
4816 ## in the specified domain.
4820 ## Execute a file in a user tmp directory
4821 ## in the specified domain.
4824 ## No interprocess communication (signals, pipes,
4825 ## etc.) is provided by this interface since
4826 ## the domains are not owned by this module.
4829 ## <param name="domain">
4831 ## Domain allowed access.
4834 ## <param name="target_domain">
4836 ## The type of the new process.
4840 interface(`userdom_domtrans_user_tmp',`
4845 files_search_tmp($1)
4846 read_lnk_files_pattern($1, user_tmp_t, user_tmp_t)
4847 domain_transition_pattern($1, user_tmp_t, $2)
4848 type_transition $1 user_tmp_t:process $2;
4851 ########################################
4853 ## Do not audit attempts to read all user home content files.
4855 ## <param name="domain">
4857 ## Domain to not audit.
4861 interface(`userdom_dontaudit_read_all_user_home_content_files',`
4863 attribute user_home_type;
4866 dontaudit $1 user_home_type:file read_file_perms;
4869 ########################################
4871 ## Do not audit attempts to read all user tmp content files.
4873 ## <param name="domain">
4875 ## Domain to not audit.
4879 interface(`userdom_dontaudit_read_all_user_tmp_content_files',`
4881 attribute user_tmp_type;
4884 dontaudit $1 user_tmp_type:file read_file_perms;
4887 #######################################
4889 ## Read and write unpriviledged user SysV sempaphores.
4891 ## <param name="domain">
4893 ## Domain allowed access.
4897 interface(`userdom_rw_unpriv_user_semaphores',`
4899 attribute unpriv_userdomain;
4902 allow $1 unpriv_userdomain:sem rw_sem_perms;