-## Create, read, write, and delete named sockets -## in a user home subdirectory. +## Create objects in a user home directory +## with an automatic type transition to +## a specified private type. ##
##
## This is a templated interface, and should only
@@ -1588,49 +1591,35 @@ template(`userdom_manage_user_home_subdir_sockets',`
##
## Domain allowed access.
##
-##
+##
+## The type of the object to create.
+##
+##
## The class of the object to be created. If not
## specified, file is used.
##
-##
-## The type of the object to create. If this is
-## not specified, the regular home directory
-## type is used.
-##
#
-template(`userdom_create_user_home',`
+template(`userdom_filetrans_user_home_dir',`
gen_require(`
- type $1_home_dir_t, $1_home_t;
+ type $1_home_dir_t;
')
files_search_home($2)
-
allow $2 $1_home_dir_t:dir rw_dir_perms;
-
- ifelse(`$4',`',`
- ifelse(`$3',`',`
- type_transition $2 $1_home_dir_t:file $1_home_t;
- ',`
- type_transition $2 $1_home_dir_t:$3 $1_home_t;
- ')
- ',`
- ifelse(`$3',`',`
- type_transition $2 $1_home_dir_t:file $4;
- ',`
- type_transition $2 $1_home_dir_t:$3 $4;
- ')
- ')
+ type_transition $2 $1_home_dir_t:$4 $3;
')
########################################
##
-## Create objects in a user home directory with
-## a type transition to a specified type.
+## Create objects in a user home directory
+## with an automatic type transition to
+## the user home file type.
##
## This is a templated interface, and should only
@@ -1644,25 +1633,19 @@ template(`userdom_create_user_home',`
##
## Domain allowed access.
##
-##
-## The type of the object to create. If this is
-## not specified, the regular home directory
-## type is used.
-##
##
## The class of the object to be created. If not
## specified, file is used.
##
#
-template(`userdom_filetrans_user_home_dir',`
+template(`userdom_filetrans_user_home',`
gen_require(`
type $1_home_dir_t, $1_home_t;
')
files_search_home($2)
allow $2 $1_home_dir_t:dir rw_dir_perms;
-
- type_transition $2 $1_home_dir_t:$4 $3;
+ type_transition $2 $1_home_dir_t:$3 $1_home_t;
')
########################################