--- nsaserefpolicy/policy/modules/apps/thunderbird.fc	2008-08-07 11:15:02.000000000 -0400
+++ serefpolicy-3.5.5/policy/modules/apps/thunderbird.fc	2008-08-14 13:53:54.000000000 -0400
@@ -3,4 +3,4 @@
 #
 /usr/bin/thunderbird.*			--	gen_context(system_u:object_r:thunderbird_exec_t,s0)
 
-HOME_DIR/\.thunderbird(/.*)?			gen_context(system_u:object_r:ROLE_thunderbird_home_t,s0)
+HOME_DIR/\.thunderbird(/.*)?			gen_context(system_u:object_r:user_thunderbird_home_t,s0)
--- nsaserefpolicy/policy/modules/apps/thunderbird.if	2008-08-07 11:15:03.000000000 -0400
+++ serefpolicy-3.5.5/policy/modules/apps/thunderbird.if	2008-08-14 13:53:54.000000000 -0400
@@ -43,9 +43,9 @@
 	application_domain($1_thunderbird_t, thunderbird_exec_t)
 	role $3 types $1_thunderbird_t;
 
-	type $1_thunderbird_home_t alias $1_thunderbird_rw_t;
-	files_poly_member($1_thunderbird_home_t)
-	userdom_user_home_content($1, $1_thunderbird_home_t)
+	ifelse(`$1',`user',`',`
+		typealias user_thunderbird_home_t alias $1_thunderbird_home_t;
+	')
 
 	type $1_thunderbird_tmpfs_t;
 	files_tmpfs_file($1_thunderbird_tmpfs_t)
@@ -64,9 +64,9 @@
 	allow $1_thunderbird_t self:shm { read write create destroy unix_read unix_write };
 
 	# Access ~/.thunderbird
-	manage_dirs_pattern($1_thunderbird_t, $1_thunderbird_home_t, $1_thunderbird_home_t)
-	manage_files_pattern($1_thunderbird_t, $1_thunderbird_home_t, $1_thunderbird_home_t)
-	manage_lnk_files_pattern($1_thunderbird_t, $1_thunderbird_home_t, $1_thunderbird_home_t)
+	manage_dirs_pattern($1_thunderbird_t, user_thunderbird_home_t, user_thunderbird_home_t)
+	manage_files_pattern($1_thunderbird_t, user_thunderbird_home_t, user_thunderbird_home_t)
+	manage_lnk_files_pattern($1_thunderbird_t, user_thunderbird_home_t, user_thunderbird_home_t)
 	userdom_search_user_home_dirs($1, $1_thunderbird_t)
 
 	manage_files_pattern($1_thunderbird_t, $1_thunderbird_tmpfs_t, $1_thunderbird_tmpfs_t)
@@ -87,13 +87,13 @@
 	ps_process_pattern($2,$1_thunderbird_t)
 
 	# Access ~/.thunderbird
-	manage_dirs_pattern($2, $1_thunderbird_home_t, $1_thunderbird_home_t)
-	manage_files_pattern($2, $1_thunderbird_home_t, $1_thunderbird_home_t)
-	manage_lnk_files_pattern($2, $1_thunderbird_home_t, $1_thunderbird_home_t)
-
-	relabel_dirs_pattern($2, $1_thunderbird_home_t, $1_thunderbird_home_t)
-	relabel_files_pattern($2, $1_thunderbird_home_t, $1_thunderbird_home_t)
-	relabel_lnk_files_pattern($2, $1_thunderbird_home_t, $1_thunderbird_home_t)
+	manage_dirs_pattern($2, user_thunderbird_home_t, user_thunderbird_home_t)
+	manage_files_pattern($2, user_thunderbird_home_t, user_thunderbird_home_t)
+	manage_lnk_files_pattern($2, user_thunderbird_home_t, user_thunderbird_home_t)
+
+	relabel_dirs_pattern($2, user_thunderbird_home_t, user_thunderbird_home_t)
+	relabel_files_pattern($2, user_thunderbird_home_t, user_thunderbird_home_t)
+	relabel_lnk_files_pattern($2, user_thunderbird_home_t, user_thunderbird_home_t)
 	
 	# Allow netstat
 	kernel_read_network_state($1_thunderbird_t)
@@ -153,10 +153,10 @@
 	miscfiles_read_fonts($1_thunderbird_t)
 	miscfiles_read_localization($1_thunderbird_t)
 
-	userdom_manage_user_tmp_dirs($1, $1_thunderbird_t)
+	unprivuser_manage_tmp_dirs($1_thunderbird_t)
 	userdom_read_user_tmp_files($1, $1_thunderbird_t)
 	userdom_write_user_tmp_sockets($1, $1_thunderbird_t)
-	userdom_manage_user_tmp_sockets($1, $1_thunderbird_t)
+	unprivuser_manage_tmp_sockets($1_thunderbird_t)
 	# .kde/....gtkrc
 	userdom_read_user_home_content_files($1, $1_thunderbird_t)
 
@@ -294,8 +294,8 @@
 		files_search_home($1_thunderbird_t)
 		files_tmp_filetrans($1_thunderbird_t, $1_untrusted_content_tmp_t,file)
 		files_tmp_filetrans($1_thunderbird_t, $1_untrusted_content_tmp_t,dir)
-		userdom_manage_user_untrusted_content_files($1, $1_thunderbird_t)
-		userdom_manage_user_untrusted_content_tmp_files($1, $1_thunderbird_t)
+		unprivuser_manage_untrusted_content_files($1_thunderbird_t)
+		unprivuser_manage_untrusted_content_tmp_files($1_thunderbird_t)
 		userdom_user_home_dir_filetrans($1, $1_thunderbird_t, $1_untrusted_content_tmp_t, { file dir })
 		userdom_user_home_content_filetrans($1, $1_thunderbird_t, $1_untrusted_content_tmp_t, { file dir })
 	',`
--- nsaserefpolicy/policy/modules/apps/thunderbird.te	2008-08-07 11:15:03.000000000 -0400
+++ serefpolicy-3.5.5/policy/modules/apps/thunderbird.te	2008-08-14 13:53:54.000000000 -0400
@@ -8,3 +8,7 @@
 
 type thunderbird_exec_t;
 application_executable_file(thunderbird_exec_t)
+
+type user_thunderbird_home_t alias user_thunderbird_rw_t;
+userdom_user_home_content(user, user_thunderbird_home_t)
+
