-## Create, read, write, and delete named sockets -## in a user home subdirectory. -##
-##-## This is a templated interface, and should only -## be called from a per-userdomain template. -##
-##-## 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 +## a specified private type. ##
##
## This is a templated interface, and should only
@@ -1645,9 +1592,7 @@ 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 type of the object to create.
##
##
## The class of the object to be created. If not
@@ -1655,14 +1600,52 @@ template(`userdom_create_user_home',`
##
#
template(`userdom_filetrans_user_home_dir',`
+ gen_require(`
+ type $1_home_dir_t;
+ ')
+
+ files_search_home($2)
+ allow $2 $1_home_dir_t:dir rw_dir_perms;
+ type_transition $2 $1_home_dir_t:$4 $3;
+')
+
+########################################
+##
+## 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
+## be called from a per-userdomain template.
+##