##
-## Create, read, write, and delete symbolic links
+## Create, read, write, and delete directories
## in a user home subdirectory.
##
##
@@ -1180,7 +1209,7 @@ template(`userdom_manage_user_home_subdirs',`
## Domain allowed access.
##
#
-template(`userdom_dontauit_setattr_user_home_files',`
+template(`userdom_dontaudit_setattr_user_home_files',`
gen_require(`
type $1_home_dir_t, $1_home_t;
')
@@ -1216,17 +1245,17 @@ template(`userdom_read_user_home_files',`
files_search_home($2)
allow $2 $1_home_dir_t:dir search;
- allow $2 $1_home_t:dir search;
+ allow $2 $1_home_t:dir search_dir_perms;
allow $2 $1_home_t:file r_file_perms;
')
########################################
##
-## Do not audit attempts to execute user home files.
+## Do not audit attempts to read user home files.
##
##
##
-## Do not audit attempts to execute user home files.
+## Do not audit attempts to read user home files.
##
##
## This is a templated interface, and should only
@@ -1238,15 +1267,48 @@ template(`userdom_read_user_home_files',`
## is the prefix for user_t).
##
##
-## Domain allowed access.
+## Domain to not audit.
##
#
-template(`userdom_dontauit_exec_user_home_files',`
+template(`userdom_dontaudit_read_user_home_files',`
gen_require(`
type $1_home_t;
')
- dontaudit $2 $1_home_t:file execute;
+ dontaudit $2 $1_home_t:dir r_dir_perms;
+ dontaudit $2 $1_home_t:file r_file_perms;
+')
+
+########################################
+##
+## Read user home subdirectory symbolic links.
+##
+##
+##
+## Read user home subdirectory symbolic links.
+##
+##
+## This is a templated interface, and should only
+## be called from a per-userdomain template.
+##
+##
+##
+## The prefix of the user domain (e.g., user
+## is the prefix for user_t).
+##
+##
+## Domain allowed access.
+##
+#
+template(`userdom_read_user_home_symlinks',`
+ gen_require(`
+ type $1_home_dir_t, $1_home_t;
+ ')
+
+ files_search_home($2)
+ allow $2 $1_home_dir_t:dir search;
+ allow $2 $1_home_t:dir search;
+ allow $2 $1_home_t:lnk_file r_file_perms;
')
########################################
@@ -1283,6 +1345,35 @@ template(`userdom_exec_user_home_files',`
########################################
##
+## Do not audit attempts to execute user home files.
+##
+##
+##
+## Do not audit attempts to execute user home files.
+##
+##
+## This is a templated interface, and should only
+## be called from a per-userdomain template.
+##
+##
+##
+## The prefix of the user domain (e.g., user
+## is the prefix for user_t).
+##
+##
+## Domain allowed access.
+##
+#
+template(`userdom_dontaudit_exec_user_home_files',`
+ gen_require(`
+ type $1_home_t;
+ ')
+
+ dontaudit $2 $1_home_t:file execute;
+')
+
+########################################
+##
## Create, read, write, and delete files
## in a user home subdirectory.
##
@@ -1504,6 +1595,162 @@ template(`userdom_write_user_tmp_sockets',`
########################################
##
+## List user temporary directories.
+##
+##
+##
+## List user temporary directories.
+##
+##
+## This is a templated interface, and should only
+## be called from a per-userdomain template.
+##
+##
+##
+## The prefix of the user domain (e.g., user
+## is the prefix for user_t).
+##
+##
+## Domain allowed access.
+##
+#
+template(`userdom_list_user_tmp',`
+ gen_require(`
+ type $1_tmp_t;
+ ')
+
+ files_search_tmp($2)
+ allow $2 $1_tmp_t:dir r_dir_perms;
+')
+
+########################################
+##
+## Do not audit attempts to list user
+## temporary directories.
+##
+##
+##
+## Do not audit attempts to list user
+## temporary directories.
+##
+##
+## This is a templated interface, and should only
+## be called from a per-userdomain template.
+##
+##
+##
+## The prefix of the user domain (e.g., user
+## is the prefix for user_t).
+##
+##
+## Domain to not audit.
+##
+#
+template(`userdom_dontaudit_list_user_tmp',`
+ gen_require(`
+ type $1_tmp_t;
+ ')
+
+ dontaudit $2 $1_tmp_t:dir r_dir_perms;
+')
+
+########################################
+##
+## Read user temporary files.
+##
+##
+##
+## Read user temporary files.
+##
+##
+## This is a templated interface, and should only
+## be called from a per-userdomain template.
+##
+##
+##
+## The prefix of the user domain (e.g., user
+## is the prefix for user_t).
+##
+##
+## Domain allowed access.
+##
+#
+template(`userdom_read_user_tmp_files',`
+ gen_require(`
+ type $1_tmp_t;
+ ')
+
+ files_search_tmp($2)
+ allow $2 $1_tmp_t:dir rw_dir_perms;
+ allow $2 $1_tmp_t:file r_file_perms;
+')
+
+########################################
+##
+## Do not audit attempts to read users
+## temporary files.
+##
+##
+##
+## Do not audit attempts to read users
+## temporary files.
+##
+##
+## This is a templated interface, and should only
+## be called from a per-userdomain template.
+##
+##
+##
+## The prefix of the user domain (e.g., user
+## is the prefix for user_t).
+##
+##
+## Domain to not audit.
+##
+#
+template(`userdom_dontaudit_read_user_tmp_files',`
+ gen_require(`
+ type $1_tmp_t;
+ ')
+
+ dontaudit $2 $1_tmp_t:file r_file_perms;
+')
+
+########################################
+##
+## Read user
+## temporary symbolic links.
+##
+##
+##
+## Read user
+## temporary symbolic links.
+##
+##
+## This is a templated interface, and should only
+## be called from a per-userdomain template.
+##
+##
+##
+## The prefix of the user domain (e.g., user
+## is the prefix for user_t).
+##
+##
+## Domain allowed access.
+##
+#
+template(`userdom_read_user_tmp_symlinks',`
+ gen_require(`
+ type $1_tmp_t;
+ ')
+
+ files_search_tmp($2)
+ allow $2 $1_tmp_t:dir rw_dir_perms;
+ allow $2 $1_tmp_t:lnk_file r_file_perms;
+')
+
+########################################
+##
## Create, read, write, and delete user
## temporary directories.
##
@@ -1668,6 +1915,308 @@ template(`userdom_manage_user_tmp_sockets',`
########################################
##
+## List users untrusted directories.
+##
+##
+##
+## List users untrusted directories.
+##
+##
+## This is a templated interface, and should only
+## be called from a per-userdomain template.
+##
+##
+##
+## The prefix of the user domain (e.g., user
+## is the prefix for user_t).
+##
+##
+## Domain allowed access.
+##
+#
+template(`userdom_list_user_untrusted_content',`
+ gen_require(`
+ type $1_untrusted_content_t;
+ ')
+
+ allow $2 $1_untrusted_content_t:dir r_dir_perms;
+')
+
+########################################
+##
+## Do not audit attempts to list user
+## untrusted directories.
+##
+##
+##
+## Do not audit attempts to read user
+## untrusted directories.
+##
+##
+## This is a templated interface, and should only
+## be called from a per-userdomain template.
+##
+##
+##
+## The prefix of the user domain (e.g., user
+## is the prefix for user_t).
+##
+##
+## Domain to not audit.
+##
+#
+template(`userdom_dontaudit_list_user_untrusted_content',`
+ gen_require(`
+ type $1_untrusted_content_t;
+ ')
+
+ dontaudit $2 $1_untrusted_content_t:dir r_dir_perms;
+')
+
+########################################
+##
+## Read user untrusted files.
+##
+##
+##
+## Read user untrusted files.
+##
+##
+## This is a templated interface, and should only
+## be called from a per-userdomain template.
+##
+##
+##
+## The prefix of the user domain (e.g., user
+## is the prefix for user_t).
+##
+##
+## Domain allowed access.
+##
+#
+template(`userdom_read_user_untrusted_content_files',`
+ gen_require(`
+ type $1_untrusted_content_t;
+ ')
+
+ allow $2 $1_untrusted_content_t:dir rw_dir_perms;
+ allow $2 $1_untrusted_content_t:file r_file_perms;
+')
+
+########################################
+##
+## Do not audit attempts to read users
+## untrusted files.
+##
+##
+##
+## Do not audit attempts to read users
+## untrusted files.
+##
+##
+## This is a templated interface, and should only
+## be called from a per-userdomain template.
+##
+##
+##
+## The prefix of the user domain (e.g., user
+## is the prefix for user_t).
+##
+##
+## Domain to not audit.
+##
+#
+template(`userdom_dontaudit_read_user_untrusted_content_files',`
+ gen_require(`
+ type $1_untrusted_content_t;
+ ')
+
+ dontaudit $2 $1_untrusted_content_t:file r_file_perms;
+')
+
+########################################
+##
+## Read user untrusted symbolic links.
+##
+##
+##
+## Read user untrusted symbolic links.
+##
+##
+## This is a templated interface, and should only
+## be called from a per-userdomain template.
+##
+##
+##
+## The prefix of the user domain (e.g., user
+## is the prefix for user_t).
+##
+##
+## Domain allowed access.
+##
+#
+template(`userdom_read_user_untrusted_content_symlinks',`
+ gen_require(`
+ type $1_untrusted_content_t;
+ ')
+
+ allow $2 $1_untrusted_content_t:dir rw_dir_perms;
+ allow $2 $1_untrusted_content_t:lnk_file r_file_perms;
+')
+
+########################################
+##
+## List users temporary untrusted directories.
+##
+##
+##
+## List users temporary untrusted directories.
+##
+##
+## This is a templated interface, and should only
+## be called from a per-userdomain template.
+##
+##
+##
+## The prefix of the user domain (e.g., user
+## is the prefix for user_t).
+##
+##
+## Domain allowed access.
+##
+#
+template(`userdom_list_user_tmp_untrusted_content',`
+ gen_require(`
+ type $1_untrusted_content_tmp_t;
+ ')
+
+ allow $2 $1_untrusted_content_tmp_t:dir r_dir_perms;
+')
+
+########################################
+##
+## Do not audit attempts to list user
+## temporary untrusted directories.
+##
+##
+##
+## Do not audit attempts to list user
+## temporary directories.
+##
+##
+## This is a templated interface, and should only
+## be called from a per-userdomain template.
+##
+##
+##
+## The prefix of the user domain (e.g., user
+## is the prefix for user_t).
+##
+##
+## Domain to not audit.
+##
+#
+template(`userdom_dontaudit_list_user_tmp_untrusted_content',`
+ gen_require(`
+ type $1_untrusted_content_tmp_t;
+ ')
+
+ dontaudit $2 $1_untrusted_content_tmp_t:dir r_dir_perms;
+')
+
+########################################
+##
+## Read user temporary untrusted files.
+##
+##
+##
+## Read user temporary untrusted files.
+##
+##
+## This is a templated interface, and should only
+## be called from a per-userdomain template.
+##
+##
+##
+## The prefix of the user domain (e.g., user
+## is the prefix for user_t).
+##
+##
+## Domain allowed access.
+##
+#
+template(`userdom_read_user_tmp_untrusted_content_files',`
+ gen_require(`
+ type $1_untrusted_content_tmp_t;
+ ')
+
+ allow $2 $1_untrusted_content_tmp_t:dir rw_dir_perms;
+ allow $2 $1_untrusted_content_tmp_t:file r_file_perms;
+')
+
+########################################
+##
+## Do not audit attempts to read users
+## temporary untrusted files.
+##
+##
+##
+## Do not audit attempts to read users
+## temporary untrusted files.
+##
+##
+## This is a templated interface, and should only
+## be called from a per-userdomain template.
+##
+##
+##
+## The prefix of the user domain (e.g., user
+## is the prefix for user_t).
+##
+##
+## Domain to not audit.
+##
+#
+template(`userdom_dontaudit_read_user_tmp_untrusted_content_files',`
+ gen_require(`
+ type $1_untrusted_content_tmp_t;
+ ')
+
+ dontaudit $2 $1_untrusted_content_tmp_t:file r_file_perms;
+')
+
+########################################
+##
+## Read user temporary untrusted symbolic links.
+##
+##
+##
+## Read user temporary untrusted symbolic links.
+##
+##
+## This is a templated interface, and should only
+## be called from a per-userdomain template.
+##
+##
+##
+## The prefix of the user domain (e.g., user
+## is the prefix for user_t).
+##
+##
+## Domain allowed access.
+##
+#
+template(`userdom_read_user_tmp_untrusted_content_symlinks',`
+ gen_require(`
+ type $1_untrusted_content_tmp_t;
+ ')
+
+ allow $2 $1_untrusted_content_tmp_t:dir rw_dir_perms;
+ allow $2 $1_untrusted_content_tmp_t:lnk_file r_file_perms;
+')
+
+########################################
+##
## Read and write a user domain tty and pty.
##
##
@@ -1834,7 +2383,7 @@ interface(`userdom_shell_domtrans_sysadm',`
## Search the staff users home directory.
##