--- nsaserefpolicy/policy/modules/roles/guest.fc	1969-12-31 19:00:00.000000000 -0500
+++ serefpolicy-3.5.5/policy/modules/roles/guest.fc	2008-08-14 13:53:54.000000000 -0400
@@ -0,0 +1 @@
+# file contexts handled by userdomain and genhomedircon
--- nsaserefpolicy/policy/modules/roles/guest.if	1969-12-31 19:00:00.000000000 -0500
+++ serefpolicy-3.5.5/policy/modules/roles/guest.if	2008-08-14 13:53:54.000000000 -0400
@@ -0,0 +1,161 @@
+## <summary>Least privledge terminal user role</summary>
+
+########################################
+## <summary>
+##	Change to the guest role.
+## </summary>
+## <param name="prefix">
+##	<summary>
+##	The prefix of the user role (e.g., user
+##	is the prefix for user_r).
+##	</summary>
+## </param>
+## <rolecap/>
+#
+template(`guest_role_change_template',`
+	userdom_role_change_template($1, guest)
+')
+
+########################################
+## <summary>
+##	Change from the guest role.
+## </summary>
+## <desc>
+##	<p>
+##	Change from the guest role to
+##	the specified role.
+##	</p>
+##	<p>
+##	This is a template to support third party modules
+##	and its use is not allowed in upstream reference
+##	policy.
+##	</p>
+## </desc>
+## <param name="prefix">
+##	<summary>
+##	The prefix of the user role (e.g., user
+##	is the prefix for user_r).
+##	</summary>
+## </param>
+## <rolecap/>
+#
+template(`guest_role_change_to_template',`
+	userdom_role_change_template(guest, $1)
+')
+
+########################################
+## <summary>
+##	Search the guest users home directory.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+#
+interface(`guest_search_home_dirs',`
+	gen_require(`
+		type guest_home_dir_t;
+	')
+
+	files_search_home($1)
+	allow $1 guest_home_dir_t:dir search_dir_perms;
+')
+
+########################################
+## <summary>
+##	Do not audit attempts to search the guest
+##	users home directory.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain to not audit.
+##	</summary>
+## </param>
+#
+interface(`guest_dontaudit_search_home_dirs',`
+	gen_require(`
+		type guest_home_dir_t;
+	')
+
+	dontaudit $1 guest_home_dir_t:dir search_dir_perms;
+')
+
+########################################
+## <summary>
+##	Create, read, write, and delete guest
+##	home directories.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+#
+interface(`guest_manage_home_dirs',`
+	gen_require(`
+		type guest_home_dir_t;
+	')
+
+	files_search_home($1)
+	allow $1 guest_home_dir_t:dir manage_dir_perms;
+')
+
+########################################
+## <summary>
+##	Relabel to guest home directories.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+#
+interface(`guest_relabelto_home_dirs',`
+	gen_require(`
+		type guest_home_dir_t;
+	')
+
+	files_search_home($1)
+	allow $1 guest_home_dir_t:dir relabelto;
+')
+
+########################################
+## <summary>
+##	Do not audit attempts to append to the guest
+##	users home directory.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain to not audit.
+##	</summary>
+## </param>
+#
+interface(`guest_dontaudit_append_home_content_files',`
+	gen_require(`
+		type guest_home_t;
+	')
+
+	dontaudit $1 guest_home_t:file append;
+')
+
+########################################
+## <summary>
+##	Read files in the guest users home directory.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+#
+interface(`guest_read_home_content_files',`
+	gen_require(`
+		type guest_home_dir_t, guest_home_t;
+	')
+
+	files_search_home($1)
+	allow $1 { guest_home_dir_t guest_home_t }:dir list_dir_perms;
+	read_files_pattern($1, { guest_home_dir_t guest_home_t }, guest_home_t)
+	read_lnk_files_pattern($1, { guest_home_dir_t guest_home_t }, guest_home_t)
+')
--- nsaserefpolicy/policy/modules/roles/guest.te	1969-12-31 19:00:00.000000000 -0500
+++ serefpolicy-3.5.5/policy/modules/roles/guest.te	2008-08-14 13:53:54.000000000 -0400
@@ -0,0 +1,44 @@
+
+policy_module(guest, 1.0.0)
+
+########################################
+#
+# Declarations
+#
+
+role xguest_r;
+
+userdom_restricted_user_template(guest)
+
+########################################
+#
+# Local policy
+#
+
+optional_policy(`
+	java_per_role_template(guest, guest_t, guest_r)
+')
+
+optional_policy(`
+	mono_per_role_template(guest, guest_t, guest_r)
+')
+
+optional_policy(`
+	gen_require(`
+		type xguest_mozilla_t;
+	')
+
+	dbus_chat_user_bus(xguest, xguest_mozilla_t)
+	dbus_connectto_user_bus(xguest, xguest_mozilla_t)
+')
+
+
+optional_policy(`
+	gen_require(`
+		type openoffice_exec_t;
+		type xguest_mozilla_t;
+		type xguest_openoffice_t;
+	')
+	
+	domtrans_pattern(xguest_mozilla_t, openoffice_exec_t, xguest_openoffice_t)
+')
