diff --git a/booleans-targeted.conf b/booleans-targeted.conf
index afa1226..a970450 100644
--- a/booleans-targeted.conf
+++ b/booleans-targeted.conf
@@ -1,6 +1,6 @@
 # Allow making anonymous memory executable, e.g.for runtime-code generation or executable stack.
 # 
-allow_execmem = true
+allow_execmem = false
 
 # Allow making a modified private filemapping executable (text relocation).
 # 
@@ -8,7 +8,7 @@ allow_execmod = false
 
 # Allow making the stack executable via mprotect.Also requires allow_execmem.
 # 
-allow_execstack = true
+allow_execstack = false
 
 # Allow ftpd to read cifs directories.
 # 
@@ -242,3 +242,6 @@ samba_domain_controller = false
 # 
 samba_run_unconfined = true
 
+# Allows XServer to execute writable memory
+# 
+allow_xserver_execmem = true
diff --git a/modules-targeted.conf b/modules-targeted.conf
index 38fd1b4..d64ca1a 100644
--- a/modules-targeted.conf
+++ b/modules-targeted.conf
@@ -378,13 +378,6 @@ gpm = base
 # 
 ethereal = module
 
-# Layer: apps
-# Module: evolution
-#
-# Evolution email client
-# 
-evolution = module
-
 # Layer: services
 # Module: fail2ban
 #
@@ -674,6 +667,14 @@ lvm = base
 # 
 mailman = base
 
+
+# Layer: services
+# Module: mailscanner
+#
+# Anti-Virus and Anti-Spam Filter
+# 
+mailscanner = module
+
 # Layer: kernel
 # Module: mcs
 # Required in base
@@ -1252,13 +1253,6 @@ tzdata = base
 # 
 userhelper = module
 
-# Layer: apps
-# Module: thunderbird
-#
-# Thunderbird email client
-# 
-thunderbird = module
-
 # Layer: services
 # Module: tor
 #
@@ -1405,7 +1399,7 @@ terminal = base
 #
 # Manage temporary directory sizes and file ages
 # 
-tmpreaper = off
+tmpreaper = module
 
 # Layer: admin
 # Module: amtu
@@ -1470,3 +1464,23 @@ rpcbind = module
 # 
 vmware = module
 
+# Layer: users
+# Module: guest
+#
+# Minimally privs guest account on tty logins
+# 
+guest = module
+
+# Layer: users
+# Module: logadm
+#
+# Minimally prived root role for managing logging system
+# 
+logadm = module
+
+# Layer: users
+# Module: webadm
+#
+# Minimally prived root role for managing apache
+# 
+webadm = module
diff --git a/policy-20070525.patch b/policy-20070525.patch
index e5ffae8..1f41e12 100644
--- a/policy-20070525.patch
+++ b/policy-20070525.patch
@@ -1,6 +1,83 @@
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/config/appconfig-strict-mls/staff_u_default_contexts serefpolicy-3.0.1/config/appconfig-strict-mls/staff_u_default_contexts
+--- nsaserefpolicy/config/appconfig-strict-mls/staff_u_default_contexts	1969-12-31 19:00:00.000000000 -0500
++++ serefpolicy-3.0.1/config/appconfig-strict-mls/staff_u_default_contexts	2007-06-19 17:06:27.000000000 -0400
+@@ -0,0 +1,9 @@
++system_r:local_login_t:s0	staff_r:staff_t:s0 sysadm_r:sysadm_t:s0
++system_r:remote_login_t:s0	staff_r:staff_t:s0
++system_r:sshd_t:s0		staff_r:staff_t:s0 sysadm_r:sysadm_t:s0
++system_r:crond_t:s0		staff_r:staff_crond_t:s0 sysadm_r:sysadm_crond_t:s0 system_r:system_crond_t:s0 mailman_r:user_crond_t:s0
++system_r:xdm_t:s0		staff_r:staff_t:s0
++staff_r:staff_su_t:s0		staff_r:staff_t:s0
++staff_r:staff_sudo_t:s0		staff_r:staff_t:s0
++sysadm_r:sysadm_su_t:s0		sysadm_r:sysadm_t:s0 
++sysadm_r:sysadm_sudo_t:s0	sysadm_r:sysadm_t:s0
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/config/appconfig-strict-mls/user_u_default_contexts serefpolicy-3.0.1/config/appconfig-strict-mls/user_u_default_contexts
+--- nsaserefpolicy/config/appconfig-strict-mls/user_u_default_contexts	1969-12-31 19:00:00.000000000 -0500
++++ serefpolicy-3.0.1/config/appconfig-strict-mls/user_u_default_contexts	2007-06-19 17:06:27.000000000 -0400
+@@ -0,0 +1,7 @@
++system_r:local_login_t:s0	user_r:user_t:s0
++system_r:remote_login_t:s0	user_r:user_t:s0
++system_r:sshd_t:s0		user_r:user_t:s0
++system_r:crond_t:s0		user_r:user_crond_t:s0
++system_r:xdm_t:s0		user_r:user_t:s0
++user_r:user_su_t:s0		user_r:user_t:s0
++user_r:user_sudo_t:s0		user_r:user_t:s0
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/config/appconfig-targeted-mcs/default_type serefpolicy-3.0.1/config/appconfig-targeted-mcs/default_type
+--- nsaserefpolicy/config/appconfig-targeted-mcs/default_type	2007-05-25 09:09:09.000000000 -0400
++++ serefpolicy-3.0.1/config/appconfig-targeted-mcs/default_type	2007-06-19 17:06:27.000000000 -0400
+@@ -1 +1,4 @@
+ system_r:unconfined_t
++sysadm_r:sysadm_t
++staff_r:staff_t
++user_r:user_t
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/config/appconfig-targeted-mcs/guest_u_default_contexts serefpolicy-3.0.1/config/appconfig-targeted-mcs/guest_u_default_contexts
+--- nsaserefpolicy/config/appconfig-targeted-mcs/guest_u_default_contexts	1969-12-31 19:00:00.000000000 -0500
++++ serefpolicy-3.0.1/config/appconfig-targeted-mcs/guest_u_default_contexts	2007-06-19 17:06:27.000000000 -0400
+@@ -0,0 +1,4 @@
++system_r:local_login_t:s0	guest_r:guest_t:s0
++system_r:remote_login_t:s0	guest_r:guest_t:s0
++system_r:sshd_t:s0		guest_r:guest_t:s0
++system_r:crond_t:s0		guest_r:guest_crond_t:s0
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/config/appconfig-targeted-mcs/initrc_context serefpolicy-3.0.1/config/appconfig-targeted-mcs/initrc_context
+--- nsaserefpolicy/config/appconfig-targeted-mcs/initrc_context	2007-05-25 09:09:09.000000000 -0400
++++ serefpolicy-3.0.1/config/appconfig-targeted-mcs/initrc_context	2007-06-19 17:06:27.000000000 -0400
+@@ -1 +1 @@
+-user_u:system_r:initrc_t:s0
++system_u:system_r:initrc_t:s0
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/config/appconfig-targeted-mcs/seusers serefpolicy-3.0.1/config/appconfig-targeted-mcs/seusers
+--- nsaserefpolicy/config/appconfig-targeted-mcs/seusers	2007-05-31 15:35:39.000000000 -0400
++++ serefpolicy-3.0.1/config/appconfig-targeted-mcs/seusers	2007-06-19 17:06:27.000000000 -0400
+@@ -1,2 +1,2 @@
+ root:root:s0-mcs_systemhigh
+-__default__:user_u:s0
++__default__:system_u:s0
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/config/appconfig-targeted-mcs/staff_u_default_contexts serefpolicy-3.0.1/config/appconfig-targeted-mcs/staff_u_default_contexts
+--- nsaserefpolicy/config/appconfig-targeted-mcs/staff_u_default_contexts	1969-12-31 19:00:00.000000000 -0500
++++ serefpolicy-3.0.1/config/appconfig-targeted-mcs/staff_u_default_contexts	2007-06-19 17:06:27.000000000 -0400
+@@ -0,0 +1,9 @@
++system_r:local_login_t:s0	staff_r:staff_t:s0 sysadm_r:sysadm_t:s0
++system_r:remote_login_t:s0	staff_r:staff_t:s0
++system_r:sshd_t:s0		staff_r:staff_t:s0 sysadm_r:sysadm_t:s0
++system_r:crond_t:s0		staff_r:staff_crond_t:s0 sysadm_r:sysadm_crond_t:s0 system_r:system_crond_t:s0 mailman_r:user_crond_t:s0
++system_r:xdm_t:s0		staff_r:staff_t:s0
++staff_r:staff_su_t:s0		staff_r:staff_t:s0
++staff_r:staff_sudo_t:s0		staff_r:staff_t:s0
++sysadm_r:sysadm_su_t:s0		sysadm_r:sysadm_t:s0 
++sysadm_r:sysadm_sudo_t:s0	sysadm_r:sysadm_t:s0
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/config/appconfig-targeted-mcs/user_u_default_contexts serefpolicy-3.0.1/config/appconfig-targeted-mcs/user_u_default_contexts
+--- nsaserefpolicy/config/appconfig-targeted-mcs/user_u_default_contexts	1969-12-31 19:00:00.000000000 -0500
++++ serefpolicy-3.0.1/config/appconfig-targeted-mcs/user_u_default_contexts	2007-06-19 17:06:27.000000000 -0400
+@@ -0,0 +1,7 @@
++system_r:local_login_t:s0	user_r:user_t:s0
++system_r:remote_login_t:s0	user_r:user_t:s0
++system_r:sshd_t:s0		user_r:user_t:s0
++system_r:crond_t:s0		user_r:user_crond_t:s0
++system_r:xdm_t:s0		user_r:user_t:s0
++user_r:user_su_t:s0		user_r:user_t:s0
++user_r:user_sudo_t:s0		user_r:user_t:s0
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/Makefile serefpolicy-3.0.1/Makefile
 --- nsaserefpolicy/Makefile	2007-05-29 13:53:56.000000000 -0400
-+++ serefpolicy-3.0.1/Makefile	2007-05-30 15:54:27.000000000 -0400
++++ serefpolicy-3.0.1/Makefile	2007-06-19 17:06:27.000000000 -0400
 @@ -158,8 +158,18 @@
  headerdir = $(modpkgdir)/include
  docsdir = $(prefix)/share/doc/$(PKGNAME)
@@ -32,7 +109,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/Makefile serefpolicy-3.0.1/M
  	CHECKMODULE += -M
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/man/man8/ftpd_selinux.8 serefpolicy-3.0.1/man/man8/ftpd_selinux.8
 --- nsaserefpolicy/man/man8/ftpd_selinux.8	2007-05-25 09:09:10.000000000 -0400
-+++ serefpolicy-3.0.1/man/man8/ftpd_selinux.8	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/man/man8/ftpd_selinux.8	2007-06-19 17:06:27.000000000 -0400
 @@ -12,7 +12,7 @@
  .TP
  chcon -R -t public_content_t /var/ftp
@@ -43,8 +120,8 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/man/man8/ftpd_selinux.8 sere
  chcon -t public_content_rw_t /var/ftp/incoming
  .TP
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/flask/access_vectors serefpolicy-3.0.1/policy/flask/access_vectors
---- nsaserefpolicy/policy/flask/access_vectors	2007-05-29 14:10:47.000000000 -0400
-+++ serefpolicy-3.0.1/policy/flask/access_vectors	2007-05-30 15:12:50.000000000 -0400
+--- nsaserefpolicy/policy/flask/access_vectors	2007-06-19 16:23:34.000000000 -0400
++++ serefpolicy-3.0.1/policy/flask/access_vectors	2007-06-22 14:07:33.000000000 -0400
 @@ -598,6 +598,8 @@
  	shmempwd
  	shmemgrp
@@ -63,9 +140,14 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/flask/access_vectors 
  }
  
  class key
+@@ -653,3 +657,4 @@
+ {
+ 	mmap_zero
+ }
++
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/global_tunables serefpolicy-3.0.1/policy/global_tunables
 --- nsaserefpolicy/policy/global_tunables	2007-05-29 14:10:59.000000000 -0400
-+++ serefpolicy-3.0.1/policy/global_tunables	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/global_tunables	2007-06-19 17:06:27.000000000 -0400
 @@ -133,3 +133,10 @@
  ## </desc>
  gen_tunable(write_untrusted_content,false)
@@ -79,7 +161,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/global_tunables seref
 +
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/mls serefpolicy-3.0.1/policy/mls
 --- nsaserefpolicy/policy/mls	2007-05-29 14:10:59.000000000 -0400
-+++ serefpolicy-3.0.1/policy/mls	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/mls	2007-06-19 17:06:27.000000000 -0400
 @@ -89,12 +89,14 @@
  mlsconstrain { file lnk_file fifo_file dir chr_file blk_file sock_file } { write create setattr relabelfrom append unlink link rename mounton }
  	(( l1 eq l2 ) or
@@ -153,7 +235,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/mls serefpolicy-3.0.1
  mlsconstrain association { polmatch }
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/acct.te serefpolicy-3.0.1/policy/modules/admin/acct.te
 --- nsaserefpolicy/policy/modules/admin/acct.te	2007-05-29 14:10:59.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/admin/acct.te	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/admin/acct.te	2007-06-19 17:06:27.000000000 -0400
 @@ -9,6 +9,7 @@
  type acct_t;
  type acct_exec_t;
@@ -164,7 +246,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/acct.te
  logging_log_file(acct_data_t)
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/alsa.fc serefpolicy-3.0.1/policy/modules/admin/alsa.fc
 --- nsaserefpolicy/policy/modules/admin/alsa.fc	2007-05-29 14:10:59.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/admin/alsa.fc	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/admin/alsa.fc	2007-06-19 17:06:27.000000000 -0400
 @@ -1,4 +1,7 @@
  
  /etc/alsa/pcm(/.*)?		gen_context(system_u:object_r:alsa_etc_rw_t,s0)
@@ -175,7 +257,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/alsa.fc
 +/sbin/alsactl 		--	gen_context(system_u:object_r:alsa_exec_t,s0)
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/alsa.te serefpolicy-3.0.1/policy/modules/admin/alsa.te
 --- nsaserefpolicy/policy/modules/admin/alsa.te	2007-05-29 14:10:59.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/admin/alsa.te	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/admin/alsa.te	2007-06-19 17:06:27.000000000 -0400
 @@ -20,20 +20,24 @@
  # Local policy
  #
@@ -221,7 +303,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/alsa.te
 +
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/amanda.te serefpolicy-3.0.1/policy/modules/admin/amanda.te
 --- nsaserefpolicy/policy/modules/admin/amanda.te	2007-05-29 14:10:59.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/admin/amanda.te	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/admin/amanda.te	2007-06-19 17:06:27.000000000 -0400
 @@ -70,7 +70,7 @@
  
  allow amanda_t self:capability { chown dac_override setuid kill };
@@ -255,134 +337,23 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/amanda.
  manage_files_pattern(amanda_t,amanda_log_t,amanda_log_t)
  manage_dirs_pattern(amanda_t,amanda_log_t,amanda_log_t)
  logging_log_filetrans(amanda_t,amanda_log_t,{ file dir })
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/amtu.fc serefpolicy-3.0.1/policy/modules/admin/amtu.fc
---- nsaserefpolicy/policy/modules/admin/amtu.fc	1969-12-31 19:00:00.000000000 -0500
-+++ serefpolicy-3.0.1/policy/modules/admin/amtu.fc	2007-05-30 15:12:50.000000000 -0400
-@@ -0,0 +1,3 @@
-+
-+/usr/bin/amtu    --    gen_context(system_u:object_r:amtu_exec_t,s0)
-+
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/amtu.if serefpolicy-3.0.1/policy/modules/admin/amtu.if
---- nsaserefpolicy/policy/modules/admin/amtu.if	1969-12-31 19:00:00.000000000 -0500
-+++ serefpolicy-3.0.1/policy/modules/admin/amtu.if	2007-05-30 15:12:50.000000000 -0400
-@@ -0,0 +1,53 @@
-+## <summary>
-+##	abstract Machine Test Utility 
-+## </summary>
-+
-+########################################
-+## <summary>
-+##	Execute amtu in the amtu domain.
-+## </summary>
-+## <param name="domain">
-+##	<summary>
-+##	The type of the process performing this action.
-+##	</summary>
-+## </param>
-+#
-+interface(`amtu_domtrans',`
-+	gen_require(`
-+		type amtu_t, amtu_exec_t;
-+	')
-+
-+	corecmd_search_bin($1)
-+	domtrans_pattern($1,amtu_exec_t,amtu_t)
-+')
-+
-+########################################
-+## <summary>
-+##	Execute amtu in the amtu domain, and
-+##	allow the specified role the amtu domain.
-+## </summary>
-+## <param name="domain">
-+##	<summary>
-+##	The type of the process performing this action.
-+##	</summary>
-+## </param>
-+## <param name="role">
-+##	<summary>
-+##	The role to be allowed the amtu domain.
-+##	</summary>
-+## </param>
-+## <param name="terminal">
-+##	<summary>
-+##	The type of the terminal allow the amtu domain to use.
-+##	</summary>
-+## </param>
-+#
-+interface(`amtu_run',`
-+	gen_require(`
-+		type amtu_t;
-+	')
-+
-+	amtu_domtrans($1)
-+	role $2 types amtu_t;
-+	allow amtu_t $3:chr_file rw_term_perms;
-+')
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/amtu.te serefpolicy-3.0.1/policy/modules/admin/amtu.te
---- nsaserefpolicy/policy/modules/admin/amtu.te	1969-12-31 19:00:00.000000000 -0500
-+++ serefpolicy-3.0.1/policy/modules/admin/amtu.te	2007-05-30 15:12:50.000000000 -0400
-@@ -0,0 +1,57 @@
-+policy_module(amtu,1.0.23)
-+
-+########################################
-+#
-+# Declarations
-+#
-+
-+type amtu_t;
-+type amtu_exec_t;
-+domain_type(amtu_t)
-+domain_entry_file(amtu_t, amtu_exec_t)
-+
-+########################################
-+#
-+# amtu local policy
-+#
-+
-+# Specific allow rules required for amtu
-+allow amtu_t self:capability net_raw;
-+allow amtu_t self:packet_socket { bind create read write };
-+allow amtu_t self:udp_socket { create ioctl };
-+
-+files_manage_boot_files(amtu_t)
-+files_read_etc_runtime_files(amtu_t)
-+files_read_etc_files(amtu_t)
-+
-+kernel_read_system_state(amtu_t)
-+
-+libs_use_ld_so(amtu_t)
-+libs_use_shared_libs(amtu_t)
-+
-+logging_send_audit_msg(amtu_t)
-+
-+optional_policy(`
-+    seutil_use_newrole_fds(amtu_t)
-+');
-+
-+optional_policy(`
-+    userdom_use_sysadm_fds(amtu_t)
-+');
-+
-+optional_policy(`
-+    userdom_sigchld_sysadm(amtu_t)
-+');
-+
-+optional_policy(`
-+    nscd_dontaudit_search_pid(amtu_t)
-+');
-+
-+optional_policy(`
-+    kernel_dontaudit_read_system_state(amtu_t)
-+');
-+
-+optional_policy(`
-+    term_dontaudit_search_ptys(amtu_t)
-+');
-+
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/anaconda.te serefpolicy-3.0.1/policy/modules/admin/anaconda.te
+--- nsaserefpolicy/policy/modules/admin/anaconda.te	2007-05-29 14:10:59.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/admin/anaconda.te	2007-06-19 17:06:27.000000000 -0400
+@@ -37,10 +37,6 @@
+ userdom_generic_user_home_dir_filetrans_generic_user_home_content(anaconda_t,{ dir file lnk_file fifo_file sock_file })
+ 
+ optional_policy(`
+-	dmesg_domtrans(anaconda_t)
+-')
+-
+-optional_policy(`
+ 	kudzu_domtrans(anaconda_t)
+ ')
+ 
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/bootloader.te serefpolicy-3.0.1/policy/modules/admin/bootloader.te
 --- nsaserefpolicy/policy/modules/admin/bootloader.te	2007-05-29 14:10:59.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/admin/bootloader.te	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/admin/bootloader.te	2007-06-19 17:06:27.000000000 -0400
 @@ -182,6 +182,7 @@
  
  optional_policy(`
@@ -393,7 +364,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/bootloa
  optional_policy(`
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/consoletype.te serefpolicy-3.0.1/policy/modules/admin/consoletype.te
 --- nsaserefpolicy/policy/modules/admin/consoletype.te	2007-05-29 14:10:59.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/admin/consoletype.te	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/admin/consoletype.te	2007-06-19 17:06:27.000000000 -0400
 @@ -8,12 +8,21 @@
  
  type consoletype_t;
@@ -427,9 +398,20 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/console
  
  domain_use_interactive_fds(consoletype_t)
  
+@@ -86,6 +95,10 @@
+ ')
+ 
+ optional_policy(`
++	hotplug_dontaudit_use_fds(consoletype_t)
++')
++
++optional_policy(`
+ 	logrotate_dontaudit_use_fds(consoletype_t)
+ ')
+ 
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/kudzu.te serefpolicy-3.0.1/policy/modules/admin/kudzu.te
 --- nsaserefpolicy/policy/modules/admin/kudzu.te	2007-05-29 14:10:59.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/admin/kudzu.te	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/admin/kudzu.te	2007-06-19 17:06:27.000000000 -0400
 @@ -21,8 +21,8 @@
  # Local policy
  #
@@ -467,9 +449,9 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/kudzu.t
  allow kudzu_t modules_conf_t:file unlink;
  optional_policy(`
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/logrotate.te serefpolicy-3.0.1/policy/modules/admin/logrotate.te
---- nsaserefpolicy/policy/modules/admin/logrotate.te	2007-05-29 14:10:59.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/admin/logrotate.te	2007-05-30 15:12:50.000000000 -0400
-@@ -75,6 +75,7 @@
+--- nsaserefpolicy/policy/modules/admin/logrotate.te	2007-06-19 16:23:35.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/admin/logrotate.te	2007-06-19 17:06:27.000000000 -0400
+@@ -75,11 +75,13 @@
  mls_file_read_up(logrotate_t)
  mls_file_write_down(logrotate_t)
  mls_file_upgrade(logrotate_t)
@@ -477,32 +459,92 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/logrota
  
  selinux_get_fs_mount(logrotate_t)
  selinux_get_enforce_mode(logrotate_t)
-@@ -193,10 +194,6 @@
- 	squid_domtrans(logrotate_t)
+ 
+ auth_manage_login_records(logrotate_t)
++auth_use_nsswitch(logrotate_t)
+ 
+ # Run helper programs.
+ corecmd_exec_bin(logrotate_t)
+@@ -114,8 +116,6 @@
+ 
+ seutil_dontaudit_read_config(logrotate_t)
+ 
+-sysnet_read_config(logrotate_t)
+-
+ userdom_dontaudit_search_sysadm_home_dirs(logrotate_t)
+ userdom_use_unpriv_users_fds(logrotate_t)
+ 
+@@ -177,14 +177,6 @@
  ')
  
+ optional_policy(`
+-	nis_use_ypbind(logrotate_t)
+-')
+-
 -optional_policy(`
--	unconfined_domain(logrotate_t)
+-	nscd_socket_use(logrotate_t)
 -')
 -
- ifdef(`TODO',`
- # it should not require this
- allow logrotate_t {staff_home_dir_t sysadm_home_dir_t}:dir { getattr read search };
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/logwatch.te serefpolicy-3.0.1/policy/modules/admin/logwatch.te
---- nsaserefpolicy/policy/modules/admin/logwatch.te	2007-05-29 14:10:59.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/admin/logwatch.te	2007-05-30 15:12:50.000000000 -0400
-@@ -63,6 +63,8 @@
- files_search_mnt(logwatch_t)
- files_dontaudit_search_home(logwatch_t)
- files_dontaudit_search_boot(logwatch_t)
-+# Execs df and if file system mounted with a context avc raised
-+files_dontaudit_search_all_dirs(logwatch_t)
+-optional_policy(`
+ 	slrnpull_manage_spool(logrotate_t)
+ ')
  
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/logwatch.te serefpolicy-3.0.1/policy/modules/admin/logwatch.te
+--- nsaserefpolicy/policy/modules/admin/logwatch.te	2007-06-15 14:54:34.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/admin/logwatch.te	2007-06-21 13:45:59.000000000 -0400
+@@ -30,7 +30,6 @@
+ allow logwatch_t self:process signal;
+ allow logwatch_t self:fifo_file rw_file_perms;
+ allow logwatch_t self:unix_stream_socket create_stream_socket_perms;
+-allow logwatch_t self:netlink_route_socket r_netlink_socket_perms; 
+ 
+ manage_dirs_pattern(logwatch_t,logwatch_cache_t,logwatch_cache_t)
+ manage_files_pattern(logwatch_t,logwatch_cache_t,logwatch_cache_t)
+@@ -69,6 +68,9 @@
  fs_getattr_all_fs(logwatch_t)
  fs_dontaudit_list_auto_mountpoints(logwatch_t)
+ 
++init_read_utmp(logwatch_t)
++init_dontaudit_write_utmp(logwatch_t)
++
+ term_dontaudit_getattr_pty_dirs(logwatch_t)
+ term_dontaudit_list_ptys(logwatch_t)
+ 
+@@ -97,6 +99,10 @@
+ ')
+ 
+ optional_policy(`
++	auth_use_nsswitch(logwatch_t)
++')
++
++optional_policy(`
+ 	avahi_dontaudit_search_pid(logwatch_t)
+ ')
+ 
+@@ -118,14 +124,6 @@
+ ')
+ 
+ optional_policy(`
+-	nis_use_ypbind(logwatch_t)
+-')
+-
+-optional_policy(`
+-	nscd_socket_use(logwatch_t)
+-')
+-
+-optional_policy(`
+ 	ntp_domtrans(logwatch_t)
+ ')
+ 
+@@ -135,4 +133,5 @@
+ 
+ optional_policy(`
+ 	samba_read_log(logwatch_t)
++	samba_read_share_files(logwatch_t)
+ ')
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/netutils.te serefpolicy-3.0.1/policy/modules/admin/netutils.te
 --- nsaserefpolicy/policy/modules/admin/netutils.te	2007-05-29 14:10:59.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/admin/netutils.te	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/admin/netutils.te	2007-06-19 17:06:27.000000000 -0400
 @@ -29,6 +29,7 @@
  type traceroute_t;
  type traceroute_exec_t;
@@ -512,8 +554,8 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/netutil
  
  ########################################
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/prelink.te serefpolicy-3.0.1/policy/modules/admin/prelink.te
---- nsaserefpolicy/policy/modules/admin/prelink.te	2007-05-29 14:10:59.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/admin/prelink.te	2007-05-30 15:12:50.000000000 -0400
+--- nsaserefpolicy/policy/modules/admin/prelink.te	2007-06-15 14:54:34.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/admin/prelink.te	2007-06-19 17:06:27.000000000 -0400
 @@ -26,7 +26,7 @@
  # Local policy
  #
@@ -523,18 +565,73 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/prelink
  allow prelink_t self:process { execheap execmem execstack signal };
  allow prelink_t self:fifo_file rw_fifo_file_perms;
  
-@@ -65,6 +65,7 @@
+@@ -65,6 +65,8 @@
  files_read_etc_files(prelink_t)
  files_read_etc_runtime_files(prelink_t)
  files_dontaudit_read_all_symlinks(prelink_t)
 +files_manage_usr_files(prelink_t)
++files_relabelfrom_usr_files(prelink_t)
  
  fs_getattr_xattr_fs(prelink_t)
  
+@@ -84,6 +86,13 @@
+ 
+ miscfiles_read_localization(prelink_t)
+ 
++ifdef(`targeted_policy',`
++	# prelink executables in the user homedir
++	userdom_manage_generic_user_home_content_files(prelink_t)
++	userdom_mmap_generic_user_home_content_files(prelink_t)
++	userdom_dontaudit_relabel_generic_user_home_content_files(prelink_t)
++')
++
+ optional_policy(`
+ 	amanda_manage_lib(prelink_t)
+ ')
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/readahead.fc serefpolicy-3.0.1/policy/modules/admin/readahead.fc
+--- nsaserefpolicy/policy/modules/admin/readahead.fc	2007-05-29 14:10:59.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/admin/readahead.fc	2007-06-21 13:48:19.000000000 -0400
+@@ -2,3 +2,4 @@
+ # /usr
+ #
+ /usr/sbin/readahead	--	gen_context(system_u:object_r:readahead_exec_t,s0)
++/etc/readahead.d(/.*)?		gen_context(system_u:object_r:readahead_etc_rw_t,s0)
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/readahead.if serefpolicy-3.0.1/policy/modules/admin/readahead.if
+--- nsaserefpolicy/policy/modules/admin/readahead.if	2007-05-29 14:10:59.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/admin/readahead.if	2007-06-21 05:28:20.000000000 -0400
+@@ -1 +1,20 @@
+ ## <summary>Readahead, read files into page cache for improved performance</summary>
++
++########################################
++## <summary>
++##	Transition to the readahead domain.
++## </summary>
++## <param name="domain">
++##	<summary>
++##	Domain allowed access.
++##	</summary>
++## </param>
++#
++interface(`readahead_domtrans',`
++	gen_require(`
++		type readahead_t, readahead_exec_t;
++	')
++
++	corecmd_search_bin($1)
++	domtrans_pattern($1,readahead_exec_t,readahead_t)
++')
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/readahead.te serefpolicy-3.0.1/policy/modules/admin/readahead.te
 --- nsaserefpolicy/policy/modules/admin/readahead.te	2007-05-29 14:10:59.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/admin/readahead.te	2007-05-30 15:12:50.000000000 -0400
-@@ -18,7 +18,8 @@
++++ serefpolicy-3.0.1/policy/modules/admin/readahead.te	2007-06-19 17:06:27.000000000 -0400
+@@ -13,14 +13,20 @@
+ type readahead_var_run_t;
+ files_pid_file(readahead_var_run_t)
+ 
++type readahead_etc_rw_t;
++files_pid_file(readahead_etc_rw_t)
++
+ ########################################
+ #
  # Local policy
  #
  
@@ -543,8 +640,12 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/readahe
 +dontaudit readahead_t self:capability sys_tty_config;
  allow readahead_t self:process signal_perms;
  
++manage_files_pattern(readahead_t,readahead_etc_rw_t,readahead_etc_rw_t)
++
  manage_files_pattern(readahead_t,readahead_var_run_t,readahead_var_run_t)
-@@ -36,7 +37,7 @@
+ files_pid_filetrans(readahead_t,readahead_var_run_t,file)
+ 
+@@ -36,7 +42,7 @@
  dev_dontaudit_read_all_blk_files(readahead_t)
  dev_dontaudit_getattr_memory_dev(readahead_t)
  dev_dontaudit_getattr_nvram_dev(readahead_t)
@@ -553,7 +654,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/readahe
  
  domain_use_interactive_fds(readahead_t)
  
-@@ -76,3 +77,7 @@
+@@ -76,3 +82,7 @@
  optional_policy(`
  	seutil_sigchld_newrole(readahead_t)
  ')
@@ -563,7 +664,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/readahe
 +')
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/rpm.fc serefpolicy-3.0.1/policy/modules/admin/rpm.fc
 --- nsaserefpolicy/policy/modules/admin/rpm.fc	2007-05-29 14:10:59.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/admin/rpm.fc	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/admin/rpm.fc	2007-06-19 17:06:27.000000000 -0400
 @@ -21,6 +21,9 @@
  /usr/sbin/pup			--	gen_context(system_u:object_r:rpm_exec_t,s0)
  /usr/sbin/rhn_check		--	gen_context(system_u:object_r:rpm_exec_t,s0)
@@ -576,8 +677,33 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/rpm.fc 
  /var/lib/alternatives(/.*)?		gen_context(system_u:object_r:rpm_var_lib_t,s0)
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/rpm.if serefpolicy-3.0.1/policy/modules/admin/rpm.if
 --- nsaserefpolicy/policy/modules/admin/rpm.if	2007-05-30 11:47:29.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/admin/rpm.if	2007-05-30 15:12:50.000000000 -0400
-@@ -224,8 +224,29 @@
++++ serefpolicy-3.0.1/policy/modules/admin/rpm.if	2007-06-21 09:42:50.000000000 -0400
+@@ -210,6 +210,24 @@
+ 
+ ########################################
+ ## <summary>
++##	dontaudit and use file descriptors from RPM scripts.
++## </summary>
++## <param name="domain">
++##	<summary>
++##	The type of the process performing this action.
++##	</summary>
++## </param>
++#
++interface(`rpm_dontaudit_use_script_fds',`
++	gen_require(`
++		type rpm_script_t;
++	')
++
++	dontaudit $1 rpm_script_t:fd use;
++')
++
++########################################
++## <summary>
+ ##	Create, read, write, and delete RPM
+ ##	script temporary files.
+ ## </summary>
+@@ -224,8 +242,29 @@
  		type rpm_script_tmp_t;
  	')
  
@@ -608,7 +734,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/rpm.if 
  ')
  
  ########################################
-@@ -289,3 +310,46 @@
+@@ -289,3 +328,65 @@
  	dontaudit $1 rpm_var_lib_t:file manage_file_perms;
  	dontaudit $1 rpm_var_lib_t:lnk_file manage_lnk_file_perms;
  ')
@@ -639,6 +765,25 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/rpm.if 
 +
 +########################################
 +## <summary>
++##	allow domain to read, 
++##	write RPM tmp files
++## </summary>
++## <param name="domain">
++##	<summary>
++##	Domain to not audit.
++##	</summary>
++## </param>
++#
++interface(`rpm_rw_tmp_files',`
++	gen_require(`
++		type rpm_tmp_t;
++	')
++
++	allow $1 rpm_tmp_t:file rw_file_perms;
++')
++
++########################################
++## <summary>
 +##	Do not audit attempts to read, 
 +##	write RPM tmp files
 +## </summary>
@@ -657,7 +802,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/rpm.if 
 +')
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/rpm.te serefpolicy-3.0.1/policy/modules/admin/rpm.te
 --- nsaserefpolicy/policy/modules/admin/rpm.te	2007-05-30 11:47:29.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/admin/rpm.te	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/admin/rpm.te	2007-06-22 11:15:22.000000000 -0400
 @@ -9,6 +9,8 @@
  type rpm_t;
  type rpm_exec_t;
@@ -667,9 +812,14 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/rpm.te 
  domain_obj_id_change_exemption(rpm_t)
  domain_role_change_exemption(rpm_t)
  domain_system_change_exemption(rpm_t)
+@@ -366,3 +368,4 @@
+ 	usermanage_domtrans_groupadd(rpm_script_t)
+ 	usermanage_domtrans_useradd(rpm_script_t)
+ ')
++
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/sudo.if serefpolicy-3.0.1/policy/modules/admin/sudo.if
 --- nsaserefpolicy/policy/modules/admin/sudo.if	2007-05-29 14:10:59.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/admin/sudo.if	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/admin/sudo.if	2007-06-19 17:06:27.000000000 -0400
 @@ -69,7 +69,6 @@
  	allow $1_sudo_t self:unix_stream_socket create_stream_socket_perms;
  	allow $1_sudo_t self:unix_dgram_socket sendto;
@@ -697,14 +847,14 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/sudo.if
  
  	corecmd_read_bin_symlinks($1_sudo_t)
  	corecmd_getattr_all_executables($1_sudo_t)
-@@ -114,6 +116,7 @@
+@@ -113,6 +115,7 @@
+ 	libs_use_ld_so($1_sudo_t)
  	libs_use_shared_libs($1_sudo_t)
  
++	logging_send_audit_msgs($1_sudo_t)
  	logging_send_syslog_msg($1_sudo_t)
-+	logging_send_audit_msg($1_sudo_t)
  
  	miscfiles_read_localization($1_sudo_t)
- 
 @@ -127,6 +130,10 @@
  	userdom_dontaudit_search_all_users_home_content($1_sudo_t)
  
@@ -717,8 +867,8 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/sudo.if
  	')
  
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/su.if serefpolicy-3.0.1/policy/modules/admin/su.if
---- nsaserefpolicy/policy/modules/admin/su.if	2007-05-29 14:10:59.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/admin/su.if	2007-05-30 15:12:50.000000000 -0400
+--- nsaserefpolicy/policy/modules/admin/su.if	2007-06-15 14:54:34.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/admin/su.if	2007-06-19 17:06:27.000000000 -0400
 @@ -41,12 +41,11 @@
  
  	allow $2 $1_su_t:process signal;
@@ -745,13 +895,16 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/su.if s
  	libs_use_ld_so($1_su_t)
  	libs_use_shared_libs($1_su_t)
  
-+	logging_send_audit_msg($1_su_t)
++	logging_send_audit_msgs($1_su_t)
  	logging_send_syslog_msg($1_su_t)
  
  	miscfiles_read_localization($1_su_t)
-@@ -174,11 +175,10 @@
+@@ -172,13 +173,12 @@
+ 	domain_interactive_fd($1_su_t)
+ 	role $3 types $1_su_t;
  
- 	allow $2 $1_su_t:process signal;
+-	allow $2 $1_su_t:process signal;
++	allow $2 $1_su_t:process { getsched signal };
  
 -	allow $1_su_t self:capability { audit_control audit_write setuid setgid net_bind_service chown dac_override fowner sys_nice sys_resource };
 +	allow $1_su_t self:capability { setuid setgid net_bind_service chown dac_override fowner sys_nice sys_resource };
@@ -762,7 +915,16 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/su.if s
  	allow $1_su_t self:key { search write };
  
  	# Transition from the user domain to this domain.
-@@ -204,9 +204,11 @@
+@@ -188,7 +188,7 @@
+ 	corecmd_shell_domtrans($1_su_t,$2)
+ 	allow $2 $1_su_t:fd use;
+ 	allow $2 $1_su_t:fifo_file rw_file_perms;
+-	allow $2 $1_su_t:process sigchld;
++	allow $2 $1_su_t:process { getsched signal };
+ 
+ 	kernel_read_system_state($1_su_t)
+ 	kernel_read_kernel_sysctls($1_su_t)
+@@ -204,14 +204,17 @@
  	selinux_compute_access_vector($1_su_t)
  
  	auth_domtrans_user_chk_passwd($1,$1_su_t)
@@ -773,37 +935,24 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/su.if s
 +	auth_keyring_domain($1_su_t)
 +	auth_search_key($1_su_t)
  
- 	corecmd_search_bin($1_su_t)
+-	corecmd_search_bin($1_su_t)
++	corecmd_exec_bin($1_su_t)
  
-@@ -227,6 +229,7 @@
+ 	domain_use_interactive_fds($1_su_t)
+ 
++	files_read_usr_symlinks($1_su_t)
+ 	files_read_etc_files($1_su_t)
+ 	files_read_etc_runtime_files($1_su_t)
+ 	files_search_var_lib($1_su_t)
+@@ -226,6 +229,7 @@
+ 	libs_use_ld_so($1_su_t)
  	libs_use_shared_libs($1_su_t)
  
++	logging_send_audit_msgs($1_su_t)
  	logging_send_syslog_msg($1_su_t)
-+	logging_send_audit_msg($1_su_t)
  
  	miscfiles_read_localization($1_su_t)
- 
-@@ -270,19 +273,6 @@
- 		')
- 	')
- 
--#	ifdef(`targeted_policy',`
--#		# allow user to suspend terminal.
--#		# does not work in strict since the
--#		# parent may not be able to use
--#		# the terminal if we newrole,
--#		# which relabels the terminal.
--#		allow $1_su_t self:process sigstop;
--#
--#		corecmd_exec_bin($1_su_t)
--#		userdom_manage_all_users_home_content_files($1_su_t)
--#		userdom_manage_all_users_home_content_symlinks($1_su_t)
--#	')
--
- 	tunable_policy(`allow_polyinstantiation',`
- 		fs_mount_xattr_fs($1_su_t)
- 		fs_unmount_xattr_fs($1_su_t)
-@@ -310,6 +300,8 @@
+@@ -295,6 +299,8 @@
  		xserver_domtrans_user_xauth($1, $1_su_t)
  	')
  
@@ -812,9 +961,38 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/su.if s
  	ifdef(`TODO',`
  	allow $1_su_t $1_home_t:file manage_file_perms;
  
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/tmpreaper.if serefpolicy-3.0.1/policy/modules/admin/tmpreaper.if
+--- nsaserefpolicy/policy/modules/admin/tmpreaper.if	2007-05-29 14:10:59.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/admin/tmpreaper.if	2007-06-21 05:40:18.000000000 -0400
+@@ -2,6 +2,25 @@
+ 
+ ########################################
+ ## <summary>
++##	Transition to the tmpreaper domain.
++## </summary>
++## <param name="domain">
++##	<summary>
++##	Domain allowed access.
++##	</summary>
++## </param>
++#
++interface(`tmpreaper_domtrans',`
++	gen_require(`
++		type tmpreaper_t, tmpreaper_exec_t;
++	')
++
++	corecmd_search_bin($1)
++	domtrans_pattern($1,tmpreaper_exec_t,tmpreaper_t)
++')
++
++########################################
++## <summary>
+ ##	Execute tmpreaper in the caller domain.
+ ## </summary>
+ ## <param name="domain">
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/usermanage.if serefpolicy-3.0.1/policy/modules/admin/usermanage.if
 --- nsaserefpolicy/policy/modules/admin/usermanage.if	2007-05-29 14:10:59.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/admin/usermanage.if	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/admin/usermanage.if	2007-06-19 17:06:27.000000000 -0400
 @@ -278,5 +278,5 @@
  		type crack_db_t;
  	')
@@ -824,8 +1002,16 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/userman
  ')
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/usermanage.te serefpolicy-3.0.1/policy/modules/admin/usermanage.te
 --- nsaserefpolicy/policy/modules/admin/usermanage.te	2007-05-30 11:47:29.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/admin/usermanage.te	2007-05-30 15:12:50.000000000 -0400
-@@ -198,7 +198,6 @@
++++ serefpolicy-3.0.1/policy/modules/admin/usermanage.te	2007-06-19 17:06:27.000000000 -0400
+@@ -99,6 +99,7 @@
+ dev_read_urand(chfn_t)
+ 
+ auth_domtrans_chk_passwd(chfn_t)
++auth_domtrans_upd_passwd(chfn_t)
+ auth_dontaudit_read_shadow(chfn_t)
+ 
+ # allow checking if a shell is executable
+@@ -198,7 +199,6 @@
  allow groupadd_t self:unix_stream_socket create_stream_socket_perms;
  allow groupadd_t self:unix_dgram_socket sendto;
  allow groupadd_t self:unix_stream_socket connectto;
@@ -833,15 +1019,15 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/userman
  
  fs_getattr_xattr_fs(groupadd_t)
  fs_search_auto_mountpoints(groupadd_t)
-@@ -231,6 +230,7 @@
+@@ -230,6 +230,7 @@
+ # Execute /usr/bin/{passwd,chfn,chsh} and /usr/sbin/{useradd,vipw}.
  corecmd_exec_bin(groupadd_t)
  
++logging_send_audit_msgs(groupadd_t)
  logging_send_syslog_msg(groupadd_t)
-+logging_send_audit_msg(groupadd_t)
  
  miscfiles_read_localization(groupadd_t)
- 
-@@ -252,8 +252,13 @@
+@@ -252,8 +253,13 @@
  ')
  
  optional_policy(`
@@ -855,7 +1041,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/userman
  ')
  
  ########################################
-@@ -261,7 +266,7 @@
+@@ -261,7 +267,7 @@
  # Passwd local policy
  #
  
@@ -864,7 +1050,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/userman
  allow passwd_t self:process ~{ ptrace setcurrent setexec setfscreate setrlimit execmem execstack execheap };
  allow passwd_t self:process { setrlimit setfscreate };
  allow passwd_t self:fd use;
-@@ -271,7 +276,6 @@
+@@ -271,7 +277,6 @@
  allow passwd_t self:unix_stream_socket create_stream_socket_perms;
  allow passwd_t self:unix_dgram_socket sendto;
  allow passwd_t self:unix_stream_socket connectto;
@@ -872,15 +1058,15 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/userman
  allow passwd_t self:shm create_shm_perms;
  allow passwd_t self:sem create_sem_perms;
  allow passwd_t self:msgq create_msgq_perms;
-@@ -324,6 +328,7 @@
+@@ -323,6 +328,7 @@
+ libs_use_ld_so(passwd_t)
  libs_use_shared_libs(passwd_t)
  
++logging_send_audit_msgs(passwd_t)
  logging_send_syslog_msg(passwd_t)
-+logging_send_audit_msg(passwd_t)
  
  miscfiles_read_localization(passwd_t)
- 
-@@ -343,6 +348,7 @@
+@@ -343,6 +349,7 @@
  
  optional_policy(`
  	nscd_socket_use(passwd_t)
@@ -888,7 +1074,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/userman
  ')
  
  ########################################
-@@ -433,6 +439,7 @@
+@@ -433,6 +440,7 @@
  
  optional_policy(`
  	nscd_socket_use(sysadm_passwd_t)
@@ -896,7 +1082,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/userman
  ')
  
  ########################################
-@@ -440,7 +447,7 @@
+@@ -440,7 +448,7 @@
  # Useradd local policy
  #
  
@@ -905,7 +1091,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/userman
  dontaudit useradd_t self:capability sys_tty_config;
  allow useradd_t self:process ~{ ptrace setcurrent setexec setfscreate setrlimit execmem execstack execheap };
  allow useradd_t self:process setfscreate;
-@@ -454,7 +461,6 @@
+@@ -454,7 +462,6 @@
  allow useradd_t self:unix_stream_socket create_stream_socket_perms;
  allow useradd_t self:unix_dgram_socket sendto;
  allow useradd_t self:unix_stream_socket connectto;
@@ -913,15 +1099,15 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/userman
  
  # for getting the number of groups
  kernel_read_kernel_sysctls(useradd_t)
-@@ -500,6 +506,7 @@
+@@ -499,6 +506,7 @@
+ libs_use_ld_so(useradd_t)
  libs_use_shared_libs(useradd_t)
  
++logging_send_audit_msgs(useradd_t)
  logging_send_syslog_msg(useradd_t)
-+logging_send_audit_msg(useradd_t)
  
  miscfiles_read_localization(useradd_t)
- 
-@@ -508,6 +515,9 @@
+@@ -508,6 +516,9 @@
  seutil_read_default_contexts(useradd_t)
  seutil_domtrans_semanage(useradd_t)
  seutil_domtrans_setfiles(useradd_t)
@@ -931,7 +1117,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/userman
  
  userdom_use_unpriv_users_fds(useradd_t)
  # for when /root is the cwd
-@@ -521,11 +531,26 @@
+@@ -521,11 +532,26 @@
  mta_manage_spool(useradd_t)
  
  optional_policy(`
@@ -960,51 +1146,123 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/userman
  ')
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/admin/vbetool.te serefpolicy-3.0.1/policy/modules/admin/vbetool.te
 --- nsaserefpolicy/policy/modules/admin/vbetool.te	2007-05-29 14:10:59.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/admin/vbetool.te	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/admin/vbetool.te	2007-06-19 17:06:27.000000000 -0400
 @@ -32,4 +32,5 @@
  
  optional_policy(`
  	hal_rw_pid_files(vbetool_t)
 +	hal_write_log(vbetool_t)
  ')
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/apps/gnome.if serefpolicy-3.0.1/policy/modules/apps/gnome.if
---- nsaserefpolicy/policy/modules/apps/gnome.if	2007-05-29 14:10:48.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/apps/gnome.if	2007-05-30 15:12:50.000000000 -0400
-@@ -35,6 +35,7 @@
- template(`gnome_per_role_template',`
- 	gen_require(`
- 		type gconfd_exec_t;
-+		type gconf_etc_t;
- 		attribute gnomedomain;
- 	')
- 
-@@ -102,6 +103,11 @@
- 
- 	optional_policy(`
- 		nscd_dontaudit_search_pid($1_gconfd_t)
-+		nscd_socket_use($1_gconfd_t)
-+	')
-+
-+	optional_policy(`
-+		ssh_dontaudit_use_user_ssh_agent_fds($1,$1_gconfd_t)
- 	')
- 
- 	optional_policy(`
-@@ -136,13 +142,32 @@
- 	allow $2 $1_gconfd_t:unix_stream_socket connectto;
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/apps/ada.if serefpolicy-3.0.1/policy/modules/apps/ada.if
+--- nsaserefpolicy/policy/modules/apps/ada.if	2007-05-29 14:10:48.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/apps/ada.if	2007-06-19 17:06:27.000000000 -0400
+@@ -18,3 +18,34 @@
+ 	corecmd_search_bin($1)
+ 	domtrans_pattern($1, ada_exec_t, ada_t)
  ')
- 
 +
 +########################################
 +## <summary>
-+##	Send general signals to all gconf domains.
++##	Execute ada in the ada domain, and
++##	allow the specified role the ada domain.
 +## </summary>
 +## <param name="domain">
 +##	<summary>
-+##	Domain allowed access.
++##	The type of the process performing this action.
 +##	</summary>
 +## </param>
-+#
++## <param name="role">
++##	<summary>
++##	The role to be allowed the ada domain.
++##	</summary>
++## </param>
++## <param name="terminal">
++##	<summary>
++##	The type of the terminal allow the ada domain to use.
++##	</summary>
++## </param>
++#
++interface(`ada_run',`
++	gen_require(`
++		type ada_t;
++	')
++
++	ada_domtrans($1)
++	role $2 types ada_t;
++	allow ada_t $3:chr_file rw_term_perms;
++')
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/apps/games.fc serefpolicy-3.0.1/policy/modules/apps/games.fc
+--- nsaserefpolicy/policy/modules/apps/games.fc	2007-05-29 14:10:48.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/apps/games.fc	2007-06-19 17:06:27.000000000 -0400
+@@ -1,22 +1,16 @@
+ #
+ # /usr
+ #
+-/usr/games/powermanga	--	gen_context(system_u:object_r:games_exec_t,s0)
+-/usr/games/nethack-3.4.3/nethack -- gen_context(system_u:object_r:games_exec_t,s0)
+-/usr/games/vulturesclaw/vulturesclaw -- gen_context(system_u:object_r:games_exec_t,s0)
+-/usr/games/vultureseye/vultureseye -- gen_context(system_u:object_r:games_exec_t,s0)
+-
+ /usr/lib/games(/.*)? 		gen_context(system_u:object_r:games_exec_t,s0)
++/usr/games/.*		--	gen_context(system_u:object_r:games_exec_t,s0)
+ 
+ #
+ # /var
+ #
+ /var/lib/games(/.*)? 		gen_context(system_u:object_r:games_data_t,s0)
+-
+-ifdef(`distro_debian', `
+-/usr/games/.*		--	gen_context(system_u:object_r:games_exec_t,s0)
+ /var/games(/.*)?		gen_context(system_u:object_r:games_data_t,s0)
+-', `
++
++ifdef(`distro_debian', `', `
+ /usr/bin/micq		--	gen_context(system_u:object_r:games_exec_t,s0)
+ /usr/bin/blackjack	--	gen_context(system_u:object_r:games_exec_t,s0)
+ /usr/bin/gataxx		--	gen_context(system_u:object_r:games_exec_t,s0)
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/apps/gnome.if serefpolicy-3.0.1/policy/modules/apps/gnome.if
+--- nsaserefpolicy/policy/modules/apps/gnome.if	2007-05-29 14:10:48.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/apps/gnome.if	2007-06-19 17:06:27.000000000 -0400
+@@ -35,6 +35,7 @@
+ template(`gnome_per_role_template',`
+ 	gen_require(`
+ 		type gconfd_exec_t;
++		type gconf_etc_t;
+ 		attribute gnomedomain;
+ 	')
+ 
+@@ -101,7 +102,16 @@
+ 	gnome_stream_connect_gconf_template($1,$2)
+ 
+ 	optional_policy(`
++		mozilla_stream_connect_template($1,$1_gconfd_t)
++	')
++
++	optional_policy(`
+ 		nscd_dontaudit_search_pid($1_gconfd_t)
++		nscd_socket_use($1_gconfd_t)
++	')
++
++	optional_policy(`
++		ssh_dontaudit_use_user_ssh_agent_fds($1,$1_gconfd_t)
+ 	')
+ 
+ 	optional_policy(`
+@@ -136,13 +146,32 @@
+ 	allow $2 $1_gconfd_t:unix_stream_socket connectto;
+ ')
+ 
++
++########################################
++## <summary>
++##	Send general signals to all gconf domains.
++## </summary>
++## <param name="domain">
++##	<summary>
++##	Domain allowed access.
++##	</summary>
++## </param>
++#
 +interface(`gnome_signal_all',`
 +	gen_require(`
 +		attribute gnomedomain;
@@ -1026,8 +1284,8 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/apps/gnome.if
  ##	This is a templated interface, and should only
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/apps/java.if serefpolicy-3.0.1/policy/modules/apps/java.if
 --- nsaserefpolicy/policy/modules/apps/java.if	2007-05-29 14:10:48.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/apps/java.if	2007-05-30 15:12:50.000000000 -0400
-@@ -220,3 +220,35 @@
++++ serefpolicy-3.0.1/policy/modules/apps/java.if	2007-06-19 17:06:27.000000000 -0400
+@@ -220,3 +220,66 @@
  	corecmd_search_bin($1)
  	domtrans_pattern($1, java_exec_t, java_t)
  ')
@@ -1063,10 +1321,53 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/apps/java.if 
 +	domain_trans($1,java_exec_t,$2)
 +	type_transition $1 java_exec_t:process $2;
 +')
++
++########################################
++## <summary>
++##	Execute java in the java domain, and
++##	allow the specified role the java domain.
++## </summary>
++## <param name="domain">
++##	<summary>
++##	The type of the process performing this action.
++##	</summary>
++## </param>
++## <param name="role">
++##	<summary>
++##	The role to be allowed the java domain.
++##	</summary>
++## </param>
++## <param name="terminal">
++##	<summary>
++##	The type of the terminal allow the java domain to use.
++##	</summary>
++## </param>
++#
++interface(`java_run',`
++	gen_require(`
++		type java_t;
++	')
++
++	java_domtrans($1)
++	role $2 types java_t;
++	allow java_t $3:chr_file rw_term_perms;
++')
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/apps/loadkeys.te serefpolicy-3.0.1/policy/modules/apps/loadkeys.te
+--- nsaserefpolicy/policy/modules/apps/loadkeys.te	2007-05-29 14:10:48.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/apps/loadkeys.te	2007-06-19 17:06:27.000000000 -0400
+@@ -40,3 +40,8 @@
+ locallogin_use_fds(loadkeys_t)
+ 
+ miscfiles_read_localization(loadkeys_t)
++
++optional_policy(`
++	nscd_dontaudit_search_pid(loadkeys_t)
++')
++
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/apps/mono.if serefpolicy-3.0.1/policy/modules/apps/mono.if
 --- nsaserefpolicy/policy/modules/apps/mono.if	2007-05-29 14:10:48.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/apps/mono.if	2007-05-31 06:59:56.000000000 -0400
-@@ -18,3 +18,21 @@
++++ serefpolicy-3.0.1/policy/modules/apps/mono.if	2007-06-19 17:06:27.000000000 -0400
+@@ -18,3 +18,52 @@
  	corecmd_search_bin($1)
  	domtrans_pattern($1, mono_exec_t, mono_t)
  ')
@@ -1088,86 +1389,452 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/apps/mono.if 
 +
 +	allow $1 mono_t:shm rw_shm_perms;
 +')
++
++########################################
++## <summary>
++##	Execute mono in the mono domain, and
++##	allow the specified role the mono domain.
++## </summary>
++## <param name="domain">
++##	<summary>
++##	The type of the process performing this action.
++##	</summary>
++## </param>
++## <param name="role">
++##	<summary>
++##	The role to be allowed the mono domain.
++##	</summary>
++## </param>
++## <param name="terminal">
++##	<summary>
++##	The type of the terminal allow the mono domain to use.
++##	</summary>
++## </param>
++#
++interface(`mono_run',`
++	gen_require(`
++		type mono_t;
++	')
++
++	mono_domtrans($1)
++	role $2 types mono_t;
++	allow mono_t $3:chr_file rw_term_perms;
++')
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/apps/mozilla.if serefpolicy-3.0.1/policy/modules/apps/mozilla.if
---- nsaserefpolicy/policy/modules/apps/mozilla.if	2007-05-29 14:10:48.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/apps/mozilla.if	2007-05-30 15:12:50.000000000 -0400
-@@ -150,6 +150,7 @@
- 	corenet_dontaudit_tcp_bind_generic_port($1_mozilla_t)
- 
- 	dev_read_urand($1_mozilla_t)
-+	dev_read_rand($1_mozilla_t)
- 	dev_write_sound($1_mozilla_t)
- 	dev_read_sound($1_mozilla_t)
- 	dev_dontaudit_rw_dri($1_mozilla_t)
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/apps/mplayer.te serefpolicy-3.0.1/policy/modules/apps/mplayer.te
---- nsaserefpolicy/policy/modules/apps/mplayer.te	2007-05-29 14:10:48.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/apps/mplayer.te	2007-05-30 15:12:50.000000000 -0400
-@@ -22,7 +22,3 @@
- type mplayer_exec_t;
- corecmd_executable_file(mplayer_exec_t)
- 
--#ifdef(`targeted_policy',`
--#	unconfined_execmem_alias_program(mencoder_exec_t)
--#	unconfined_execmem_alias_program(mplayer_exec_t)
--#')
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/apps/slocate.te serefpolicy-3.0.1/policy/modules/apps/slocate.te
---- nsaserefpolicy/policy/modules/apps/slocate.te	2007-05-29 14:10:48.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/apps/slocate.te	2007-05-30 15:12:50.000000000 -0400
-@@ -39,11 +39,13 @@
- 
- files_list_all(locate_t)
- files_getattr_all_files(locate_t)
-+files_getattr_all_sockets(locate_t)
- files_read_etc_runtime_files(locate_t)
- files_read_etc_files(locate_t)
- 
- fs_getattr_all_fs(locate_t)
--fs_getattr_all_dirs(locate_t)
-+fs_getattr_all_files(locate_t)
-+fs_list_all(locate_t)
- 
- libs_use_shared_libs(locate_t)
- libs_use_ld_so(locate_t)
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/apps/uml.if serefpolicy-3.0.1/policy/modules/apps/uml.if
---- nsaserefpolicy/policy/modules/apps/uml.if	2007-05-29 14:10:48.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/apps/uml.if	2007-05-30 15:12:50.000000000 -0400
-@@ -193,33 +193,6 @@
- 		nis_use_ypbind($1_uml_t)
+--- nsaserefpolicy/policy/modules/apps/mozilla.if	2007-06-11 16:05:29.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/apps/mozilla.if	2007-06-19 17:06:27.000000000 -0400
+@@ -53,6 +53,14 @@
+ 	type $1_mozilla_tmpfs_t;
+ 	files_tmpfs_file($1_mozilla_tmpfs_t)
+ 
++	type $1_mozilla_tmp_t;
++	files_tmp_file($1_mozilla_tmp_t)
++
++	########################################
++	#
++	# Local booleans
++	#
++
+ 	########################################
+ 	#
+ 	# Local policy
+@@ -97,15 +105,33 @@
+ 	relabel_files_pattern($2,$1_mozilla_home_t,$1_mozilla_home_t)
+ 	relabel_lnk_files_pattern($2,$1_mozilla_home_t,$1_mozilla_home_t)
+ 
+-	manage_files_pattern($1_mozilla_t,$1_mozilla_tmpfs_t,$1_mozilla_tmpfs_t)
+-	manage_lnk_files_pattern($1_mozilla_t,$1_mozilla_tmpfs_t,$1_mozilla_tmpfs_t)
+-	manage_fifo_files_pattern($1_mozilla_t,$1_mozilla_tmpfs_t,$1_mozilla_tmpfs_t)
+-	manage_sock_files_pattern($1_mozilla_t,$1_mozilla_tmpfs_t,$1_mozilla_tmpfs_t)
+-	fs_tmpfs_filetrans($1_mozilla_t,$1_mozilla_tmpfs_t,{ file lnk_file sock_file fifo_file })
+-
+ 	allow $1_mozilla_t $2:process signull;
+ 
+-	domain_auto_trans($2, mozilla_exec_t, $1_mozilla_t)
++	tunable_policy(`browser_confine_$1',`
++		domain_auto_trans($2, mozilla_exec_t, $1_mozilla_t)
++	',`
++		can_exec($2, mozilla_exec_t)
++	')
++
++	userdom_read_user_home_content_files($1,$1_mozilla_t)
++	userdom_read_user_home_content_symlinks($1,$1_mozilla_t)
++	userdom_read_user_tmp_files($1,$1_mozilla_t)
++	userdom_manage_user_tmp_dirs($1,$1_mozilla_t)
++	userdom_manage_user_tmp_files($1,$1_mozilla_t)
++	userdom_manage_user_tmp_sockets($1,$1_mozilla_t)
++	userdom_tmp_filetrans_user_tmp($1,$1_mozilla_t, file)
++
++	ifdef(`enable_mls',`',`
++		fs_search_removable($1_mozilla_t)
++		fs_read_removable_files($1_mozilla_t)
++		fs_read_removable_symlinks($1_mozilla_t)
++	')
++
++	tunable_policy(`browser_write_$1_data',`
++		userdom_manage_user_home_content_dirs($1,$1_mozilla_t)
++		userdom_manage_user_home_content_files($1,$1_mozilla_t)
++		userdom_read_user_home_content_symlinks($1,$1_mozilla_t)
++	')
+ 	# Unrestricted inheritance from the caller.
+ 	allow $2 $1_mozilla_t:process { noatsecure siginh rlimitinh };
+ 
+@@ -170,6 +196,8 @@
+ 	fs_list_inotifyfs($1_mozilla_t)
+ 	fs_rw_tmpfs_files($1_mozilla_t)
+ 
++	selinux_dontaudit_getattr_fs($1_mozilla_t)
++
+ 	term_dontaudit_getattr_pty_dirs($1_mozilla_t)
+ 	
+ 	libs_use_ld_so($1_mozilla_t)
+@@ -185,12 +213,9 @@
+ 	sysnet_dns_name_resolve($1_mozilla_t)
+ 	sysnet_read_config($1_mozilla_t)
+ 	
+-	userdom_manage_user_home_content_dirs($1,$1_mozilla_t)
+-	userdom_manage_user_home_content_files($1,$1_mozilla_t)
+-	userdom_manage_user_home_content_symlinks($1,$1_mozilla_t)
+-	userdom_manage_user_tmp_dirs($1,$1_mozilla_t)
+-	userdom_manage_user_tmp_files($1,$1_mozilla_t)
+-	userdom_manage_user_tmp_sockets($1,$1_mozilla_t)
++	userdom_dontaudit_read_user_tmp_files($1,$1_mozilla_t)
++	userdom_dontaudit_use_user_terminals($1,$1_mozilla_t)
++	userdom_user_home_dir_filetrans($1,$1_mozilla_t, $1_mozilla_home_t,dir)
+ 	
+ 	xserver_user_client_template($1,$1_mozilla_t,$1_mozilla_tmpfs_t)
+ 	xserver_dontaudit_read_xdm_tmp_files($1_mozilla_t)
+@@ -212,133 +237,6 @@
+ 		fs_manage_cifs_symlinks($1_mozilla_t)
  	')
  
--	ifdef(`TODO',`
--		# for X
--		optional_policy(`
--			ifelse($1, sysadm,`
--			',`
--				optional_policy(`
--					allow $1_uml_t xdm_xserver_tmp_t:dir search;
--				')
--				allow $1_uml_t $1_xserver_tmp_t:sock_file write;
--				allow $1_uml_t $1_xserver_t:unix_stream_socket connectto;
--			')
--		')
+-	# Uploads, local html
+-	tunable_policy(`mozilla_read_content && use_nfs_home_dirs',`
+-		fs_list_auto_mountpoints($1_mozilla_t)
+-		files_list_home($1_mozilla_t)
+-		fs_read_nfs_files($1_mozilla_t)
+-		fs_read_nfs_symlinks($1_mozilla_t)
+-	
+-	',`
+-		files_dontaudit_list_home($1_mozilla_t)
+-		fs_dontaudit_list_auto_mountpoints($1_mozilla_t)
+-		fs_dontaudit_read_nfs_files($1_mozilla_t)
+-		fs_dontaudit_list_nfs($1_mozilla_t)
+-	')
 -
--		optional_policy(`
--			# for uml_net
--			domain_auto_trans($1_uml_t, uml_net_exec_t, uml_net_t)
--			allow uml_net_t $1_uml_t:unix_stream_socket { read write };
--			allow uml_net_t $1_uml_t:unix_dgram_socket { read write };
--			dontaudit uml_net_t privfd:fd use;
--			can_access_pty(uml_net_t, $1_uml)
--			dontaudit uml_net_t $1_uml_rw_t:dir { getattr search };
+-	tunable_policy(`mozilla_read_content && use_samba_home_dirs',`
+-		fs_list_auto_mountpoints($1_mozilla_t)
+-		files_list_home($1_mozilla_t)
+-		fs_read_cifs_files($1_mozilla_t)
+-		fs_read_cifs_symlinks($1_mozilla_t)
+-	',`
+-		files_dontaudit_list_home($1_mozilla_t)
+-		fs_dontaudit_list_auto_mountpoints($1_mozilla_t)
+-		fs_dontaudit_read_cifs_files($1_mozilla_t)
+-		fs_dontaudit_list_cifs($1_mozilla_t)
+-	')
+-
+-	tunable_policy(`mozilla_read_content',`
+-		userdom_list_user_tmp($1,$1_mozilla_t)
+-		userdom_read_user_tmp_files($1,$1_mozilla_t)
+-		userdom_read_user_tmp_symlinks($1,$1_mozilla_t)
+-		userdom_search_user_home_dirs($1,$1_mozilla_t)
+-		userdom_read_user_home_content_files($1,$1_mozilla_t)
+-		userdom_read_user_home_content_symlinks($1,$1_mozilla_t)
+-		
+-		ifdef(`enable_mls',`',`
+-			fs_search_removable($1_mozilla_t)
+-			fs_read_removable_files($1_mozilla_t)
+-			fs_read_removable_symlinks($1_mozilla_t)
 -		')
--		#TODO
+-	',`
+-		files_dontaudit_list_tmp($1_mozilla_t)
+-		files_dontaudit_list_home($1_mozilla_t)
+-		fs_dontaudit_list_removable($1_mozilla_t)
+-		fs_dontaudit_read_removable_files($1_mozilla_t)
+-		userdom_dontaudit_list_user_tmp($1,$1_mozilla_t)
+-		userdom_dontaudit_read_user_tmp_files($1,$1_mozilla_t)
+-		userdom_dontaudit_list_user_home_dirs($1,$1_mozilla_t)
+-		userdom_dontaudit_read_user_home_content_files($1,$1_mozilla_t)
+-	')
+-
+-	tunable_policy(`mozilla_read_content && read_default_t',`
+-		files_list_default($1_mozilla_t)
+-		files_read_default_files($1_mozilla_t)
+-		files_read_default_symlinks($1_mozilla_t)
+-	',`
+-		files_dontaudit_read_default_files($1_mozilla_t)
+-		files_dontaudit_list_default($1_mozilla_t)
+-	')
+-
+-	tunable_policy(`mozilla_read_content && read_untrusted_content',`
+-		files_list_tmp($1_mozilla_t)
+-		files_list_home($1_mozilla_t)
+-		userdom_search_user_home_dirs($1,$1_mozilla_t)
+-	
+-		userdom_list_user_untrusted_content($1,$1_mozilla_t)
+-		userdom_read_user_untrusted_content_files($1,$1_mozilla_t)
+-		userdom_read_user_untrusted_content_symlinks($1,$1_mozilla_t)
+-		userdom_list_user_tmp_untrusted_content($1,$1_mozilla_t)
+-		userdom_read_user_tmp_untrusted_content_files($1,$1_mozilla_t)
+-		userdom_read_user_tmp_untrusted_content_symlinks($1,$1_mozilla_t)
+-	',`
+-		files_dontaudit_list_tmp($1_mozilla_t)
+-		files_dontaudit_list_home($1_mozilla_t)
+-		userdom_dontaudit_list_user_home_dirs($1,$1_mozilla_t)
+-		userdom_dontaudit_list_user_untrusted_content($1,$1_mozilla_t)
+-		userdom_dontaudit_read_user_untrusted_content_files($1,$1_mozilla_t)
+-		userdom_dontaudit_list_user_tmp_untrusted_content($1,$1_mozilla_t)
+-		userdom_dontaudit_read_user_tmp_untrusted_content_files($1,$1_mozilla_t)
+-	')
+-
+-	# Save web pages
+-	tunable_policy(`write_untrusted_content && use_nfs_home_dirs',`
+-		files_search_home($1_mozilla_t)
+-
+-		fs_search_auto_mountpoints($1_mozilla_t)
+-		fs_manage_nfs_dirs($1_mozilla_t)
+-		fs_manage_nfs_files($1_mozilla_t)
+-		fs_manage_nfs_symlinks($1_mozilla_t)
+-	',`
+-		fs_dontaudit_list_auto_mountpoints($1_mozilla_t)
+-		fs_dontaudit_manage_nfs_dirs($1_mozilla_t)
+-		fs_dontaudit_manage_nfs_files($1_mozilla_t)
+-	')
+-
+-	tunable_policy(`write_untrusted_content && use_samba_home_dirs',`
+-		files_search_home($1_mozilla_t)
+-
+-		fs_search_auto_mountpoints($1_mozilla_t)
+-		fs_manage_cifs_dirs($1_mozilla_t)
+-		fs_manage_cifs_files($1_mozilla_t)
+-		fs_manage_cifs_symlinks($1_mozilla_t)
+-	',`
+-		fs_dontaudit_list_auto_mountpoints($1_mozilla_t)
+-		fs_dontaudit_manage_cifs_dirs($1_mozilla_t)
+-		fs_dontaudit_manage_cifs_files($1_mozilla_t)
+-	')
+-
+-	tunable_policy(`write_untrusted_content',`
+-		files_search_home($1_mozilla_t)
+-		userdom_manage_user_untrusted_content_tmp_files($1, $1_mozilla_t)
+-		files_tmp_filetrans($1_mozilla_t,$1_untrusted_content_tmp_t,file)
+-		files_tmp_filetrans($1_mozilla_t,$1_untrusted_content_tmp_t,dir)
+-
+-		userdom_manage_user_untrusted_content_files($1,$1_mozilla_t)
+-		userdom_user_home_dir_filetrans($1,$1_mozilla_t,$1_untrusted_content_tmp_t, { file dir })
+-		userdom_user_home_content_filetrans($1,$1_mozilla_t,$1_untrusted_content_tmp_t, { file dir })
+-		',`
+-		files_dontaudit_list_home($1_mozilla_t)
+-		files_dontaudit_list_tmp($1_mozilla_t)
+-
+-		userdom_dontaudit_list_user_home_dirs($1,$1_mozilla_t)
+-		userdom_dontaudit_manage_user_tmp_dirs($1,$1_mozilla_t)
+-		userdom_dontaudit_manage_user_tmp_files($1,$1_mozilla_t)
+-		userdom_dontaudit_manage_user_home_content_dirs($1,$1_mozilla_t)
+-
+-	')
+-
+ 	optional_policy(`
+ 		apache_read_user_scripts($1,$1_mozilla_t)
+ 		apache_read_user_content($1,$1_mozilla_t)
+@@ -362,6 +260,7 @@
+ 
+ 	optional_policy(`
+ 		gnome_stream_connect_gconf_template($1,$1_mozilla_t)
++		gnome_domtrans_user_gconf($1,$1_mozilla_t)
+ 	')
+ 
+ 	optional_policy(`
+@@ -385,25 +284,6 @@
+ 		thunderbird_domtrans_user_thunderbird($1, $1_mozilla_t)
+ 	')
+ 
+-	ifdef(`TODO',`
+-		#NOTE commented out in strict.
+-		######### Launch email client, and make webcal links work
+-		#ifdef(`evolution.te', `
+-		#domain_auto_trans($1_mozilla_t, evolution_exec_t, $1_evolution_t)
+-		#domain_auto_trans($1_mozilla_t, evolution_webcal_exec_t, $1_evolution_webcal_t)
+-		#')
+-	
+-		# Macros for mozilla/mozilla (or other browser) domains.
+-		# FIXME: Rules were removed to centralize policy in a gnome_app macro
+-		# A similar thing might be necessary for mozilla compiled without GNOME
+-		# support (is this possible?). 
+-
+-		# GNOME integration
 -		optional_policy(`
--			allow $1_uml_t $1_xauth_home_t:file { getattr read };
+-			gnome_application($1_mozilla, $1)
+-			gnome_file_dialog($1_mozilla, $1)
 -		')
 -	')
  ')
  
  ########################################
+@@ -576,3 +456,27 @@
+ 
+ 	allow $2 $1_mozilla_t:tcp_socket rw_socket_perms;
+ ')
++
++########################################
++## <summary>
++##	mozilla connection template.
++## </summary>
++## <param name="userdomain_prefix">
++##	<summary>
++##	The prefix of the user domain (e.g., user
++##	is the prefix for user_t).
++##	</summary>
++## </param>
++## <param name="user_domain">
++##	<summary>
++##	The type of the user domain.
++##	</summary>
++## </param>
++#
++template(`mozilla_stream_connect_template',`
++	gen_require(`
++		type $1_mozilla_t;
++	')
++
++	allow $2 $1_mozilla_t:unix_stream_socket connectto;
++')
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/apps/mozilla.te serefpolicy-3.0.1/policy/modules/apps/mozilla.te
+--- nsaserefpolicy/policy/modules/apps/mozilla.te	2007-06-11 16:05:29.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/apps/mozilla.te	2007-06-19 17:06:27.000000000 -0400
+@@ -6,13 +6,6 @@
+ # Declarations
+ #
+ 
+-## <desc>
+-## <p>
+-## Control mozilla content access
+-## </p>
+-## </desc>
+-gen_tunable(mozilla_read_content,false)
+-
+ type mozilla_conf_t;
+ files_config_file(mozilla_conf_t)
+ 
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/apps/slocate.te serefpolicy-3.0.1/policy/modules/apps/slocate.te
+--- nsaserefpolicy/policy/modules/apps/slocate.te	2007-06-15 14:54:31.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/apps/slocate.te	2007-06-19 17:06:27.000000000 -0400
+@@ -29,6 +29,8 @@
+ manage_dirs_pattern(locate_t,locate_var_lib_t,locate_var_lib_t)
+ manage_files_pattern(locate_t,locate_var_lib_t,locate_var_lib_t)
+ 
++auth_use_nsswitch(locate_t)
++
+ kernel_read_system_state(locate_t)
+ kernel_dontaudit_search_sysctl(locate_t)
+ 
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/apps/thunderbird.if serefpolicy-3.0.1/policy/modules/apps/thunderbird.if
+--- nsaserefpolicy/policy/modules/apps/thunderbird.if	2007-05-29 14:10:48.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/apps/thunderbird.if	2007-06-19 17:06:27.000000000 -0400
+@@ -104,6 +104,7 @@
+ 	
+ 	# Startup shellscript
+ 	corecmd_exec_shell($1_thunderbird_t)
++	corecmd_exec_bin($1_thunderbird_t)
+ 
+ 	corenet_non_ipsec_sendrecv($1_thunderbird_t)
+ 	corenet_tcp_sendrecv_generic_if($1_thunderbird_t)
+@@ -162,7 +163,9 @@
+ 	userdom_manage_user_tmp_sockets($1,$1_thunderbird_t)
+ 	# .kde/....gtkrc
+ 	userdom_read_user_home_content_files($1,$1_thunderbird_t)
+-
++	userdom_dontaudit_use_user_terminals($1,$1_thunderbird_t)
++	userdom_user_home_dir_filetrans($1,$1_thunderbird_t, $1_thunderbird_home_t,dir)
++	
+ 	xserver_user_client_template($1,$1_thunderbird_t,$1_thunderbird_tmpfs_t)
+ 	xserver_read_xdm_tmp_files($1_thunderbird_t)
+ 	xserver_dontaudit_getattr_xdm_tmp_sockets($1_thunderbird_t)
+@@ -299,7 +302,7 @@
+ 		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)
+-		userdom_user_home_dir_filetrans($1,$1_thunderbird_t,$1_untrusted_content_tmp_t, { file dir })
++		userdom_user_home_dir_filetrans($1,$1_thunderbird_t,$1_untrusted_content_tmp_t, file)
+ 		userdom_user_home_content_filetrans($1,$1_thunderbird_t,$1_untrusted_content_tmp_t, { file dir })
+ 	',`
+ 		files_dontaudit_list_home($1_thunderbird_t)
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/apps/userhelper.if serefpolicy-3.0.1/policy/modules/apps/userhelper.if
+--- nsaserefpolicy/policy/modules/apps/userhelper.if	2007-05-29 14:10:48.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/apps/userhelper.if	2007-06-19 17:06:27.000000000 -0400
+@@ -131,6 +131,7 @@
+ 	term_use_all_user_ptys($1_userhelper_t)
+ 
+ 	auth_domtrans_chk_passwd($1_userhelper_t)
++	auth_domtrans_upd_passwd($1_userhelper_t)
+ 	auth_manage_pam_pid($1_userhelper_t)
+ 	auth_manage_var_auth($1_userhelper_t)
+ 	auth_search_pam_console_data($1_userhelper_t)
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/apps/vmware.fc serefpolicy-3.0.1/policy/modules/apps/vmware.fc
+--- nsaserefpolicy/policy/modules/apps/vmware.fc	2007-05-29 14:10:48.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/apps/vmware.fc	2007-06-21 05:45:56.000000000 -0400
+@@ -23,6 +23,7 @@
+ /usr/bin/vmware-smbd		--	gen_context(system_u:object_r:vmware_host_exec_t,s0)
+ /usr/bin/vmware-smbpasswd	--	gen_context(system_u:object_r:vmware_host_exec_t,s0)
+ /usr/bin/vmware-smbpasswd\.bin	--	gen_context(system_u:object_r:vmware_host_exec_t,s0)
++/usr/bin/vmware-vmx		--	gen_context(system_u:object_r:vmware_host_exec_t,s0)
+ /usr/bin/vmware-wizard		--	gen_context(system_u:object_r:vmware_exec_t,s0)
+ /usr/bin/vmware			--	gen_context(system_u:object_r:vmware_exec_t,s0)
+ 
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/apps/vmware.te serefpolicy-3.0.1/policy/modules/apps/vmware.te
+--- nsaserefpolicy/policy/modules/apps/vmware.te	2007-05-29 14:10:48.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/apps/vmware.te	2007-06-21 13:41:35.000000000 -0400
+@@ -55,6 +55,8 @@
+ corenet_tcp_sendrecv_all_ports(vmware_host_t)
+ corenet_udp_sendrecv_all_ports(vmware_host_t)
+ corenet_raw_bind_all_nodes(vmware_host_t)
++corenet_tcp_bind_all_nodes(vmware_host_t)
++corenet_udp_bind_all_nodes(vmware_host_t)
+ corenet_tcp_connect_all_ports(vmware_host_t)
+ corenet_sendrecv_all_client_packets(vmware_host_t)
+ corenet_sendrecv_all_server_packets(vmware_host_t)
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/apps/wine.if serefpolicy-3.0.1/policy/modules/apps/wine.if
+--- nsaserefpolicy/policy/modules/apps/wine.if	2007-05-29 14:10:48.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/apps/wine.if	2007-06-19 17:06:27.000000000 -0400
+@@ -18,3 +18,34 @@
+ 	corecmd_search_bin($1)
+ 	domtrans_pattern($1, wine_exec_t, wine_t)
+ ')
++
++########################################
++## <summary>
++##	Execute wine in the wine domain, and
++##	allow the specified role the wine domain.
++## </summary>
++## <param name="domain">
++##	<summary>
++##	The type of the process performing this action.
++##	</summary>
++## </param>
++## <param name="role">
++##	<summary>
++##	The role to be allowed the wine domain.
++##	</summary>
++## </param>
++## <param name="terminal">
++##	<summary>
++##	The type of the terminal allow the wine domain to use.
++##	</summary>
++## </param>
++#
++interface(`wine_run',`
++	gen_require(`
++		type wine_t;
++	')
++
++	wine_domtrans($1)
++	role $2 types wine_t;
++	allow wine_t $3:chr_file rw_term_perms;
++')
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/corecommands.fc serefpolicy-3.0.1/policy/modules/kernel/corecommands.fc
 --- nsaserefpolicy/policy/modules/kernel/corecommands.fc	2007-05-29 14:10:48.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/kernel/corecommands.fc	2007-05-30 16:20:21.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/kernel/corecommands.fc	2007-06-21 06:07:11.000000000 -0400
 @@ -36,6 +36,11 @@
  /etc/cipe/ip-up.*		--	gen_context(system_u:object_r:bin_t,s0)
  /etc/cipe/ip-down.*		--	gen_context(system_u:object_r:bin_t,s0)
@@ -1180,7 +1847,15 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/coreco
  /etc/hotplug/.*agent		--	gen_context(system_u:object_r:bin_t,s0)
  /etc/hotplug/.*rc		-- 	gen_context(system_u:object_r:bin_t,s0)
  /etc/hotplug/hotplug\.functions --	gen_context(system_u:object_r:bin_t,s0)
-@@ -244,6 +249,7 @@
+@@ -216,6 +221,7 @@
+ /usr/share/system-config-network/neat-control\.py -- gen_context(system_u:object_r:bin_t,s0)
+ /usr/share/system-config-nfs/nfs-export\.py -- gen_context(system_u:object_r:bin_t,s0)
+ /usr/share/system-config-nfs/system-config-nfs\.py -- gen_context(system_u:object_r:bin_t,s0)
++/usr/share/system-config-printer/applet\.py -- gen_context(system_u:object_r:bin_t,s0)
+ /usr/share/system-config-rootpassword/system-config-rootpassword -- gen_context(system_u:object_r:bin_t,s0)
+ /usr/share/system-config-samba/system-config-samba\.py -- gen_context(system_u:object_r:bin_t,s0)
+ /usr/share/system-config-securitylevel/system-config-securitylevel\.py -- gen_context(system_u:object_r:bin_t,s0)
+@@ -244,6 +250,7 @@
  /var/ftp/bin(/.*)?			gen_context(system_u:object_r:bin_t,s0)
  
  /usr/lib/yp/.+			--	gen_context(system_u:object_r:bin_t,s0)
@@ -1188,7 +1863,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/coreco
  
  /var/qmail/bin                  -d      gen_context(system_u:object_r:bin_t,s0)
  /var/qmail/bin(/.*)?                    gen_context(system_u:object_r:bin_t,s0)
-@@ -252,3 +258,5 @@
+@@ -252,3 +259,5 @@
  ifdef(`distro_suse',`
  /var/lib/samba/bin/.+			gen_context(system_u:object_r:bin_t,s0)
  ')
@@ -1196,7 +1871,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/coreco
 +
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/corecommands.if serefpolicy-3.0.1/policy/modules/kernel/corecommands.if
 --- nsaserefpolicy/policy/modules/kernel/corecommands.if	2007-05-29 14:10:48.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/kernel/corecommands.if	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/kernel/corecommands.if	2007-06-19 17:06:27.000000000 -0400
 @@ -980,3 +980,23 @@
  
  	mmap_files_pattern($1,bin_t,exec_type)
@@ -1223,7 +1898,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/coreco
 +
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/corenetwork.te.in serefpolicy-3.0.1/policy/modules/kernel/corenetwork.te.in
 --- nsaserefpolicy/policy/modules/kernel/corenetwork.te.in	2007-05-30 11:47:28.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/kernel/corenetwork.te.in	2007-05-31 14:35:16.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/kernel/corenetwork.te.in	2007-06-20 15:42:14.000000000 -0400
 @@ -48,6 +48,11 @@
  type reserved_port_t, port_type, reserved_port_type;
  
@@ -1249,7 +1924,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/corene
  network_port(innd, tcp,119,s0)
  network_port(ipp, tcp,631,s0, udp,631,s0)
  network_port(ircd, tcp,6667,s0)
-@@ -101,7 +106,7 @@
+@@ -101,12 +106,13 @@
  network_port(kerberos_master, tcp,4444,s0, udp,4444,s0)
  network_port(kerberos, tcp,88,s0, udp,88,s0, tcp,750,s0, udp,750,s0)
  network_port(ktalkd, udp,517,s0, udp,518,s0)
@@ -1258,7 +1933,21 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/corene
  type lrrd_port_t, port_type; dnl network_port(lrrd_port_t) # no defined portcon
  network_port(lmtp, tcp,24,s0, udp,24,s0)
  network_port(mail, tcp,2000,s0)
-@@ -160,6 +165,9 @@
+ network_port(monopd, tcp,1234,s0)
+-network_port(mysqld, tcp,3306,s0)
++network_port(mysqld, tcp,3306,s0, tcp,1186,s0)
++portcon tcp 63132-63163 gen_context(system_u:object_r:mysqld_port_t, s0)
+ network_port(nessus, tcp,1241,s0)
+ network_port(netsupport, tcp,5405,s0, udp,5405,s0)
+ network_port(nmbd, udp,137,s0, udp,138,s0)
+@@ -154,12 +160,15 @@
+ network_port(uucpd, tcp,540,s0)
+ network_port(vnc, tcp,5900,s0)
+ network_port(xen, tcp,8002,s0)
+-network_port(xserver, tcp, 6000, s0, tcp,6001,s0, tcp,6002,s0, tcp,6003,s0, tcp,6004,s0, tcp,6005,s0, tcp,6006,s0, tcp,6007,s0, tcp,6008,s0, tcp,6009,s0, tcp,6010,s0, tcp,6011,s0, tcp,6012,s0, tcp,6013,s0, tcp,6014,s0, tcp,6015,s0, tcp,6016,s0, tcp,6017,s0, tcp,6018,s0, tcp,6019,s0)
++network_port(xserver, tcp, 6000, s0, tcp,6001,s0, tcp,6002,s0, tcp,6003,s0, tcp,6004,s0, tcp,6005,s0, tcp,6006,s0, tcp,6007,s0, tcp,6008,s0, tcp,6009,s0, tcp,6010,s0, tcp,6011,s0, tcp,6012,s0, tcp,6013,s0, tcp,6014,s0, tcp,6015,s0, tcp,6016,s0, tcp,6017,s0, tcp,6018,s0, tcp,6019,s0, tcp,6020,s0)
+ network_port(zebra, tcp,2600,s0, tcp,2601,s0, tcp,2602,s0, tcp,2603,s0, tcp,2604,s0, tcp,2606,s0, udp,2600,s0, udp,2601,s0, udp,2602,s0, udp,2603,s0, udp,2604,s0, udp,2606,s0)
+ network_port(zope, tcp,8021,s0)
  
  # Defaults for reserved ports.  Earlier portcon entries take precedence;
  # these entries just cover any remaining reserved ports not otherwise declared.
@@ -1269,29 +1958,20 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/corene
  portcon udp 1-1023 gen_context(system_u:object_r:reserved_port_t, s0)
  
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/devices.fc serefpolicy-3.0.1/policy/modules/kernel/devices.fc
---- nsaserefpolicy/policy/modules/kernel/devices.fc	2007-05-29 14:10:48.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/kernel/devices.fc	2007-05-30 15:12:50.000000000 -0400
-@@ -19,6 +19,7 @@
- /dev/evtchn		-c	gen_context(system_u:object_r:xen_device_t,s0)
- /dev/fb[0-9]*		-c	gen_context(system_u:object_r:framebuf_device_t,s0)
- /dev/full		-c	gen_context(system_u:object_r:null_device_t,s0)
-+/dev/fw.*		-c	gen_context(system_u:object_r:usb_device_t,s0)
- /dev/hiddev.*		-c	gen_context(system_u:object_r:usb_device_t,s0)
- /dev/hpet		-c	gen_context(system_u:object_r:clock_device_t,s0)
- /dev/hw_random		-c	gen_context(system_u:object_r:random_device_t,s0)
-@@ -81,6 +82,8 @@
- 
- /dev/bus/usb/.*/[0-9]+	-c	gen_context(system_u:object_r:usb_device_t,s0)
- 
-+/dev/cmx.*		-c	gen_context(system_u:object_r:smartcard_device_t,s0)
+--- nsaserefpolicy/policy/modules/kernel/devices.fc	2007-06-15 14:54:30.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/kernel/devices.fc	2007-06-19 17:06:27.000000000 -0400
+@@ -127,3 +127,7 @@
+ /var/named/chroot/dev/random -c	gen_context(system_u:object_r:random_device_t,s0)
+ /var/named/chroot/dev/zero -c	gen_context(system_u:object_r:zero_device_t,s0)
+ ')
++
++/etc/udev/devices -d	gen_context(system_u:object_r:device_t,s0)
++/lib/udev/devices -d	gen_context(system_u:object_r:device_t,s0)
 +
- /dev/cpu/.*		-c	gen_context(system_u:object_r:cpu_device_t,s0)
- /dev/cpu/mtrr		-c	gen_context(system_u:object_r:mtrr_device_t,s0)
- 
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/devices.if serefpolicy-3.0.1/policy/modules/kernel/devices.if
---- nsaserefpolicy/policy/modules/kernel/devices.if	2007-05-30 11:47:28.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/kernel/devices.if	2007-05-30 15:12:50.000000000 -0400
-@@ -2729,6 +2729,24 @@
+--- nsaserefpolicy/policy/modules/kernel/devices.if	2007-06-15 14:54:30.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/kernel/devices.if	2007-06-19 17:06:27.000000000 -0400
+@@ -2803,6 +2803,24 @@
  
  ########################################
  ## <summary>
@@ -1316,141 +1996,53 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/device
  ##	Do not audit attempts to get the attributes
  ##	of a directory in the usb filesystem.
  ## </summary>
-@@ -3210,3 +3228,78 @@
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/domain.if serefpolicy-3.0.1/policy/modules/kernel/domain.if
+--- nsaserefpolicy/policy/modules/kernel/domain.if	2007-06-19 16:23:34.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/kernel/domain.if	2007-06-22 14:11:30.000000000 -0400
+@@ -45,6 +45,11 @@
+ 	# start with basic domain
+ 	domain_base_type($1)
  
- 	typeattribute $1 devices_unconfined_type;
- ')
++	optional_policy(`
++		unconfined_use_fds($1)
++		unconfined_sigchld($1)
++	')
 +
+ 	# send init a sigchld and signull
+ 	optional_policy(`
+ 		init_sigchld($1)
+@@ -59,6 +64,7 @@
+ 	')
+ 
+ 	optional_policy(`
++		selinux_dontaudit_getattr_fs($1)
+ 		selinux_dontaudit_read_fs($1)
+ 	')
+ 
+@@ -1271,3 +1277,20 @@
+ 	typeattribute $1 mmap_low_domain_type;
+ ')
+ 
 +########################################
 +## <summary>
-+##	Getattr on smartcard devices
++##	Allow specified type to associate ipsec packets from any domain
 +## </summary>
-+## <param name="domain">
++## <param name="type">
 +##	<summary>
-+##	Domain allowed access.
++##	Type of subject to be allowed this.
 +##	</summary>
 +## </param>
 +#
-+interface(`dev_getattr_smartcard',`
++interface(`domain_ipsec_labels',`
 +	gen_require(`
-+		type smartcard_device_t;
-+	')
-+
-+	allow $1 smartcard_device_t:chr_file getattr;
-+
-+')
-+
-+########################################
-+## <summary>
-+##	dontaudit getattr on smartcard devices
-+## </summary>
-+## <param name="domain">
-+##	<summary>
-+##	Domain allowed access.
-+##	</summary>
-+## </param>
-+#
-+interface(`dev_dontaudit_getattr_smartcard',`
-+	gen_require(`
-+		type smartcard_device_t;
-+	')
-+
-+	dontaudit $1 smartcard_device_t:chr_file getattr;
-+
-+')
-+
-+########################################
-+## <summary>
-+##	Read and write smartcard devices.
-+## </summary>
-+## <param name="domain">
-+##	<summary>
-+##	Domain allowed access.
-+##	</summary>
-+## </param>
-+#
-+interface(`dev_rw_smartcard',`
-+	gen_require(`
-+		type device_t, smartcard_device_t;
-+	')
-+
-+	rw_chr_files_pattern($1,device_t,smartcard_device_t)
-+')
-+
-+########################################
-+## <summary>
-+##	Create, read, write, and delete smartcard devices.
-+## </summary>
-+## <param name="domain">
-+##	<summary>
-+##	Domain allowed access.
-+##	</summary>
-+## </param>
-+#
-+interface(`dev_manage_smartcard',`
-+	gen_require(`
-+		type device_t, smartcard_device_t;
-+	')
-+
-+	manage_chr_files_pattern($1,device_t,smartcard_device_t)
-+')
-+
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/devices.te serefpolicy-3.0.1/policy/modules/kernel/devices.te
---- nsaserefpolicy/policy/modules/kernel/devices.te	2007-05-30 11:47:28.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/kernel/devices.te	2007-05-30 15:12:50.000000000 -0400
-@@ -139,6 +139,12 @@
- #
- # Type for sound devices and mixers
- #
-+type smartcard_device_t;
-+dev_node(smartcard_device_t)
-+
-+#
-+# Type for sound devices and mixers
-+#
- type sound_device_t;
- dev_node(sound_device_t)
- 
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/domain.if serefpolicy-3.0.1/policy/modules/kernel/domain.if
---- nsaserefpolicy/policy/modules/kernel/domain.if	2007-05-29 14:10:48.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/kernel/domain.if	2007-05-30 17:11:03.000000000 -0400
-@@ -45,6 +45,11 @@
- 	# start with basic domain
- 	domain_base_type($1)
- 
-+	optional_policy(`
-+		unconfined_use_fds($1)
-+		unconfined_sigchld($1)
-+	')
-+
- 	# send init a sigchld and signull
- 	optional_policy(`
- 		init_sigchld($1)
-@@ -1247,3 +1252,21 @@
- 	typeattribute $1 set_curr_context;
- 	typeattribute $1 process_uncond_exempt;
- ')
-+
-+########################################
-+## <summary>
-+##	Allow specified type to associate ipsec packets from any domain
-+## </summary>
-+## <param name="type">
-+##	<summary>
-+##	Type of subject to be allowed this.
-+##	</summary>
-+## </param>
-+#
-+interface(`domain_ipsec_labels',`
-+	gen_require(`
-+		attribute domain;
-+ 	')
-+ 
-+	allow $1 domain:association { sendto recvfrom };
++		attribute domain;
++ 	')
++ 
++	allow $1 domain:association { sendto recvfrom };
 +')
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/domain.te serefpolicy-3.0.1/policy/modules/kernel/domain.te
---- nsaserefpolicy/policy/modules/kernel/domain.te	2007-05-29 14:10:48.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/kernel/domain.te	2007-05-30 15:12:50.000000000 -0400
+--- nsaserefpolicy/policy/modules/kernel/domain.te	2007-06-19 16:23:34.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/kernel/domain.te	2007-06-22 14:10:08.000000000 -0400
 @@ -6,6 +6,29 @@
  # Declarations
  #
@@ -1481,12 +2073,11 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/domain
  # Mark process types as domains
  attribute domain;
  
-@@ -130,3 +153,26 @@
+@@ -134,3 +157,25 @@
  
  # act on all domains keys
  allow unconfined_domain_type domain:key *;
 +
-+
 +# xdm passes an open file descriptor to xsession-errors.log which is then audited by all confined domains.
 +optional_policy(`
 +	xserver_dontaudit_use_xdm_fds(domain)
@@ -1510,7 +2101,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/domain
 +')
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/files.fc serefpolicy-3.0.1/policy/modules/kernel/files.fc
 --- nsaserefpolicy/policy/modules/kernel/files.fc	2007-05-29 14:10:48.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/kernel/files.fc	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/kernel/files.fc	2007-06-19 17:06:27.000000000 -0400
 @@ -45,7 +45,6 @@
  /etc			-d	gen_context(system_u:object_r:etc_t,s0)
  /etc/.*				gen_context(system_u:object_r:etc_t,s0)
@@ -1529,7 +2120,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/files.
  /etc/nologin.*		--	gen_context(system_u:object_r:etc_runtime_t,s0)
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/files.if serefpolicy-3.0.1/policy/modules/kernel/files.if
 --- nsaserefpolicy/policy/modules/kernel/files.if	2007-05-29 14:10:48.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/kernel/files.if	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/kernel/files.if	2007-06-19 17:06:27.000000000 -0400
 @@ -343,8 +343,7 @@
  
  ########################################
@@ -1641,7 +2232,32 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/files.
  ##	Get the attributes of files in /usr.
  ## </summary>
  ## <param name="domain">
-@@ -3632,7 +3684,7 @@
+@@ -3381,6 +3433,24 @@
+ 
+ ########################################
+ ## <summary>
++##	Relabel a file from the type used in /usr.
++## </summary>
++## <param name="domain">
++##	<summary>
++##	Domain allowed access.
++##	</summary>
++## </param>
++#
++interface(`files_relabelfrom_usr_files',`
++	gen_require(`
++		type usr_t;
++	')
++
++	relabelfrom_files_pattern($1,usr_t,usr_t)
++')
++
++########################################
++## <summary>
+ ##	Read symbolic links in /usr.
+ ## </summary>
+ ## <param name="domain">
+@@ -3632,7 +3702,7 @@
  		type var_t;
  	')
  
@@ -1650,7 +2266,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/files.
  ')
  
  ########################################
-@@ -3988,7 +4040,7 @@
+@@ -3988,7 +4058,7 @@
  		type var_lock_t;
  	')
  
@@ -1659,7 +2275,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/files.
  ')
  
  ########################################
-@@ -4007,7 +4059,7 @@
+@@ -4007,7 +4077,7 @@
  		type var_t, var_lock_t;
  	')
  
@@ -1668,7 +2284,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/files.
  ')
  
  ########################################
-@@ -4176,7 +4228,7 @@
+@@ -4176,7 +4246,7 @@
  		type var_run_t;
  	')
  
@@ -1677,7 +2293,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/files.
  ')
  
  ########################################
-@@ -4524,6 +4576,8 @@
+@@ -4524,6 +4594,8 @@
  	# Need to give access to /selinux/member
  	selinux_compute_member($1)
  
@@ -1686,7 +2302,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/files.
  	# Need sys_admin capability for mounting
  	allow $1 self:capability { chown fsetid sys_admin };
  
-@@ -4546,6 +4600,8 @@
+@@ -4546,6 +4618,8 @@
  	# Default type for mountpoints
  	allow $1 poly_t:dir { create mounton };
  	fs_unmount_xattr_fs($1)
@@ -1695,7 +2311,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/files.
  ')
  
  ########################################
-@@ -4583,3 +4639,28 @@
+@@ -4583,3 +4657,28 @@
  
  	allow $1 { file_type -security_file_type }:dir manage_dir_perms;
  ')
@@ -1724,20 +2340,9 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/files.
 +	allow $1 root_t:dir rw_dir_perms;
 +	allow $1 root_t:file { create getattr write };
 +')
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/files.te serefpolicy-3.0.1/policy/modules/kernel/files.te
---- nsaserefpolicy/policy/modules/kernel/files.te	2007-05-29 14:10:48.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/kernel/files.te	2007-05-30 15:12:50.000000000 -0400
-@@ -54,6 +54,7 @@
- files_type(etc_t)
- # compatibility aliases for removed types:
- typealias etc_t alias automount_etc_t;
-+typealias etc_t alias snmpd_etc_t;
- 
- #
- # etc_runtime_t is the type of various
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/filesystem.if serefpolicy-3.0.1/policy/modules/kernel/filesystem.if
 --- nsaserefpolicy/policy/modules/kernel/filesystem.if	2007-05-29 14:10:48.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/kernel/filesystem.if	2007-05-31 11:04:05.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/kernel/filesystem.if	2007-06-19 17:06:27.000000000 -0400
 @@ -1096,6 +1096,24 @@
  
  ########################################
@@ -1815,7 +2420,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/filesy
 +')
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/filesystem.te serefpolicy-3.0.1/policy/modules/kernel/filesystem.te
 --- nsaserefpolicy/policy/modules/kernel/filesystem.te	2007-05-29 14:10:48.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/kernel/filesystem.te	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/kernel/filesystem.te	2007-06-19 17:06:27.000000000 -0400
 @@ -54,17 +54,29 @@
  
  type capifs_t;
@@ -1877,37 +2482,8 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/filesy
  #
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/kernel.if serefpolicy-3.0.1/policy/modules/kernel/kernel.if
 --- nsaserefpolicy/policy/modules/kernel/kernel.if	2007-05-29 14:10:48.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/kernel/kernel.if	2007-05-31 11:09:09.000000000 -0400
-@@ -661,22 +661,24 @@
- 	dontaudit $1 proc_t:dir list_dir_perms;
- ')
- 
-+
- ########################################
- ## <summary>
--##	Get the attributes of files in /proc.
-+##	Do not audit attempts to list the
-+##	contents of directories in /proc.
- ## </summary>
- ## <param name="domain">
- ##	<summary>
--##	Domain allowed access.
-+##	Domain to not audit.
- ##	</summary>
- ## </param>
- #
--interface(`kernel_getattr_proc_files',`
-+interface(`kernel_dontaudit_list_proc',`
- 	gen_require(`
- 		type proc_t;
- 	')
- 
--	getattr_files_pattern($1,proc_t,proc_t)
-+	dontaudit $1 proc_t:dir list_dir_perms;
- ')
- 
- ########################################
-@@ -1122,6 +1124,24 @@
++++ serefpolicy-3.0.1/policy/modules/kernel/kernel.if	2007-06-22 13:42:39.000000000 -0400
+@@ -1122,6 +1122,24 @@
  
  ########################################
  ## <summary>
@@ -1932,7 +2508,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/kernel
  ##	Do not audit attempts by caller to search
  ##	the base directory of sysctls.
  ## </summary>
-@@ -1848,6 +1868,26 @@
+@@ -1848,6 +1866,26 @@
  
  ########################################
  ## <summary>
@@ -1959,7 +2535,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/kernel
  ##	Do not audit attempts to list unlabeled directories.
  ## </summary>
  ## <param name="domain">
-@@ -2158,9 +2198,6 @@
+@@ -2158,9 +2196,6 @@
  	')
  
  	allow $1 unlabeled_t:association { sendto recvfrom };
@@ -1969,7 +2545,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/kernel
  ')
  
  ########################################
-@@ -2426,3 +2463,23 @@
+@@ -2426,3 +2461,23 @@
  
  	typeattribute $1 kern_unconfined;
  ')
@@ -1995,7 +2571,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/kernel
 +
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/kernel.te serefpolicy-3.0.1/policy/modules/kernel/kernel.te
 --- nsaserefpolicy/policy/modules/kernel/kernel.te	2007-05-29 14:10:48.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/kernel/kernel.te	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/kernel/kernel.te	2007-06-19 17:06:27.000000000 -0400
 @@ -146,6 +146,8 @@
  type unlabeled_t;
  sid unlabeled gen_context(system_u:object_r:unlabeled_t,mls_systemhigh)
@@ -2026,7 +2602,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/kernel
  	# get stuck if you do not allow unlabeled processes to signal init.
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/mls.if serefpolicy-3.0.1/policy/modules/kernel/mls.if
 --- nsaserefpolicy/policy/modules/kernel/mls.if	2007-05-29 14:10:48.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/kernel/mls.if	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/kernel/mls.if	2007-06-19 17:06:27.000000000 -0400
 @@ -154,6 +154,26 @@
  ########################################
  ## <summary>
@@ -2056,7 +2632,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/mls.if
  ## <param name="domain">
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/mls.te serefpolicy-3.0.1/policy/modules/kernel/mls.te
 --- nsaserefpolicy/policy/modules/kernel/mls.te	2007-05-29 14:10:48.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/kernel/mls.te	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/kernel/mls.te	2007-06-19 17:06:27.000000000 -0400
 @@ -18,6 +18,7 @@
  attribute mlsnetreadtoclr;
  attribute mlsnetwrite;
@@ -2076,7 +2652,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/mls.te
  attribute privrangetrans;
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/selinux.if serefpolicy-3.0.1/policy/modules/kernel/selinux.if
 --- nsaserefpolicy/policy/modules/kernel/selinux.if	2007-05-29 14:10:48.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/kernel/selinux.if	2007-05-31 11:13:10.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/kernel/selinux.if	2007-06-19 17:06:27.000000000 -0400
 @@ -51,6 +51,44 @@
  
  ########################################
@@ -2123,8 +2699,8 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/selinu
  ## </summary>
  ## <param name="domain">
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/storage.if serefpolicy-3.0.1/policy/modules/kernel/storage.if
---- nsaserefpolicy/policy/modules/kernel/storage.if	2007-05-29 14:10:48.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/kernel/storage.if	2007-05-30 15:12:50.000000000 -0400
+--- nsaserefpolicy/policy/modules/kernel/storage.if	2007-06-15 14:54:30.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/kernel/storage.if	2007-06-19 17:06:27.000000000 -0400
 @@ -100,6 +100,7 @@
  
  	dev_list_all_dev_nodes($1)
@@ -2141,61 +2717,9 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/storag
  	typeattribute $1 fixed_disk_raw_write;
  ')
  
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/terminal.if serefpolicy-3.0.1/policy/modules/kernel/terminal.if
---- nsaserefpolicy/policy/modules/kernel/terminal.if	2007-05-29 14:10:48.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/kernel/terminal.if	2007-05-31 09:48:57.000000000 -0400
-@@ -44,11 +44,11 @@
- #
- interface(`term_user_pty',`
- 	gen_require(`
--		attribute server_ptynode;
-+		attribute ptynode;
- 	')
- 
- 	term_pty($2)
--	type_change $1 server_ptynode:chr_file $2;
-+	type_change $1 ptynode:chr_file $2;
- ')
- 
- ########################################
-@@ -278,6 +278,25 @@
- 
- ########################################
- ## <summary>
-+##	Relabel from and to the console_device_t
-+## </summary>
-+## <param name="domain">
-+##	<summary>
-+##	Domain allowed access.
-+##	</summary>
-+## </param>
-+#
-+interface(`term_relabel_console',`
-+	gen_require(`
-+		type console_device_t;
-+	')
-+
-+	dev_list_all_dev_nodes($1)
-+	allow $1 console_device_t:chr_file { relabelfrom relabelto };
-+')
-+
-+########################################
-+## <summary>
- ##	Create the console device (/dev/console).
- ## </summary>
- ## <param name="domain">
-@@ -1052,7 +1071,7 @@
- 	')
- 
- 	dev_list_all_dev_nodes($1)
--	allow $1 ttynode:chr_file { getattr write };
-+	allow $1 ttynode:chr_file { getattr write append };
- ')
- 
- ########################################
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/terminal.te serefpolicy-3.0.1/policy/modules/kernel/terminal.te
---- nsaserefpolicy/policy/modules/kernel/terminal.te	2007-05-29 14:10:48.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/kernel/terminal.te	2007-05-30 15:12:50.000000000 -0400
+--- nsaserefpolicy/policy/modules/kernel/terminal.te	2007-06-15 14:54:30.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/kernel/terminal.te	2007-06-19 17:06:27.000000000 -0400
 @@ -28,9 +28,15 @@
  type devpts_t;
  files_mountpoint(devpts_t)
@@ -2223,21 +2747,11 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/kernel/termin
  #
  # usbtty_device_t is the type of /dev/usr/tty*
  #
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/aide.te serefpolicy-3.0.1/policy/modules/services/aide.te
---- nsaserefpolicy/policy/modules/services/aide.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/aide.te	2007-05-30 15:12:50.000000000 -0400
-@@ -26,7 +26,7 @@
- 
- allow aide_t self:capability { dac_override fowner };
- 
--send_audit_msgs_pattern(aide_t)
-+logging_send_audit_msg(aide_t)
- 
- # database actions
- manage_files_pattern(aide_t,aide_db_t,aide_db_t)
+Binary files nsaserefpolicy/policy/modules/services/afs.pp and serefpolicy-3.0.1/policy/modules/services/afs.pp differ
+Binary files nsaserefpolicy/policy/modules/services/aide.pp and serefpolicy-3.0.1/policy/modules/services/aide.pp differ
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/amavis.if serefpolicy-3.0.1/policy/modules/services/amavis.if
 --- nsaserefpolicy/policy/modules/services/amavis.if	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/amavis.if	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/amavis.if	2007-06-21 05:35:11.000000000 -0400
 @@ -167,3 +167,22 @@
  	allow $1 amavis_var_run_t:file setattr;
  	files_search_pids($1)
@@ -2261,9 +2775,10 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/amav
 +	allow $1 amavis_var_run_t:file create_file_perms;
 +	files_search_pids($1)
 +')
+Binary files nsaserefpolicy/policy/modules/services/amavis.pp and serefpolicy-3.0.1/policy/modules/services/amavis.pp differ
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/amavis.te serefpolicy-3.0.1/policy/modules/services/amavis.te
 --- nsaserefpolicy/policy/modules/services/amavis.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/amavis.te	2007-05-31 10:49:54.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/amavis.te	2007-06-21 05:35:33.000000000 -0400
 @@ -165,6 +165,7 @@
  
  optional_policy(`
@@ -2274,7 +2789,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/amav
  optional_policy(`
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/apache.fc serefpolicy-3.0.1/policy/modules/services/apache.fc
 --- nsaserefpolicy/policy/modules/services/apache.fc	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/apache.fc	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/apache.fc	2007-06-19 17:06:27.000000000 -0400
 @@ -16,7 +16,6 @@
  
  /usr/lib/apache-ssl/.+		--	gen_context(system_u:object_r:httpd_exec_t,s0)
@@ -2297,7 +2812,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/apac
 +
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/apache.if serefpolicy-3.0.1/policy/modules/services/apache.if
 --- nsaserefpolicy/policy/modules/services/apache.if	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/apache.if	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/apache.if	2007-06-19 17:06:27.000000000 -0400
 @@ -18,10 +18,6 @@
  		attribute httpd_script_exec_type;
  		type httpd_t, httpd_suexec_t, httpd_log_t;
@@ -2320,7 +2835,54 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/apac
  	# Allow the web server to run scripts and serve pages
  	tunable_policy(`httpd_builtin_scripting',`
  		manage_dirs_pattern(httpd_t,httpd_$1_script_rw_t,httpd_$1_script_rw_t)
-@@ -268,8 +260,11 @@
+@@ -177,46 +169,6 @@
+ 		miscfiles_read_localization(httpd_$1_script_t)
+ 	')
+ 
+-	tunable_policy(`httpd_enable_cgi && httpd_can_network_connect_db',`
+-		allow httpd_$1_script_t self:tcp_socket create_stream_socket_perms;
+-		allow httpd_$1_script_t self:udp_socket create_socket_perms;
+-
+-		corenet_non_ipsec_sendrecv(httpd_$1_script_t)
+-		corenet_tcp_sendrecv_all_if(httpd_$1_script_t)
+-		corenet_udp_sendrecv_all_if(httpd_$1_script_t)
+-		corenet_tcp_sendrecv_all_nodes(httpd_$1_script_t)
+-		corenet_udp_sendrecv_all_nodes(httpd_$1_script_t)
+-		corenet_tcp_sendrecv_all_ports(httpd_$1_script_t)
+-		corenet_udp_sendrecv_all_ports(httpd_$1_script_t)
+-		corenet_tcp_connect_postgresql_port(httpd_$1_script_t)
+-		corenet_tcp_connect_mysqld_port(httpd_$1_script_t)
+-		corenet_sendrecv_postgresql_client_packets(httpd_$1_script_t)
+-		corenet_sendrecv_mysqld_client_packets(httpd_$1_script_t)
+-
+-		sysnet_read_config(httpd_$1_script_t)
+-	')
+-
+-	tunable_policy(`httpd_enable_cgi && httpd_can_network_connect',`
+-		allow httpd_$1_script_t self:tcp_socket create_stream_socket_perms;
+-		allow httpd_$1_script_t self:udp_socket create_socket_perms;
+-
+-		corenet_non_ipsec_sendrecv(httpd_$1_script_t)
+-		corenet_tcp_sendrecv_all_if(httpd_$1_script_t)
+-		corenet_udp_sendrecv_all_if(httpd_$1_script_t)
+-		corenet_tcp_sendrecv_all_nodes(httpd_$1_script_t)
+-		corenet_udp_sendrecv_all_nodes(httpd_$1_script_t)
+-		corenet_tcp_sendrecv_all_ports(httpd_$1_script_t)
+-		corenet_udp_sendrecv_all_ports(httpd_$1_script_t)
+-		corenet_tcp_connect_all_ports(httpd_$1_script_t)
+-		corenet_sendrecv_all_client_packets(httpd_$1_script_t)
+-
+-		sysnet_read_config(httpd_$1_script_t)
+-	')
+-
+-	optional_policy(`
+-		mta_send_mail(httpd_$1_script_t)
+-	')
+-
+ 	optional_policy(`
+ 		tunable_policy(`httpd_enable_cgi && allow_ypbind',`
+ 			nis_use_ypbind_uncond(httpd_$1_script_t)
+@@ -268,8 +220,11 @@
  	')
  
  	apache_content_template($1)
@@ -2333,7 +2895,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/apac
  	userdom_user_home_content($1,httpd_$1_content_t)
  
  	role $3 types httpd_$1_script_t;
-@@ -434,6 +429,24 @@
+@@ -434,6 +389,24 @@
  
  ########################################
  ## <summary>
@@ -2358,7 +2920,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/apac
  ##	Inherit and use file descriptors from Apache.
  ## </summary>
  ## <param name="domain">
-@@ -752,6 +765,7 @@
+@@ -752,6 +725,7 @@
  	')
  
  	allow $1 httpd_modules_t:dir list_dir_perms;
@@ -2366,7 +2928,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/apac
  ')
  
  ########################################
-@@ -836,6 +850,10 @@
+@@ -836,6 +810,10 @@
  		type httpd_sys_script_t;
  	')
  
@@ -2377,7 +2939,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/apac
  	tunable_policy(`httpd_enable_cgi && httpd_unified',`
  		domtrans_pattern($1, httpdcontent, httpd_sys_script_t)
  	')
-@@ -923,7 +941,7 @@
+@@ -923,7 +901,7 @@
  		type httpd_squirrelmail_t;
  	')
  
@@ -2386,7 +2948,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/apac
  ')
  
  ########################################
-@@ -1000,3 +1018,140 @@
+@@ -1000,3 +978,140 @@
  
  	allow $1 httpd_sys_script_t:dir search_dir_perms;
  ')
@@ -2527,18 +3089,10 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/apac
 +	allow $1 httpd_bugzilla_content_t:dir search_dir_perms;
 +')
 +
+Binary files nsaserefpolicy/policy/modules/services/apache.pp and serefpolicy-3.0.1/policy/modules/services/apache.pp differ
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/apache.te serefpolicy-3.0.1/policy/modules/services/apache.te
---- nsaserefpolicy/policy/modules/services/apache.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/apache.te	2007-05-30 15:12:50.000000000 -0400
-@@ -30,7 +30,7 @@
- 
- ## <desc>
- ## <p>
--## Allow Apache to use mod_auth_pam
-+## Allow Apache to use mod_auth_pams
- ## </p>
- ## </desc>
- gen_tunable(allow_httpd_mod_auth_pam,false)
+--- nsaserefpolicy/policy/modules/services/apache.te	2007-06-11 16:05:30.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/apache.te	2007-06-19 17:06:27.000000000 -0400
 @@ -47,6 +47,13 @@
  ## Allow http daemon to tcp connect
  ## </p>
@@ -2581,7 +3135,22 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/apac
  attribute httpdcontent;
  
  # domains that can exec all users scripts
-@@ -210,7 +238,7 @@
+@@ -182,6 +210,14 @@
+ type httpd_tmpfs_t;
+ files_tmpfs_file(httpd_tmpfs_t)
+ 
++# Unconfined domain for apache scripts.
++# Only to be used as a last resort
++type httpd_unconfined_script_t;
++type httpd_unconfined_script_exec_t; # customizable
++domain_type(httpd_unconfined_script_t)
++domain_entry_file(httpd_unconfined_script_t,httpd_unconfined_script_exec_t)
++role system_r types httpd_unconfined_script_t;
++
+ # for apache2 memory mapped files
+ type httpd_var_lib_t;
+ files_type(httpd_var_lib_t)
+@@ -202,7 +238,7 @@
  # Apache server local policy
  #
  
@@ -2590,7 +3159,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/apac
  dontaudit httpd_t self:capability { net_admin sys_tty_config };
  allow httpd_t self:process ~{ ptrace setcurrent setexec setfscreate setrlimit execmem execstack execheap };
  allow httpd_t self:fd use;
-@@ -252,6 +280,7 @@
+@@ -244,6 +280,7 @@
  allow httpd_t httpd_modules_t:dir list_dir_perms;
  mmap_files_pattern(httpd_t,httpd_modules_t,httpd_modules_t)
  read_files_pattern(httpd_t,httpd_modules_t,httpd_modules_t)
@@ -2598,7 +3167,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/apac
  
  apache_domtrans_rotatelogs(httpd_t)
  # Apache-httpd needs to be able to send signals to the log rotate procs.
-@@ -292,6 +321,7 @@
+@@ -284,6 +321,7 @@
  kernel_read_kernel_sysctls(httpd_t)
  # for modules that want to access /proc/meminfo
  kernel_read_system_state(httpd_t)
@@ -2606,7 +3175,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/apac
  
  corenet_non_ipsec_sendrecv(httpd_t)
  corenet_tcp_sendrecv_all_if(httpd_t)
-@@ -337,6 +367,9 @@
+@@ -329,6 +367,9 @@
  files_read_var_lib_symlinks(httpd_t)
  
  fs_search_auto_mountpoints(httpd_sys_script_t)
@@ -2616,18 +3185,30 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/apac
  
  libs_use_ld_so(httpd_t)
  libs_use_shared_libs(httpd_t)
-@@ -357,6 +390,10 @@
+@@ -347,7 +388,13 @@
  
- mta_send_mail(httpd_t)
+ userdom_use_unpriv_users_fds(httpd_t)
  
+-mta_send_mail(httpd_t)
 +optional_policy(`
 +	nscd_socket_use(httpd_t)
 +')
 +
- ifdef(`targeted_policy',`
- 	tunable_policy(`httpd_enable_homedirs',`
- 		userdom_search_generic_user_home_dirs(httpd_t)
-@@ -380,6 +417,14 @@
++tunable_policy(`httpd_enable_homedirs',`
++	userdom_search_generic_user_home_dirs(httpd_t)
++')
+ 
+ tunable_policy(`allow_httpd_anon_write',`
+ 	miscfiles_manage_public_files(httpd_t)
+@@ -359,6 +406,7 @@
+ #
+ tunable_policy(`allow_httpd_mod_auth_pam',`
+ 	auth_domtrans_chk_passwd(httpd_t)
++	auth_domtrans_upd_passwd(httpd_t)
+ ')
+ ')
+ 
+@@ -366,6 +414,16 @@
  	corenet_tcp_connect_all_ports(httpd_t)
  ')
  
@@ -2637,15 +3218,24 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/apac
 +	corenet_sendrecv_smtp_client_packets(httpd_t)
 +	corenet_tcp_connect_pop_port(httpd_t)
 +	corenet_sendrecv_pop_client_packets(httpd_t)
++	mta_send_mail(httpd_t)
++	mta_send_mail(httpd_sys_script_t)
 +')
 +
  tunable_policy(`httpd_can_network_connect_db',`
  	# allow httpd to connect to mysql/posgresql
  	corenet_tcp_connect_postgresql_port(httpd_t)
-@@ -407,6 +452,10 @@
- 	allow httpd_t httpd_unconfined_script_exec_t:dir list_dir_perms;
+@@ -386,6 +444,17 @@
+ 	corenet_sendrecv_http_cache_client_packets(httpd_t)
  ')
  
++tunable_policy(`httpd_enable_cgi',`
++	domtrans_pattern(httpd_t, httpd_unconfined_script_exec_t, httpd_unconfined_script_t)
++
++	allow httpd_t httpd_unconfined_script_t:process { signal sigkill sigstop };
++	allow httpd_t httpd_unconfined_script_exec_t:dir list_dir_perms;
++')
++
 +tunable_policy(`allow_httpd_sys_script_anon_write',`
 +	miscfiles_manage_public_files(httpd_sys_script_t)
 +') 
@@ -2653,7 +3243,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/apac
  tunable_policy(`httpd_enable_cgi && httpd_unified && httpd_builtin_scripting',`
  	domtrans_pattern(httpd_t, httpdcontent, httpd_sys_script_t)
  
-@@ -424,11 +473,21 @@
+@@ -403,11 +472,21 @@
  	fs_read_nfs_symlinks(httpd_t)
  ')
  
@@ -2675,7 +3265,33 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/apac
  tunable_policy(`httpd_ssi_exec',`
  	corecmd_shell_domtrans(httpd_t,httpd_sys_script_t)
  	allow httpd_sys_script_t httpd_t:fd use;
-@@ -659,6 +718,12 @@
+@@ -605,6 +684,10 @@
+ 
+ miscfiles_read_localization(httpd_suexec_t)
+ 
++tunable_policy(`httpd_enable_homedirs',`
++	userdom_search_generic_user_home_dirs(httpd_suexec_t)
++')
++
+ tunable_policy(`httpd_can_network_connect',`
+ 	allow httpd_suexec_t self:tcp_socket create_stream_socket_perms;
+ 	allow httpd_suexec_t self:udp_socket create_socket_perms;
+@@ -618,10 +701,13 @@
+ 	corenet_udp_sendrecv_all_ports(httpd_suexec_t)
+ 	corenet_tcp_connect_all_ports(httpd_suexec_t)
+ 	corenet_sendrecv_all_client_packets(httpd_suexec_t)
+-
+ 	sysnet_read_config(httpd_suexec_t)
+ ')
+ 
++tunable_policy(`httpd_enable_cgi',`
++	domtrans_pattern(httpd_suexec_t, httpd_unconfined_script_exec_t, httpd_unconfined_script_t)
++')
++
+ tunable_policy(`httpd_enable_cgi && httpd_unified',`
+ 	domtrans_pattern(httpd_suexec_t, httpdcontent, httpd_sys_script_t)
+ ')
+@@ -632,6 +718,12 @@
  	fs_exec_nfs_files(httpd_suexec_t)
  ')
  
@@ -2688,7 +3304,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/apac
  tunable_policy(`httpd_enable_homedirs && use_samba_home_dirs',`
  	fs_read_cifs_files(httpd_suexec_t)
  	fs_read_cifs_symlinks(httpd_suexec_t)
-@@ -697,7 +762,8 @@
+@@ -670,7 +762,8 @@
  
  dontaudit httpd_sys_script_t httpd_config_t:dir search;
  
@@ -2698,20 +3314,64 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/apac
  
  allow httpd_sys_script_t squirrelmail_spool_t:dir list_dir_perms;
  read_files_pattern(httpd_sys_script_t,squirrelmail_spool_t,squirrelmail_spool_t)
-@@ -721,11 +787,21 @@
- 	')
+@@ -684,15 +777,64 @@
+ # Should we add a boolean?
+ apache_domtrans_rotatelogs(httpd_sys_script_t)
+ 
++sysnet_read_config(httpd_sys_script_t)
++
+ ifdef(`distro_redhat',`
+ 	allow httpd_sys_script_t httpd_log_t:file { getattr append };
  ')
  
+-tunable_policy(`httpd_enable_homedirs && use_nfs_home_dirs',`
++tunable_policy(`httpd_enable_homedirs',`
++	userdom_search_generic_user_home_dirs(httpd_sys_script_t)
++')
++
 +tunable_policy(`httpd_use_nfs', `
 +	fs_read_nfs_files(httpd_sys_script_t)
 +	fs_read_nfs_symlinks(httpd_sys_script_t)
 +')
 +
- tunable_policy(`httpd_enable_homedirs && use_nfs_home_dirs',`
++tunable_policy(`httpd_enable_homedirs && use_nfs_home_dirs', `
  	fs_read_nfs_files(httpd_sys_script_t)
  	fs_read_nfs_symlinks(httpd_sys_script_t)
  ')
  
++tunable_policy(`httpd_enable_cgi && httpd_can_network_connect_db',`
++	allow httpd_sys_script_t self:tcp_socket create_stream_socket_perms;
++	allow httpd_sys_script_t self:udp_socket create_socket_perms;
++
++	corenet_non_ipsec_sendrecv(httpd_sys_script_t)
++	corenet_tcp_sendrecv_all_if(httpd_sys_script_t)
++	corenet_udp_sendrecv_all_if(httpd_sys_script_t)
++	corenet_tcp_sendrecv_all_nodes(httpd_sys_script_t)
++	corenet_udp_sendrecv_all_nodes(httpd_sys_script_t)
++	corenet_tcp_sendrecv_all_ports(httpd_sys_script_t)
++	corenet_udp_sendrecv_all_ports(httpd_sys_script_t)
++	corenet_tcp_connect_postgresql_port(httpd_sys_script_t)
++	corenet_tcp_connect_mysqld_port(httpd_sys_script_t)
++	corenet_sendrecv_postgresql_client_packets(httpd_sys_script_t)
++	corenet_sendrecv_mysqld_client_packets(httpd_sys_script_t)
++')
++
++tunable_policy(`httpd_enable_cgi && httpd_can_network_connect',`
++	allow httpd_sys_script_t self:tcp_socket create_stream_socket_perms;
++	allow httpd_sys_script_t self:udp_socket create_socket_perms;
++
++	corenet_non_ipsec_sendrecv(httpd_sys_script_t)
++	corenet_tcp_sendrecv_all_if(httpd_sys_script_t)
++	corenet_udp_sendrecv_all_if(httpd_sys_script_t)
++	corenet_tcp_sendrecv_all_nodes(httpd_sys_script_t)
++	corenet_udp_sendrecv_all_nodes(httpd_sys_script_t)
++	corenet_tcp_sendrecv_all_ports(httpd_sys_script_t)
++	corenet_udp_sendrecv_all_ports(httpd_sys_script_t)
++	corenet_tcp_connect_all_ports(httpd_sys_script_t)
++	corenet_sendrecv_all_client_packets(httpd_sys_script_t)
++')
++
++
 +tunable_policy(`httpd_use_cifs', `
 +	fs_read_cifs_files(httpd_sys_script_t)
 +	fs_read_cifs_symlinks(httpd_sys_script_t)
@@ -2720,7 +3380,27 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/apac
  tunable_policy(`httpd_enable_homedirs && use_samba_home_dirs',`
  	fs_read_cifs_files(httpd_sys_script_t)
  	fs_read_cifs_symlinks(httpd_sys_script_t)
-@@ -776,3 +852,19 @@
+@@ -709,6 +851,19 @@
+ 
+ ########################################
+ #
++# Apache unconfined script local policy
++#
++
++optional_policy(`
++	nscd_socket_use(httpd_unconfined_script_t)
++')
++
++optional_policy(`
++	unconfined_domain(httpd_unconfined_script_t)
++')
++
++########################################
++#
+ # httpd_rotatelogs local policy
+ #
+ 
+@@ -726,3 +881,19 @@
  logging_search_logs(httpd_rotatelogs_t)
  
  miscfiles_read_localization(httpd_rotatelogs_t)
@@ -2742,7 +3422,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/apac
 +
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/apcupsd.fc serefpolicy-3.0.1/policy/modules/services/apcupsd.fc
 --- nsaserefpolicy/policy/modules/services/apcupsd.fc	2007-05-30 11:47:29.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/apcupsd.fc	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/apcupsd.fc	2007-06-19 17:06:27.000000000 -0400
 @@ -3,3 +3,8 @@
  /var/log/apcupsd\.events.*	--	gen_context(system_u:object_r:apcupsd_log_t,s0)
  
@@ -2754,7 +3434,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/apcu
 +/var/www/apcupsd/upsstats.cgi		--	gen_context(system_u:object_r:httpd_apcupsd_cgi_script_exec_t,s0)
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/apcupsd.if serefpolicy-3.0.1/policy/modules/services/apcupsd.if
 --- nsaserefpolicy/policy/modules/services/apcupsd.if	2007-05-30 11:47:29.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/apcupsd.if	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/apcupsd.if	2007-06-19 17:06:27.000000000 -0400
 @@ -79,3 +79,25 @@
  	allow $1 apcupsd_log_t:dir list_dir_perms;
  	allow $1 apcupsd_log_t:file { getattr append };
@@ -2781,10 +3461,21 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/apcu
 +	allow httpd_apcupsd_cgi_script_t $1:fifo_file rw_file_perms;
 +	allow httpd_apcupsd_cgi_script_t $1:process sigchld;
 +')
+Binary files nsaserefpolicy/policy/modules/services/apcupsd.pp and serefpolicy-3.0.1/policy/modules/services/apcupsd.pp differ
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/apcupsd.te serefpolicy-3.0.1/policy/modules/services/apcupsd.te
 --- nsaserefpolicy/policy/modules/services/apcupsd.te	2007-05-30 11:47:29.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/apcupsd.te	2007-05-31 11:11:33.000000000 -0400
-@@ -24,6 +24,7 @@
++++ serefpolicy-3.0.1/policy/modules/services/apcupsd.te	2007-06-19 17:06:27.000000000 -0400
+@@ -16,6 +16,9 @@
+ type apcupsd_log_t;
+ logging_log_file(apcupsd_log_t)
+ 
++type apcupsd_tmp_t;
++files_tmp_file(apcupsd_tmp_t)
++
+ type apcupsd_var_run_t;
+ files_pid_file(apcupsd_var_run_t)
+ 
+@@ -24,6 +27,7 @@
  # apcupsd local policy
  #
  
@@ -2792,7 +3483,43 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/apcu
  allow apcupsd_t self:process signal;
  allow apcupsd_t self:fifo_file rw_file_perms;
  allow apcupsd_t self:unix_stream_socket create_stream_socket_perms;
-@@ -61,3 +62,29 @@
+@@ -36,9 +40,15 @@
+ manage_files_pattern(apcupsd_t,apcupsd_log_t,apcupsd_log_t)
+ logging_log_filetrans(apcupsd_t,apcupsd_log_t,{ file dir })
+ 
++manage_files_pattern(apcupsd_t,apcupsd_tmp_t,apcupsd_tmp_t)
++files_tmp_filetrans(apcupsd_t,apcupsd_tmp_t,file)
++
+ manage_files_pattern(apcupsd_t,apcupsd_var_run_t,apcupsd_var_run_t)
+ files_pid_filetrans(apcupsd_t,apcupsd_var_run_t, file)
+ 
++corecmd_exec_bin(apcupsd_t)
++corecmd_exec_shell(apcupsd_t)
++
+ corenet_non_ipsec_sendrecv(apcupsd_t)
+ corenet_tcp_sendrecv_generic_if(apcupsd_t)
+ corenet_tcp_sendrecv_all_nodes(apcupsd_t)
+@@ -46,6 +56,7 @@
+ corenet_tcp_bind_all_nodes(apcupsd_t)
+ corenet_tcp_bind_apcupsd_port(apcupsd_t)
+ corenet_sendrecv_apcupsd_server_packets(apcupsd_t)
++corenet_tcp_connect_apcupsd_port(apcupsd_t)
+ 
+ dev_rw_generic_usb_dev(apcupsd_t)
+ 
+@@ -55,9 +66,52 @@
+ files_read_etc_files(apcupsd_t)
+ files_search_locks(apcupsd_t)
+ 
++#apcupsd runs shutdown, probably need a shutdown domain
++init_rw_utmp(apcupsd_t)
++init_telinit(apcupsd_t)
++
++kernel_read_system_state(apcupsd_t)
++
+ libs_use_ld_so(apcupsd_t)
+ libs_use_shared_libs(apcupsd_t)
+ 
  logging_send_syslog_msg(apcupsd_t)
  
  miscfiles_read_localization(apcupsd_t)
@@ -2800,6 +3527,17 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/apcu
 +# https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=240805
 +term_use_unallocated_ttys(apcupsd_t)
 +
++userdom_use_unpriv_users_ttys(apcupsd_t)
++userdom_use_unpriv_users_ptys(apcupsd_t)
++
++optional_policy(`
++	hostname_exec(apcupsd_t)
++')
++
++optional_policy(`
++	mta_send_mail(apcupsd_t)
++')
++
 +########################################
 +#
 +# apcupsd_cgi Declarations
@@ -2822,37 +3560,30 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/apcu
 +corenet_udp_sendrecv_all_nodes(httpd_apcupsd_cgi_script_t)
 +corenet_udp_sendrecv_all_ports(httpd_apcupsd_cgi_script_t)
 +
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/arpwatch.te serefpolicy-3.0.1/policy/modules/services/arpwatch.te
---- nsaserefpolicy/policy/modules/services/arpwatch.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/arpwatch.te	2007-05-30 15:12:50.000000000 -0400
-@@ -28,7 +28,6 @@
- allow arpwatch_t self:process signal_perms;
- allow arpwatch_t self:unix_dgram_socket create_socket_perms;
- allow arpwatch_t self:unix_stream_socket create_stream_socket_perms;
--allow arpwatch_t self:netlink_route_socket r_netlink_socket_perms;
- allow arpwatch_t self:tcp_socket { connect create_stream_socket_perms };
- allow arpwatch_t self:udp_socket create_socket_perms;
- allow arpwatch_t self:packet_socket create_socket_perms;
-@@ -78,15 +77,13 @@
- 
- miscfiles_read_localization(arpwatch_t)
- 
--sysnet_read_config(arpwatch_t)
--
- userdom_dontaudit_use_unpriv_user_fds(arpwatch_t)
- userdom_dontaudit_search_sysadm_home_dirs(arpwatch_t)
- 
- mta_send_mail(arpwatch_t)
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/audioentropy.te serefpolicy-3.0.1/policy/modules/services/audioentropy.te
+--- nsaserefpolicy/policy/modules/services/audioentropy.te	2007-05-29 14:10:57.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/audioentropy.te	2007-06-19 17:06:27.000000000 -0400
+@@ -18,7 +18,7 @@
+ # Local policy
+ #
  
- optional_policy(`
--	nis_use_ypbind(arpwatch_t)
-+	auth_use_nsswitch(arpwatch_t)
- ')
+-allow entropyd_t self:capability { ipc_lock sys_admin };
++allow entropyd_t self:capability { dac_override ipc_lock sys_admin };
+ dontaudit entropyd_t self:capability sys_tty_config;
+ allow entropyd_t self:process signal_perms;
  
- optional_policy(`
+@@ -32,6 +32,8 @@
+ dev_read_sysfs(entropyd_t)
+ dev_read_urand(entropyd_t)
+ dev_write_urand(entropyd_t)
++dev_read_rand(entropyd_t)
++dev_write_rand(entropyd_t)
+ dev_read_sound(entropyd_t)
+ 
+ fs_getattr_all_fs(entropyd_t)
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/automount.te serefpolicy-3.0.1/policy/modules/services/automount.te
 --- nsaserefpolicy/policy/modules/services/automount.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/automount.te	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/automount.te	2007-06-19 17:06:27.000000000 -0400
 @@ -69,6 +69,7 @@
  files_mounton_all_mountpoints(automount_t)
  files_mount_all_file_type_fs(automount_t)
@@ -2869,49 +3600,31 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/auto
  dev_read_urand(automount_t)
  
  domain_use_interactive_fds(automount_t)
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/avahi.te serefpolicy-3.0.1/policy/modules/services/avahi.te
---- nsaserefpolicy/policy/modules/services/avahi.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/avahi.te	2007-05-30 15:12:50.000000000 -0400
-@@ -18,7 +18,7 @@
- # Local policy
- #
- 
--allow avahi_t self:capability { dac_override setgid chown kill setuid sys_chroot };
-+allow avahi_t self:capability { dac_override setgid chown fowner kill setuid sys_chroot };
- dontaudit avahi_t self:capability sys_tty_config;
- allow avahi_t self:process { setrlimit signal_perms setcap };
- allow avahi_t self:fifo_file { read write };
-@@ -32,6 +32,8 @@
- allow avahi_t avahi_var_run_t:dir setattr;
- files_pid_filetrans(avahi_t,avahi_var_run_t,file)
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/bind.fc serefpolicy-3.0.1/policy/modules/services/bind.fc
+--- nsaserefpolicy/policy/modules/services/bind.fc	2007-05-29 14:10:57.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/bind.fc	2007-06-19 17:06:27.000000000 -0400
+@@ -45,4 +45,6 @@
+ /var/named/chroot/var/named/slaves(/.*)? gen_context(system_u:object_r:named_cache_t,s0)
+ /var/named/chroot/var/named/data(/.*)? gen_context(system_u:object_r:named_cache_t,s0)
+ /var/named/chroot/var/named/named\.ca -- gen_context(system_u:object_r:named_conf_t,s0)
++/var/named/dynamic(/.*)?		gen_context(system_u:object_r:named_cache_t,s0)
++/var/named/chroot/var/named/dynamic(/.*)?	gen_context(system_u:object_r:named_cache_t,s0)
+ ')
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/bind.te serefpolicy-3.0.1/policy/modules/services/bind.te
+--- nsaserefpolicy/policy/modules/services/bind.te	2007-05-29 14:10:57.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/bind.te	2007-06-19 17:06:27.000000000 -0400
+@@ -119,6 +119,10 @@
+ corenet_sendrecv_rndc_server_packets(named_t)
+ corenet_sendrecv_rndc_client_packets(named_t)
  
-+auth_use_nsswitch(avahi_t)
++#dnsmasq 
++corenet_tcp_bind_dhcpd_port(named_t)
++corenet_udp_bind_dhcpd_port(named_t)
 +
- kernel_read_kernel_sysctls(avahi_t)
- kernel_list_proc(avahi_t)
- kernel_read_proc_symlinks(avahi_t)
-@@ -63,8 +65,6 @@
- files_read_etc_runtime_files(avahi_t)
- files_read_usr_files(avahi_t)
- 
--auth_use_nsswitch(avahi_t)
--
- init_signal_script(avahi_t)
- init_signull_script(avahi_t)
- 
-@@ -75,8 +75,6 @@
+ dev_read_sysfs(named_t)
+ dev_read_rand(named_t)
  
- miscfiles_read_localization(avahi_t)
- 
--sysnet_read_config(avahi_t)
--
- userdom_dontaudit_use_unpriv_user_fds(avahi_t)
- userdom_dontaudit_search_sysadm_home_dirs(avahi_t)
- 
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/bind.te serefpolicy-3.0.1/policy/modules/services/bind.te
---- nsaserefpolicy/policy/modules/services/bind.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/bind.te	2007-05-30 15:12:50.000000000 -0400
-@@ -230,6 +230,7 @@
+@@ -230,6 +234,7 @@
  corenet_tcp_sendrecv_all_nodes(ndc_t)
  corenet_tcp_sendrecv_all_ports(ndc_t)
  corenet_tcp_connect_rndc_port(ndc_t)
@@ -2919,7 +3632,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/bind
  corenet_sendrecv_rndc_client_packets(ndc_t)
  
  fs_getattr_xattr_fs(ndc_t)
-@@ -257,6 +258,10 @@
+@@ -257,6 +262,10 @@
  	allow ndc_t named_conf_t:dir search;
  ')
  
@@ -2932,8 +3645,16 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/bind
  ')
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/bluetooth.te serefpolicy-3.0.1/policy/modules/services/bluetooth.te
 --- nsaserefpolicy/policy/modules/services/bluetooth.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/bluetooth.te	2007-05-30 17:14:15.000000000 -0400
-@@ -195,26 +195,26 @@
++++ serefpolicy-3.0.1/policy/modules/services/bluetooth.te	2007-06-21 05:58:59.000000000 -0400
+@@ -133,6 +133,7 @@
+ 	dbus_system_bus_client_template(bluetooth,bluetooth_t)
+ 	dbus_connect_system_bus(bluetooth_t)
+ 	dbus_send_system_bus(bluetooth_t)
++	userdom_dbus_chat_all_users(bluetooth_t)
+ ')
+ 
+ optional_policy(`
+@@ -195,26 +196,26 @@
  
  sysnet_read_config(bluetooth_helper_t)
  
@@ -2978,7 +3699,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/blue
  optional_policy(`
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/clamav.te serefpolicy-3.0.1/policy/modules/services/clamav.te
 --- nsaserefpolicy/policy/modules/services/clamav.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/clamav.te	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/clamav.te	2007-06-19 17:06:27.000000000 -0400
 @@ -121,6 +121,7 @@
  	amavis_read_lib_files(clamd_t)
  	amavis_read_spool_files(clamd_t)
@@ -2987,9 +3708,31 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/clam
  ')
  
  ########################################
+@@ -205,9 +206,12 @@
+ files_tmp_filetrans(clamscan_t,clamscan_tmp_t,{ file dir })
+ 
+ # var/lib files together with clamd
+-read_files_pattern(clamscan_t,clamd_var_lib_t,clamd_var_lib_t)
++manage_files_pattern(clamscan_t,clamd_var_lib_t,clamd_var_lib_t)
+ allow clamscan_t clamd_var_lib_t:dir list_dir_perms;
+ 
++init_read_utmp(clamscan_t)
++init_dontaudit_write_utmp(clamscan_t)
++
+ kernel_read_kernel_sysctls(clamscan_t)
+ 
+ files_read_etc_files(clamscan_t)
+@@ -225,3 +229,7 @@
+ optional_policy(`
+ 	apache_read_sys_content(clamscan_t)
+ ')
++
++optional_policy(`
++	mailscanner_manage_spool(clamscan_t)
++')
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/consolekit.te serefpolicy-3.0.1/policy/modules/services/consolekit.te
 --- nsaserefpolicy/policy/modules/services/consolekit.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/consolekit.te	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/consolekit.te	2007-06-21 10:49:23.000000000 -0400
 @@ -10,7 +10,6 @@
  type consolekit_exec_t;
  init_daemon_domain(consolekit_t, consolekit_exec_t)
@@ -3022,7 +3765,15 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/cons
  optional_policy(`
  	dbus_system_bus_client_template(consolekit, consolekit_t)
  	dbus_send_system_bus(consolekit_t)
-@@ -68,3 +73,9 @@
+@@ -62,9 +67,17 @@
+ 	optional_policy(`
+ 		unconfined_dbus_chat(consolekit_t)
+ 	')
++
++	userdom_dbus_chat_all_users(consolekit_t)
+ ')
+ 
+ optional_policy(`
  	xserver_read_all_users_xauth(consolekit_t)
  	xserver_stream_connect_xdm_xserver(consolekit_t)
  ')
@@ -3032,17 +3783,37 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/cons
 +	unconfined_ptrace(consolekit_t)
 +')
 +
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/courier.te serefpolicy-3.0.1/policy/modules/services/courier.te
+--- nsaserefpolicy/policy/modules/services/courier.te	2007-05-29 14:10:57.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/courier.te	2007-06-19 17:06:27.000000000 -0400
+@@ -58,6 +58,7 @@
+ files_getattr_tmp_dirs(courier_authdaemon_t)
+ 
+ auth_domtrans_chk_passwd(courier_authdaemon_t)
++auth_domtrans_upd_passwd(courier_authdaemon_t)
+ 
+ libs_read_lib_files(courier_authdaemon_t)
+ 
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/cron.fc serefpolicy-3.0.1/policy/modules/services/cron.fc
 --- nsaserefpolicy/policy/modules/services/cron.fc	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/cron.fc	2007-05-30 15:12:50.000000000 -0400
-@@ -45,3 +45,4 @@
++++ serefpolicy-3.0.1/policy/modules/services/cron.fc	2007-06-21 05:43:06.000000000 -0400
+@@ -17,6 +17,8 @@
+ /var/run/fcron\.fifo		-s	gen_context(system_u:object_r:crond_var_run_t,s0)
+ /var/run/fcron\.pid		--	gen_context(system_u:object_r:crond_var_run_t,s0)
+ 
++/var/spool/anacron(/.*)			gen_context(system_u:object_r:system_cron_spool_t,s0)
++
+ /var/spool/at			-d	gen_context(system_u:object_r:cron_spool_t,s0)
+ /var/spool/at/spool		-d	gen_context(system_u:object_r:cron_spool_t,s0)
+ /var/spool/at/[^/]*		--	<<none>>
+@@ -45,3 +47,4 @@
  /var/spool/fcron/systab\.orig	--	gen_context(system_u:object_r:system_cron_spool_t,s0)
  /var/spool/fcron/systab		--	gen_context(system_u:object_r:system_cron_spool_t,s0)
  /var/spool/fcron/new\.systab	--	gen_context(system_u:object_r:system_cron_spool_t,s0)
-+/var/lib/misc(/.*)?			gen_context(system_u:object_r:crond_var_run_t,s0)
++/var/lib/misc(/.*)?			gen_context(system_u:object_r:system_crond_var_lib_t,s0)
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/cron.if serefpolicy-3.0.1/policy/modules/services/cron.if
---- nsaserefpolicy/policy/modules/services/cron.if	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/cron.if	2007-05-30 15:12:50.000000000 -0400
+--- nsaserefpolicy/policy/modules/services/cron.if	2007-06-15 14:54:33.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/cron.if	2007-06-19 17:06:27.000000000 -0400
 @@ -35,6 +35,7 @@
  #
  template(`cron_per_role_template',`
@@ -3069,7 +3840,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/cron
  
  	# The entrypoint interface is not used as this is not
  	# a regular entrypoint.  Since crontab files are
-@@ -134,19 +133,22 @@
+@@ -134,55 +133,38 @@
  
  	miscfiles_read_localization($1_crond_t)
  
@@ -3094,7 +3865,20 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/cron
  
  	tunable_policy(`fcron_crond', `
  		allow crond_t $1_cron_spool_t:file manage_file_perms;
-@@ -156,22 +158,13 @@
+ 	')
+ 
+-	# need a per-role version of this:
+-	#optional_policy(`
+-	#	mono_domtrans($1_crond_t)
+-	#')
+-
+-	optional_policy(`
+-		dbus_stub($1_crond_t)
+-
+-		allow $1_crond_t $2:dbus send_msg;
+-	')		
+-
+ 	optional_policy(`
  		nis_use_ypbind($1_crond_t)
  	')
  
@@ -3120,7 +3904,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/cron
  
  	##############################
  	#
-@@ -184,6 +177,7 @@
+@@ -195,6 +177,7 @@
  
  	# Transition from the user domain to the derived domain.
  	domtrans_pattern($2, crontab_exec_t, $1_crontab_t)
@@ -3128,7 +3912,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/cron
  
  	# crontab shows up in user ps
  	ps_process_pattern($2,$1_crontab_t)
-@@ -194,9 +188,6 @@
+@@ -205,9 +188,6 @@
  	# Allow crond to read those crontabs in cron spool.
  	allow crond_t $1_cron_spool_t:file manage_file_perms;
  
@@ -3138,7 +3922,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/cron
  	# create files in /var/spool/cron
  	manage_files_pattern($1_crontab_t,cron_spool_t,$1_cron_spool_t)
  	filetrans_pattern($1_crontab_t,cron_spool_t,$1_cron_spool_t,file)
-@@ -232,10 +223,12 @@
+@@ -243,10 +223,12 @@
  
  	userdom_manage_user_tmp_dirs($1,$1_crontab_t)
  	userdom_manage_user_tmp_files($1,$1_crontab_t)
@@ -3152,19 +3936,9 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/cron
  	tunable_policy(`fcron_crond',`
  		# fcron wants an instant update of a crontab change for the administrator
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/cron.te serefpolicy-3.0.1/policy/modules/services/cron.te
---- nsaserefpolicy/policy/modules/services/cron.te	2007-05-30 11:47:29.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/cron.te	2007-05-30 17:23:16.000000000 -0400
-@@ -42,6 +42,9 @@
- type cron_log_t;
- logging_log_file(cron_log_t)
- 
-+type cron_lock_t;
-+files_lock_file(cron_lock_t)
-+
- type crond_t;
- type crond_exec_t;
- init_daemon_domain(crond_t,crond_exec_t)
-@@ -50,6 +53,7 @@
+--- nsaserefpolicy/policy/modules/services/cron.te	2007-06-15 14:54:33.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/cron.te	2007-06-22 08:57:00.000000000 -0400
+@@ -50,6 +50,7 @@
  
  type crond_tmp_t;
  files_tmp_file(crond_tmp_t)
@@ -3172,19 +3946,20 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/cron
  
  type crond_var_run_t;
  files_pid_file(crond_var_run_t)
-@@ -75,11 +79,6 @@
+@@ -71,6 +72,12 @@
  type system_crond_tmp_t;
  files_tmp_file(system_crond_tmp_t)
  
--ifdef(`targeted_policy',`
--	type sysadm_cron_spool_t;
--	files_type(sysadm_cron_spool_t)
--')
--
++type system_crond_var_lib_t;
++files_type(system_crond_var_lib_t)
++
++type system_crond_var_run_t;
++files_pid_file(system_crond_var_run_t)
++
  ifdef(`enable_mcs',`
  	init_ranged_daemon_domain(crond_t,crond_exec_t,s0 - mcs_systemhigh)
  ')
-@@ -89,7 +88,7 @@
+@@ -80,7 +87,7 @@
  # Cron Local policy
  #
  
@@ -3193,16 +3968,21 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/cron
  dontaudit crond_t self:capability { sys_resource sys_tty_config };
  allow crond_t self:process ~{ ptrace setcurrent setexec setfscreate setrlimit execmem execstack execheap };
  allow crond_t self:process { setexec setfscreate };
-@@ -108,14 +107,12 @@
+@@ -99,18 +106,18 @@
  allow crond_t crond_var_run_t:file manage_file_perms;
  files_pid_filetrans(crond_t,crond_var_run_t,file)
  
 -allow crond_t cron_spool_t:dir rw_dir_perms;
 -allow crond_t cron_spool_t:file read_file_perms;
--
++manage_files_pattern(crond_t,cron_spool_t,cron_spool_t)
+ 
+ manage_dirs_pattern(crond_t,crond_tmp_t,crond_tmp_t)
+ manage_files_pattern(crond_t,crond_tmp_t,crond_tmp_t)
+ files_tmp_filetrans(crond_t,crond_tmp_t,{ file dir })
+ 
 -allow crond_t system_cron_spool_t:dir list_dir_perms;
 -allow crond_t system_cron_spool_t:file read_file_perms;
-+manage_files_pattern(crond_t,cron_spool_t,cron_spool_t)
++list_dirs_pattern(crond_t, system_cron_spool_t, system_cron_spool_t)
 +read_files_pattern(crond_t, system_cron_spool_t, system_cron_spool_t)
  
  kernel_read_kernel_sysctls(crond_t)
@@ -3211,12 +3991,12 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/cron
  
  dev_read_sysfs(crond_t)
  selinux_get_fs_mount(crond_t)
-@@ -131,12 +128,22 @@
- fs_search_auto_mountpoints(crond_t)
+@@ -127,11 +134,23 @@
  
  # need auth_chkpwd to check for locked accounts.
--auth_domtrans_chk_passwd(crond_t)
+ auth_domtrans_chk_passwd(crond_t)
 +auth_domtrans_upd_passwd(crond_t)
++auth_search_key(crond_t)
  
  corecmd_exec_shell(crond_t)
  corecmd_list_bin(crond_t)
@@ -3235,15 +4015,17 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/cron
  domain_use_interactive_fds(crond_t)
  
  files_read_etc_files(crond_t)
-@@ -152,6 +159,7 @@
+@@ -146,7 +165,9 @@
+ libs_use_ld_so(crond_t)
  libs_use_shared_libs(crond_t)
  
++logging_send_audit_msgs(crond_t)
  logging_send_syslog_msg(crond_t)
-+logging_send_audit_msg(crond_t)
++logging_set_loginuid(crond_t)
  
  seutil_read_config(crond_t)
  seutil_read_default_contexts(crond_t)
-@@ -165,6 +173,12 @@
+@@ -160,6 +181,16 @@
  
  mta_send_mail(crond_t)
  
@@ -3253,55 +4035,109 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/cron
 +	files_polyinstantiate_all(crond_t)
 +')
 +
++optional_policy(`
++	apache_search_sys_content(crond_t)
++')
++
  ifdef(`distro_debian',`
  	optional_policy(`
  		# Debian logcheck has the home dir set to its cache
-@@ -193,8 +207,6 @@
- 	manage_sock_files_pattern(crond_t,system_crond_tmp_t,system_crond_tmp_t)
- 	files_tmp_filetrans(crond_t,system_crond_tmp_t,{ dir file lnk_file sock_file fifo_file })
+@@ -180,6 +211,15 @@
+ 	locallogin_link_keys(crond_t)
+ ')
  
--	unconfined_domain(crond_t)
--
- 	userdom_manage_generic_user_home_content_dirs(crond_t)
- 	userdom_manage_generic_user_home_content_files(crond_t)
- 	userdom_manage_generic_user_home_content_symlinks(crond_t)
-@@ -202,12 +214,16 @@
- 	userdom_manage_generic_user_home_content_pipes(crond_t)
- 	userdom_generic_user_home_dir_filetrans_generic_user_home_content(crond_t,{ dir file lnk_file fifo_file sock_file })
++optional_policy(`
++	# these should probably be unconfined_crond_t
++	init_dbus_send_script(crond_t)
++')
++
++optional_policy(`
++	mono_domtrans(crond_t)
++')
++
+ tunable_policy(`fcron_crond', `
+ 	allow crond_t system_cron_spool_t:file manage_file_perms;
+ ')
+@@ -239,7 +279,6 @@
+ allow system_crond_t cron_var_lib_t:file manage_file_perms;
+ files_var_lib_filetrans(system_crond_t,cron_var_lib_t,file)
  
--	allow crond_t unconfined_t:dbus send_msg;
--	allow crond_t initrc_t:dbus send_msg;
-+	init_dbus_chat_script(crond_t)
+-allow system_crond_t system_cron_spool_t:file read_file_perms;
+ # The entrypoint interface is not used as this is not
+ # a regular entrypoint.  Since crontab files are
+ # not directly executed, crond must ensure that
+@@ -249,6 +288,8 @@
+ # for this purpose.
+ allow system_crond_t system_cron_spool_t:file entrypoint;
+ 
++allow system_crond_t system_cron_spool_t:file read_file_perms;
++
+ # Permit a transition from the crond_t domain to this domain.
+ # The transition is requested explicitly by the modified crond 
+ # via setexeccon.  There is no way to set up an automatic
+@@ -270,9 +311,16 @@
+ filetrans_pattern(system_crond_t,crond_tmp_t,system_crond_tmp_t,{ file lnk_file })
+ files_tmp_filetrans(system_crond_t,system_crond_tmp_t,file)
+ 
++# var/lib files for system_crond
++files_search_var_lib(system_crond_t)
++manage_files_pattern(system_crond_t,system_crond_var_lib_t,system_crond_var_lib_t)
++
++allow system_crond_t system_crond_var_run_t:file manage_file_perms;
++files_pid_filetrans(system_crond_t,system_crond_var_run_t,file)
++
+ # Read from /var/spool/cron.
+ allow system_crond_t cron_spool_t:dir list_dir_perms;
+-allow system_crond_t cron_spool_t:file read_file_perms;
++allow system_crond_t cron_spool_t:file rw_file_perms;
+ 
+ kernel_read_kernel_sysctls(system_crond_t)
+ kernel_read_system_state(system_crond_t)
+@@ -325,7 +373,7 @@
+ init_read_utmp(system_crond_t)
+ init_dontaudit_rw_utmp(system_crond_t)
+ # prelink tells init to restart it self, we either need to allow or dontaudit
+-init_write_initctl(system_crond_t)
++init_telinit(system_crond_t)
+ 
+ libs_use_ld_so(system_crond_t)
+ libs_use_shared_libs(system_crond_t)
+@@ -333,6 +381,7 @@
+ libs_exec_ld_so(system_crond_t)
+ 
+ logging_read_generic_logs(system_crond_t)
++logging_send_audit_msgs(system_crond_t)
+ logging_send_syslog_msg(system_crond_t)
+ 
+ miscfiles_read_localization(system_crond_t)
+@@ -383,6 +432,14 @@
+ ')
  
- 	optional_policy(`
- 		mono_domtrans(crond_t)
- 	')
+ optional_policy(`
++	lpd_list_spool(system_crond_t)
++')
 +
-+	optional_policy(`
-+		unconfined_dbus_chat(crond_t)
-+		unconfined_domain(crond_t)
-+	')
- ',`
- 	manage_dirs_pattern(crond_t,crond_tmp_t,crond_tmp_t)
- 	manage_files_pattern(crond_t,crond_tmp_t,crond_tmp_t)
-@@ -258,24 +274,35 @@
- # System cron process domain
- #
- 
-+# This is to handle creation of files in /var/lock directory. (anacron)
-+allow crond_t cron_lock_t:file manage_file_perms;
-+files_lock_filetrans(crond_t,cron_lock_t,file)
++optional_policy(`
++	mono_domtrans(system_crond_t)
++')
 +
- # This is to handle creation of files in /var/log directory.
- #  Used currently by rpm script log files
- allow system_crond_t cron_log_t:file manage_file_perms;
- logging_log_filetrans(system_crond_t,cron_log_t,file)
++optional_policy(`
+ 	mrtg_append_create_logs(system_crond_t)
+ ')
+ 
+@@ -413,6 +470,10 @@
+ ')
  
+ optional_policy(`
++	readahead_domtrans(system_crond_t)
++')
 +
- # This is to handle /var/lib/misc directory.  Used currently
- # by prelink var/lib files for cron 
- allow system_crond_t cron_var_lib_t:file manage_file_perms;
- files_var_lib_filetrans(system_crond_t,cron_var_lib_t,file)
++optional_policy(`
+ 	samba_read_config(system_crond_t)
+ 	samba_read_log(system_crond_t)
+ 	#samba_read_secrets(system_crond_t)
+@@ -423,6 +484,10 @@
+ ')
  
  optional_policy(`
 +	spamassassin_manage_lib_files(system_crond_t)
@@ -3311,39 +4147,25 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/cron
  	# cjp: why?
  	squid_domtrans(system_crond_t)
  ')
+@@ -432,9 +497,14 @@
+ ')
  
- ifdef(`targeted_policy',`
- 	# cjp: FIXME
--	allow crond_t unconfined_t:process transition;
-+	optional_policy(`
-+		unconfined_domtrans(crond_t)
-+	')
- ',`
- 	allow system_crond_t self:capability { dac_override dac_read_search chown setgid setuid fowner net_bind_service fsetid };
- 	allow system_crond_t self:process { signal_perms setsched };
-@@ -369,7 +396,7 @@
- 	init_read_utmp(system_crond_t)
- 	init_dontaudit_rw_utmp(system_crond_t)
- 	# prelink tells init to restart it self, we either need to allow or dontaudit
--	init_write_initctl(system_crond_t)
-+	init_telinit(system_crond_t)
- 
- 	libs_use_ld_so(system_crond_t)
- 	libs_use_shared_libs(system_crond_t)
-@@ -427,6 +454,10 @@
- 	')
+ optional_policy(`
+-	unconfined_domain(system_crond_t)
++	tmpreaper_domtrans(system_crond_t)
++')
  
- 	optional_policy(`
-+		lpd_list_spool(system_crond_t)
-+	')
-+
-+	optional_policy(`
- 		mrtg_append_create_logs(system_crond_t)
- 	')
++optional_policy(`
++	unconfined_dbus_send(crond_t)
++	unconfined_shell_domtrans(crond_t)
+ 	userdom_priveleged_home_dir_manager(system_crond_t)
++	unconfined_domain(system_crond_t)
+ ')
  
+ ifdef(`TODO',`
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/cups.fc serefpolicy-3.0.1/policy/modules/services/cups.fc
 --- nsaserefpolicy/policy/modules/services/cups.fc	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/cups.fc	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/cups.fc	2007-06-19 17:06:27.000000000 -0400
 @@ -8,6 +8,7 @@
  /etc/cups/ppd/.*	--	gen_context(system_u:object_r:cupsd_rw_etc_t,s0)
  /etc/cups/ppds\.dat	--	gen_context(system_u:object_r:cupsd_rw_etc_t,s0)
@@ -3353,18 +4175,23 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/cups
  /etc/cups/certs/.*	--	gen_context(system_u:object_r:cupsd_rw_etc_t,s0)
  
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/cups.te serefpolicy-3.0.1/policy/modules/services/cups.te
---- nsaserefpolicy/policy/modules/services/cups.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/cups.te	2007-05-30 17:24:24.000000000 -0400
-@@ -93,8 +93,6 @@
- # generic socket here until appletalk socket is available in kernels
- allow cupsd_t self:socket create_socket_perms;
- 
--send_audit_msgs_pattern(cupsd_t)
--
- allow cupsd_t cupsd_etc_t:{ dir file } setattr;
- read_files_pattern(cupsd_t,cupsd_etc_t,cupsd_etc_t)
- read_lnk_files_pattern(cupsd_t,cupsd_etc_t,cupsd_etc_t)
-@@ -151,9 +149,11 @@
+--- nsaserefpolicy/policy/modules/services/cups.te	2007-06-15 14:54:33.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/cups.te	2007-06-21 05:59:32.000000000 -0400
+@@ -81,12 +81,11 @@
+ # /usr/lib/cups/backend/serial needs sys_admin(?!)
+ allow cupsd_t self:capability { sys_admin dac_override dac_read_search kill setgid setuid fsetid net_bind_service fowner chown dac_override sys_resource sys_tty_config };
+ dontaudit cupsd_t self:capability { sys_tty_config net_admin };
+-allow cupsd_t self:process { setsched signal_perms };
++allow cupsd_t self:process { setpgid setsched signal_perms };
+ allow cupsd_t self:fifo_file rw_file_perms;
+ allow cupsd_t self:unix_stream_socket { create_stream_socket_perms connectto };
+ allow cupsd_t self:unix_dgram_socket create_socket_perms;
+ allow cupsd_t self:netlink_selinux_socket create_socket_perms;
+-allow cupsd_t self:netlink_route_socket r_netlink_socket_perms;
+ allow cupsd_t self:tcp_socket create_stream_socket_perms;
+ allow cupsd_t self:udp_socket create_socket_perms;
+ allow cupsd_t self:appletalk_socket create_socket_perms;
+@@ -149,9 +148,11 @@
  corenet_tcp_bind_reserved_port(cupsd_t)
  corenet_dontaudit_tcp_bind_all_reserved_ports(cupsd_t)
  corenet_tcp_connect_all_ports(cupsd_t)
@@ -3376,15 +4203,15 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/cups
  
  dev_rw_printer(cupsd_t)
  dev_read_urand(cupsd_t)
-@@ -214,6 +214,7 @@
- libs_read_lib_files(cupsd_t)
+@@ -175,6 +176,7 @@
+ term_search_ptys(cupsd_t)
  
- logging_send_syslog_msg(cupsd_t)
-+logging_send_audit_msg(cupsd_t)
+ auth_domtrans_chk_passwd(cupsd_t)
++auth_domtrans_upd_passwd(cupsd_t)
+ auth_dontaudit_read_pam_pid(cupsd_t)
  
- miscfiles_read_localization(cupsd_t)
- # invoking ghostscript needs to read fonts
-@@ -223,6 +224,7 @@
+ # Filter scripts may be shell scripts, and may invoke progs like /bin/mktemp
+@@ -222,6 +224,7 @@
  
  sysnet_read_config(cupsd_t)
  
@@ -3392,27 +4219,57 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/cups
  userdom_dontaudit_use_unpriv_user_fds(cupsd_t)
  userdom_dontaudit_search_all_users_home_content(cupsd_t)
  
-@@ -233,7 +235,7 @@
- 	lpd_relabel_spool(cupsd_t)
+@@ -233,10 +236,28 @@
  ')
  
--ifdef(`targeted_policy',`
+ optional_policy(`
++	init_stream_connect_script(cupsd_t)
++
++	unconfined_rw_pipes(cupsd_t)
++
++	optional_policy(`
++		init_dbus_chat_script(cupsd_t)
++
++		unconfined_dbus_send(cupsd_t)
++
++		dbus_stub(cupsd_t)
++	')
++')
++
 +optional_policy(`
- 	init_stream_connect_script(cupsd_t)
- 
- 	unconfined_rw_pipes(cupsd_t)
-@@ -279,6 +281,10 @@
+ 	apm_domtrans_client(cupsd_t)
  ')
  
  optional_policy(`
-+	nis_use_ypbind(cupsd_t)
++	auth_use_nsswitch(cupsd_t)
 +')
 +
 +optional_policy(`
- 	nscd_socket_use(cupsd_t)
+ 	cron_system_entry(cupsd_t, cupsd_exec_t)
+ ')
+ 
+@@ -249,6 +270,10 @@
+ 	optional_policy(`
+ 		hal_dbus_chat(cupsd_t)
+ 	')
++
++	optional_policy(`
++		userdom_dbus_chat_all_users(cupsd_t)
++	')
+ ')
+ 
+ optional_policy(`
+@@ -264,16 +289,16 @@
  ')
  
-@@ -289,6 +295,10 @@
+ optional_policy(`
+-	nscd_socket_use(cupsd_t)
+-')
+-
+-optional_policy(`
+ 	# cups execs smbtool which reads samba_etc_t files
+ 	samba_read_config(cupsd_t)
+ 	samba_rw_var_files(cupsd_t)
  ')
  
  optional_policy(`
@@ -3423,22 +4280,24 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/cups
  	seutil_sigchld_newrole(cupsd_t)
  ')
  
-@@ -391,7 +401,11 @@
- 	')
+@@ -377,6 +402,14 @@
  ')
  
--ifdef(`targeted_policy',`
-+optional_policy(`
+ optional_policy(`
 +	term_use_generic_ptys(cupsd_config_t)
 +')
 +
 +optional_policy(`
- 	unconfined_rw_pipes(cupsd_config_t)
++	unconfined_rw_pipes(cupsd_config_t)
++')
++
++optional_policy(`
+ 	cron_system_entry(cupsd_config_t, cupsd_config_exec_t)
  ')
  
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/cvs.te serefpolicy-3.0.1/policy/modules/services/cvs.te
 --- nsaserefpolicy/policy/modules/services/cvs.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/cvs.te	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/cvs.te	2007-06-19 17:06:27.000000000 -0400
 @@ -16,6 +16,7 @@
  type cvs_t;
  type cvs_exec_t;
@@ -3447,21 +4306,18 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/cvs.
  role system_r types cvs_t;
  
  type cvs_data_t; # customizable
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/cyrus.te serefpolicy-3.0.1/policy/modules/services/cyrus.te
---- nsaserefpolicy/policy/modules/services/cyrus.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/cyrus.te	2007-05-30 15:12:50.000000000 -0400
-@@ -138,6 +138,7 @@
+@@ -67,6 +68,7 @@
+ fs_getattr_xattr_fs(cvs_t)
  
- optional_policy(`
- 	snmp_read_snmp_var_lib_files(cyrus_t)
-+	snmp_dontaudit_write_snmp_var_lib_files(cyrus_t)
- ')
+ auth_domtrans_chk_passwd(cvs_t)
++auth_domtrans_upd_passwd(cvs_t)
  
- optional_policy(`
+ corecmd_exec_bin(cvs_t)
+ corecmd_exec_shell(cvs_t)
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/dbus.if serefpolicy-3.0.1/policy/modules/services/dbus.if
---- nsaserefpolicy/policy/modules/services/dbus.if	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/dbus.if	2007-05-30 15:12:50.000000000 -0400
-@@ -49,6 +49,12 @@
+--- nsaserefpolicy/policy/modules/services/dbus.if	2007-06-15 14:54:33.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/dbus.if	2007-06-19 17:06:27.000000000 -0400
+@@ -50,6 +50,12 @@
  ## </param>
  #
  template(`dbus_per_role_template',`
@@ -3474,7 +4330,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/dbus
  
  	##############################
  	#
-@@ -70,6 +76,7 @@
+@@ -71,6 +77,7 @@
  	#
  
  	allow $1_dbusd_t self:process { getattr sigkill signal };
@@ -3482,16 +4338,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/dbus
  	allow $1_dbusd_t self:file { getattr read write };
  	allow $1_dbusd_t self:fifo_file rw_fifo_file_perms;
  	allow $1_dbusd_t self:dbus { send_msg acquire_svc };
-@@ -78,8 +85,6 @@
- 	allow $1_dbusd_t self:tcp_socket create_stream_socket_perms;
- 	allow $1_dbusd_t self:netlink_selinux_socket create_socket_perms;
- 
--	send_audit_msgs_pattern($1_dbusd_t)
--
- 	# For connecting to the bus
- 	allow $2 $1_dbusd_t:unix_stream_socket connectto;
- 	type_change $2 $1_dbusd_t:dbus $1_dbusd_$1_t;
-@@ -135,12 +140,24 @@
+@@ -134,6 +141,17 @@
  	selinux_compute_relabel_context($1_dbusd_t)
  	selinux_compute_user_contexts($1_dbusd_t)
  
@@ -3509,14 +4356,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/dbus
  	auth_read_pam_console_data($1_dbusd_t)
  
  	libs_use_ld_so($1_dbusd_t)
- 	libs_use_shared_libs($1_dbusd_t)
- 
- 	logging_send_syslog_msg($1_dbusd_t)
-+	logging_send_audit_msg($1_dbusd_t)
- 
- 	miscfiles_read_localization($1_dbusd_t)
- 
-@@ -204,6 +221,7 @@
+@@ -204,6 +222,7 @@
  	# For connecting to the bus
  	files_search_pids($2)
  	stream_connect_pattern($2,system_dbusd_var_run_t,system_dbusd_var_run_t,system_dbusd_t)
@@ -3524,7 +4364,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/dbus
  ')
  
  #######################################
-@@ -273,6 +291,31 @@
+@@ -273,6 +292,31 @@
  
  ########################################
  ## <summary>
@@ -3556,7 +4396,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/dbus
  ##	Read dbus configuration.
  ## </summary>
  ## <param name="domain">
-@@ -286,6 +329,7 @@
+@@ -286,6 +330,7 @@
  		type dbusd_etc_t;
  	')
  
@@ -3564,7 +4404,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/dbus
  	allow $1 dbusd_etc_t:file read_file_perms;
  ')
  
-@@ -346,3 +390,23 @@
+@@ -346,3 +391,23 @@
  
  	allow $1 system_dbusd_t:dbus *;
  ')
@@ -3588,40 +4428,9 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/dbus
 +')
 +
 +
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/dbus.te serefpolicy-3.0.1/policy/modules/services/dbus.te
---- nsaserefpolicy/policy/modules/services/dbus.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/dbus.te	2007-05-30 15:12:50.000000000 -0400
-@@ -40,8 +40,6 @@
- # Receive notifications of policy reloads and enforcing status changes.
- allow system_dbusd_t self:netlink_selinux_socket { create bind read };
- 
--send_audit_msgs_pattern(system_dbusd_t)
--
- allow system_dbusd_t dbusd_etc_t:dir list_dir_perms;
- read_files_pattern(system_dbusd_t,dbusd_etc_t,dbusd_etc_t)
- read_lnk_files_pattern(system_dbusd_t,dbusd_etc_t,dbusd_etc_t)
-@@ -93,6 +91,7 @@
- libs_use_shared_libs(system_dbusd_t)
- 
- logging_send_syslog_msg(system_dbusd_t)
-+logging_send_audit_msg(system_dbusd_t)
- 
- miscfiles_read_localization(system_dbusd_t)
- miscfiles_read_certs(system_dbusd_t)
-@@ -117,6 +116,10 @@
- ')
- 
- optional_policy(`
-+	nis_use_ypbind(system_dbusd_t)
-+')
-+
-+optional_policy(`
- 	sysnet_domtrans_dhcpc(system_dbusd_t)
- ')
- 
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/dhcp.te serefpolicy-3.0.1/policy/modules/services/dhcp.te
 --- nsaserefpolicy/policy/modules/services/dhcp.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/dhcp.te	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/dhcp.te	2007-06-19 17:06:27.000000000 -0400
 @@ -113,6 +113,8 @@
  	dbus_system_bus_client_template(dhcpd,dhcpd_t)
  	dbus_connect_system_bus(dhcpd_t)
@@ -3631,21 +4440,9 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/dhcp
  ')
  
  optional_policy(`
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/djbdns.te serefpolicy-3.0.1/policy/modules/services/djbdns.te
---- nsaserefpolicy/policy/modules/services/djbdns.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/djbdns.te	2007-05-30 15:12:50.000000000 -0400
-@@ -44,4 +44,7 @@
- libs_use_ld_so(djbdns_axfrdns_t)
- libs_use_shared_libs(djbdns_axfrdns_t)
- 
--ucspitcp_service_domain(djbdns_axfrdns_t, djbdns_axfrdns_exec_t)
-+optional_policy(`
-+	ucspitcp_service_domain(djbdns_axfrdns_t, djbdns_axfrdns_exec_t)
-+')
-+
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/dovecot.fc serefpolicy-3.0.1/policy/modules/services/dovecot.fc
 --- nsaserefpolicy/policy/modules/services/dovecot.fc	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/dovecot.fc	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/dovecot.fc	2007-06-19 17:06:27.000000000 -0400
 @@ -17,10 +17,12 @@
  
  ifdef(`distro_debian', `
@@ -3661,7 +4458,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/dove
  #
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/dovecot.if serefpolicy-3.0.1/policy/modules/services/dovecot.if
 --- nsaserefpolicy/policy/modules/services/dovecot.if	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/dovecot.if	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/dovecot.if	2007-06-19 17:06:27.000000000 -0400
 @@ -18,3 +18,43 @@
  	manage_files_pattern($1,dovecot_spool_t,dovecot_spool_t)
  	manage_lnk_files_pattern($1,dovecot_spool_t,dovecot_spool_t)
@@ -3708,7 +4505,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/dove
 +
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/dovecot.te serefpolicy-3.0.1/policy/modules/services/dovecot.te
 --- nsaserefpolicy/policy/modules/services/dovecot.te	2007-05-30 11:47:29.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/dovecot.te	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/dovecot.te	2007-06-19 17:06:27.000000000 -0400
 @@ -15,6 +15,12 @@
  domain_entry_file(dovecot_auth_t,dovecot_auth_exec_t)
  role system_r types dovecot_auth_t;
@@ -3761,7 +4558,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/dove
  	seutil_sigchld_newrole(dovecot_t)
  ')
  
-@@ -144,25 +143,29 @@
+@@ -144,33 +143,39 @@
  # dovecot auth local policy
  #
  
@@ -3787,13 +4584,15 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/dove
  kernel_read_all_sysctls(dovecot_auth_t)
  kernel_read_system_state(dovecot_auth_t)
  
++logging_send_audit_msgs(dovecot_auth_t)
 +logging_send_syslog_msg(dovecot_auth_t)
-+logging_send_audit_msg(dovecot_auth_t)
 +
  dev_read_urand(dovecot_auth_t)
  
  auth_domtrans_chk_passwd(dovecot_auth_t)
-@@ -171,6 +174,7 @@
++auth_domtrans_upd_passwd(dovecot_auth_t)
+ auth_use_nsswitch(dovecot_auth_t)
+ 
  files_read_etc_files(dovecot_auth_t)
  files_read_etc_runtime_files(dovecot_auth_t)
  files_search_pids(dovecot_auth_t)
@@ -3801,7 +4600,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/dove
  files_read_usr_symlinks(dovecot_auth_t)
  files_search_tmp(dovecot_auth_t)
  files_read_var_lib_files(dovecot_t)
-@@ -184,12 +188,41 @@
+@@ -184,12 +189,41 @@
  
  seutil_dontaudit_search_config(dovecot_auth_t)
  
@@ -3847,26 +4646,33 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/dove
 +	mta_manage_spool(dovecot_deliver_t)
  ')
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/ftp.te serefpolicy-3.0.1/policy/modules/services/ftp.te
---- nsaserefpolicy/policy/modules/services/ftp.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/ftp.te	2007-05-30 15:12:50.000000000 -0400
-@@ -168,6 +168,7 @@
+--- nsaserefpolicy/policy/modules/services/ftp.te	2007-06-11 16:05:30.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/ftp.te	2007-06-19 17:06:27.000000000 -0400
+@@ -156,6 +156,7 @@
+ 
+ auth_use_nsswitch(ftpd_t)
+ auth_domtrans_chk_passwd(ftpd_t)
++auth_domtrans_upd_passwd(ftpd_t)
+ # Append to /var/log/wtmp.
+ auth_append_login_records(ftpd_t)
+ #kerberized ftp requires the following
+@@ -167,6 +168,7 @@
+ libs_use_ld_so(ftpd_t)
  libs_use_shared_libs(ftpd_t)
  
++logging_send_audit_msgs(ftpd_t)
  logging_send_syslog_msg(ftpd_t)
-+logging_send_audit_msg(ftpd_t)
  
  miscfiles_read_localization(ftpd_t)
- miscfiles_read_public_files(ftpd_t)
-@@ -216,10 +217,14 @@
+@@ -216,6 +218,14 @@
  	userdom_manage_all_users_home_content_dirs(ftpd_t)
  	userdom_manage_all_users_home_content_files(ftpd_t)
  	userdom_manage_all_users_home_content_symlinks(ftpd_t)
 +	auth_manage_all_files_except_shadow(ftpd_t)
- 
- 	ifdef(`targeted_policy',`
--		userdom_generic_user_home_dir_filetrans_generic_user_home_content(ftpd_t,{ dir file lnk_file sock_file fifo_file })
++
++	ifdef(`targeted_policy',`
 +		files_manage_generic_tmp_files(ftpd_t)
- 	')
++	')
 +	auth_read_all_dirs_except_shadow(ftpd_t)
 +	auth_read_all_files_except_shadow(ftpd_t)
 +	auth_read_all_symlinks_except_shadow(ftpd_t)
@@ -3875,36 +4681,25 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/ftp.
  tunable_policy(`ftp_home_dir && use_nfs_home_dirs',`
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/hal.fc serefpolicy-3.0.1/policy/modules/services/hal.fc
 --- nsaserefpolicy/policy/modules/services/hal.fc	2007-05-30 11:47:29.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/hal.fc	2007-05-30 15:12:50.000000000 -0400
-@@ -2,15 +2,20 @@
- /etc/hal/device\.d/printer_remove\.hal -- 	gen_context(system_u:object_r:hald_exec_t,s0)
- /etc/hal/capability\.d/printer_update\.hal --	gen_context(system_u:object_r:hald_exec_t,s0)
- 
--/usr/libexec/hal-acl-tool		--	gen_context(system_u:object_r:hald_acl_exec_t,s0)
- /usr/libexec/hal-hotplug-map 		--	gen_context(system_u:object_r:hald_exec_t,s0)
--/usr/libexec/hal-system-sonypic	 	--	gen_context(system_u:object_r:hald_sonypic_exec_t,s0)
--/usr/libexec/hald-addon-macbookpro-backlight --	gen_context(system_u:object_r:hald_mac_exec_t,s0)
++++ serefpolicy-3.0.1/policy/modules/services/hal.fc	2007-06-19 17:06:27.000000000 -0400
+@@ -8,9 +8,14 @@
+ /usr/libexec/hald-addon-macbookpro-backlight --	gen_context(system_u:object_r:hald_mac_exec_t,s0)
  
  /usr/sbin/hald		--			gen_context(system_u:object_r:hald_exec_t,s0)
++/usr/bin/hal-setup-keymap		--			gen_context(system_u:object_r:hald_keymap_exec_t,s0)
+ 
+ /var/cache/hald(/.*)?				gen_context(system_u:object_r:hald_cache_t,s0)
  
--/var/cache/hald(/.*)?				gen_context(system_u:object_r:hald_cache_t,s0)
--
  /var/lib/hal(/.*)?				gen_context(system_u:object_r:hald_var_lib_t,s0)
  
-+/var/cache/hald(/.*)?				gen_context(system_u:object_r:hald_cache_t,s0)
-+
  /var/run/haldaemon.pid	--	 		gen_context(system_u:object_r:hald_var_run_t,s0)
 +/var/run/vbestate 	--			gen_context(system_u:object_r:hald_var_run_t,s0)
 +
-+/usr/libexec/hal-acl-tool		--	gen_context(system_u:object_r:hald_acl_exec_t,s0)
-+/usr/libexec/hald-addon-macbookpro-backlight --	gen_context(system_u:object_r:hald_mac_exec_t,s0)
-+/usr/libexec/hal-system-sonypic	 --	gen_context(system_u:object_r:hald_sonypic_exec_t,s0)
-+
 +/var/log/pm-suspend.log				gen_context(system_u:object_r:hald_log_t,s0)
 +
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/hal.if serefpolicy-3.0.1/policy/modules/services/hal.if
 --- nsaserefpolicy/policy/modules/services/hal.if	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/hal.if	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/hal.if	2007-06-19 17:06:27.000000000 -0400
 @@ -208,3 +208,98 @@
  	files_search_pids($1)
  	allow $1 hald_var_run_t:file rw_file_perms;
@@ -4005,18 +4800,30 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/hal.
 +')
 +
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/hal.te serefpolicy-3.0.1/policy/modules/services/hal.te
---- nsaserefpolicy/policy/modules/services/hal.te	2007-05-30 11:47:29.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/hal.te	2007-05-30 15:12:50.000000000 -0400
-@@ -61,8 +61,6 @@
- # For backwards compatibility with older kernels
- allow hald_t self:netlink_socket create_socket_perms;
- 
--send_audit_msgs_pattern(hald_t)
--
- manage_files_pattern(hald_t,hald_cache_t,hald_cache_t)
- 
- # log files for hald
-@@ -115,6 +113,9 @@
+--- nsaserefpolicy/policy/modules/services/hal.te	2007-06-15 14:54:33.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/hal.te	2007-06-21 05:59:49.000000000 -0400
+@@ -22,6 +22,12 @@
+ type hald_log_t;
+ files_type(hald_log_t)
+ 
++type hald_keymap_t;
++type hald_keymap_exec_t;
++domain_type(hald_keymap_t)
++domain_entry_file(hald_keymap_t,hald_keymap_exec_t)
++role system_r types hald_keymap_t;
++
+ type hald_mac_t;
+ type hald_mac_exec_t;
+ domain_type(hald_mac_t)
+@@ -81,6 +87,7 @@
+ 
+ kernel_read_system_state(hald_t)
+ kernel_read_network_state(hald_t)
++kernel_read_software_raid_state(hald_t)
+ kernel_rw_kernel_sysctl(hald_t)
+ kernel_read_fs_sysctls(hald_t)
+ kernel_rw_irq_sysctls(hald_t)
+@@ -113,6 +120,9 @@
  dev_rw_power_management(hald_t)
  # hal is now execing pm-suspend
  dev_rw_sysfs(hald_t)
@@ -4026,7 +4833,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/hal.
  
  domain_use_interactive_fds(hald_t)
  domain_read_all_domains_state(hald_t)
-@@ -132,6 +133,7 @@
+@@ -130,6 +140,7 @@
  files_create_boot_flag(hald_t)
  files_getattr_all_dirs(hald_t)
  files_read_kernel_img(hald_t)
@@ -4034,15 +4841,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/hal.
  
  fs_getattr_all_fs(hald_t)
  fs_search_all(hald_t)
-@@ -170,6 +172,7 @@
- libs_exec_ld_so(hald_t)
- libs_exec_lib_files(hald_t)
- 
-+logging_send_audit_msg(hald_t)
- logging_send_syslog_msg(hald_t)
- logging_search_logs(hald_t)
- 
-@@ -180,6 +183,7 @@
+@@ -179,6 +190,7 @@
  
  seutil_read_config(hald_t)
  seutil_read_default_contexts(hald_t)
@@ -4050,7 +4849,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/hal.
  
  sysnet_read_config(hald_t)
  
-@@ -187,6 +191,7 @@
+@@ -186,6 +198,7 @@
  userdom_dontaudit_search_sysadm_home_dirs(hald_t)
  
  optional_policy(`
@@ -4058,7 +4857,18 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/hal.
  	alsa_read_rw_config(hald_t)
  ')
  
-@@ -296,7 +301,10 @@
+@@ -227,6 +240,10 @@
+ 	optional_policy(`
+ 		networkmanager_dbus_chat(hald_t)
+ 	')
++
++	optional_policy(`
++		userdom_dbus_chat_all_users(hald_t)
++	')
+ ')
+ 
+ optional_policy(`
+@@ -295,7 +312,10 @@
  corecmd_exec_bin(hald_acl_t)
  
  dev_getattr_all_chr_files(hald_acl_t)
@@ -4069,14 +4879,35 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/hal.
  dev_setattr_sound_dev(hald_acl_t)
  dev_setattr_generic_usb_dev(hald_acl_t)
  dev_setattr_usbfs_files(hald_acl_t)
-@@ -358,3 +366,4 @@
+@@ -357,3 +377,25 @@
  libs_use_shared_libs(hald_sonypic_t)
  
  miscfiles_read_localization(hald_sonypic_t)
 +
++########################################
++#
++# Local hald keymap policy
++#
++
++domtrans_pattern(hald_t, hald_keymap_exec_t, hald_keymap_t)
++allow hald_t hald_keymap_t:process signal;
++allow hald_keymap_t hald_t:unix_stream_socket connectto;
++
++manage_dirs_pattern(hald_keymap_t,hald_var_lib_t,hald_var_lib_t)
++manage_files_pattern(hald_keymap_t,hald_var_lib_t,hald_var_lib_t)
++files_search_var_lib(hald_keymap_t)
++
++files_read_usr_files(hald_keymap_t)
++
++libs_use_ld_so(hald_keymap_t)
++libs_use_shared_libs(hald_keymap_t)
++
++miscfiles_read_localization(hald_keymap_t)
++
++dev_rw_input_dev(hald_keymap_t)
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/inetd.te serefpolicy-3.0.1/policy/modules/services/inetd.te
 --- nsaserefpolicy/policy/modules/services/inetd.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/inetd.te	2007-05-31 14:32:57.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/inetd.te	2007-06-19 17:06:27.000000000 -0400
 @@ -79,17 +79,21 @@
  corenet_udp_bind_comsat_port(inetd_t)
  corenet_tcp_bind_dbskkd_port(inetd_t)
@@ -4122,7 +4953,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/inet
  manage_dirs_pattern(inetd_child_t,inetd_child_tmp_t,inetd_child_tmp_t)
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/kerberos.if serefpolicy-3.0.1/policy/modules/services/kerberos.if
 --- nsaserefpolicy/policy/modules/services/kerberos.if	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/kerberos.if	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/kerberos.if	2007-06-19 17:06:27.000000000 -0400
 @@ -33,43 +33,10 @@
  #
  interface(`kerberos_use',`
@@ -4171,7 +5002,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/kerb
  ########################################
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/kerberos.te serefpolicy-3.0.1/policy/modules/services/kerberos.te
 --- nsaserefpolicy/policy/modules/services/kerberos.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/kerberos.te	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/kerberos.te	2007-06-22 13:46:36.000000000 -0400
 @@ -5,6 +5,7 @@
  #
  # Declarations
@@ -4180,7 +5011,25 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/kerb
  
  ## <desc>
  ## <p>
-@@ -126,6 +127,7 @@
+@@ -91,6 +92,7 @@
+ kernel_read_kernel_sysctls(kadmind_t)
+ kernel_list_proc(kadmind_t)
+ kernel_read_proc_symlinks(kadmind_t)
++kernel_read_system_state(kadmind_t)
+ 
+ corenet_non_ipsec_sendrecv(kadmind_t)
+ corenet_tcp_sendrecv_all_if(kadmind_t)
+@@ -117,6 +119,9 @@
+ domain_use_interactive_fds(kadmind_t)
+ 
+ files_read_etc_files(kadmind_t)
++files_read_usr_symlinks(kadmind_t)
++files_read_usr_files(kadmind_t)
++files_read_var_files(kadmind_t)
+ 
+ libs_use_ld_so(kadmind_t)
+ libs_use_shared_libs(kadmind_t)
+@@ -126,6 +131,7 @@
  miscfiles_read_localization(kadmind_t)
  
  sysnet_read_config(kadmind_t)
@@ -4188,7 +5037,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/kerb
  
  userdom_dontaudit_use_unpriv_user_fds(kadmind_t)
  userdom_dontaudit_search_sysadm_home_dirs(kadmind_t)
-@@ -221,6 +223,7 @@
+@@ -221,6 +227,7 @@
  miscfiles_read_localization(krb5kdc_t)
  
  sysnet_read_config(krb5kdc_t)
@@ -4196,7 +5045,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/kerb
  
  userdom_dontaudit_use_unpriv_user_fds(krb5kdc_t)
  userdom_dontaudit_search_sysadm_home_dirs(krb5kdc_t)
-@@ -236,3 +239,36 @@
+@@ -236,3 +243,36 @@
  optional_policy(`
  	udev_read_db(krb5kdc_t)
  ')
@@ -4233,15 +5082,35 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/kerb
 +		pcscd_stream_connect(kerberosclient)
 +	')
 +')
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/mailman.if serefpolicy-3.0.1/policy/modules/services/mailman.if
---- nsaserefpolicy/policy/modules/services/mailman.if	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/mailman.if	2007-05-30 15:12:50.000000000 -0400
-@@ -275,6 +275,25 @@
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/ldap.te serefpolicy-3.0.1/policy/modules/services/ldap.te
+--- nsaserefpolicy/policy/modules/services/ldap.te	2007-06-15 14:54:33.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/ldap.te	2007-06-19 17:06:27.000000000 -0400
+@@ -116,6 +116,13 @@
+ userdom_dontaudit_use_unpriv_user_fds(slapd_t)
+ userdom_dontaudit_search_sysadm_home_dirs(slapd_t)
  
- #######################################
- ## <summary>
-+##	append
-+##	mailman logs.
++ifdef(`targeted_policy',`
++	userdom_search_generic_user_home_dirs(slapd_t)
++	#need to be able to read ldif files created by root
++	# cjp: fix to not use templated interface:
++	userdom_read_user_home_content_files(user,slapd_t)
++')
++
+ optional_policy(`
+ 	kerberos_use(slapd_t)
+ ')
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/lpd.if serefpolicy-3.0.1/policy/modules/services/lpd.if
+--- nsaserefpolicy/policy/modules/services/lpd.if	2007-05-29 14:10:57.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/lpd.if	2007-06-19 17:06:27.000000000 -0400
+@@ -394,3 +394,22 @@
+ 
+ 	domtrans_pattern($2, lpr_exec_t, $1_lpr_t)
+ ')
++
++########################################
++## <summary>
++##	Allow the specified domain to execute lpr
++##	in the caller domain.
 +## </summary>
 +## <param name="domain">
 +##	<summary>
@@ -4249,108 +5118,39 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/mail
 +##	</summary>
 +## </param>
 +#
-+interface(`mailman_append_log',`
++interface(`lpd_exec_lpr',`
 +	gen_require(`
-+		type mailman_log_t;
++		type lpr_exec_t;
 +	')
 +
-+	append_files_pattern($1,mailman_log_t,mailman_log_t)
++	can_exec($1,lpr_exec_t)
 +')
-+
-+#######################################
-+## <summary>
- ##	Allow domain to read mailman archive files.
- ## </summary>
- ## <param name="domain">
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/mta.te serefpolicy-3.0.1/policy/modules/services/mta.te
---- nsaserefpolicy/policy/modules/services/mta.te	2007-05-30 11:47:29.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/mta.te	2007-05-30 15:12:50.000000000 -0400
-@@ -27,18 +27,11 @@
- 
- type sendmail_exec_t;
- files_type(sendmail_exec_t)
-+application_executable_file(sendmail_exec_t)
- 
- mta_base_mail_template(system)
- role system_r types system_mail_t;
- 
--# cjp: need to resolve this, but require{}
--# does not work in the else part of the optional
--#ifdef(`strict_policy',`
--#	optional_policy(`',`
--#		init_system_domain(system_mail_t,sendmail_exec_t)
--#	')
--#')
--
- ########################################
- #
- # System mail local policy
-@@ -61,7 +54,6 @@
- userdom_dontaudit_search_sysadm_home_dirs(system_mail_t)
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/mailman.te serefpolicy-3.0.1/policy/modules/services/mailman.te
+--- nsaserefpolicy/policy/modules/services/mailman.te	2007-06-15 14:54:33.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/mailman.te	2007-06-19 17:06:27.000000000 -0400
+@@ -96,6 +96,7 @@
+ kernel_read_proc_symlinks(mailman_queue_t)
  
- ifdef(`targeted_policy',`
--	typealias system_mail_t alias sysadm_mail_t;
+ auth_domtrans_chk_passwd(mailman_queue_t)
++auth_domtrans_upd_passwd(mailman_queue_t)
  
- 	manage_dirs_pattern(system_mail_t,mail_spool_t,mail_spool_t)
- 	manage_files_pattern(system_mail_t,mail_spool_t,mail_spool_t)
-@@ -91,6 +83,7 @@
- optional_policy(`
- 	apache_read_squirrelmail_data(system_mail_t)
- 	apache_append_squirrelmail_data(system_mail_t)
-+	apache_search_bugzilla_dirs(system_mail_t)
- 
- 	# apache should set close-on-exec
- 	apache_dontaudit_append_log(system_mail_t)
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/nagios.te serefpolicy-3.0.1/policy/modules/services/nagios.te
---- nsaserefpolicy/policy/modules/services/nagios.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/nagios.te	2007-05-30 15:12:50.000000000 -0400
-@@ -73,8 +73,10 @@
- corenet_udp_sendrecv_all_nodes(nagios_t)
- corenet_tcp_sendrecv_all_ports(nagios_t)
- corenet_udp_sendrecv_all_ports(nagios_t)
-+corenet_tcp_connect_all_ports(nagios_t)
- 
- dev_read_sysfs(nagios_t)
-+dev_read_urand(nagios_t)
- 
- domain_use_interactive_fds(nagios_t)
- # for ps
-@@ -97,8 +99,6 @@
- 
- miscfiles_read_localization(nagios_t)
- 
--sysnet_read_config(nagios_t)
--
- userdom_dontaudit_use_unpriv_user_fds(nagios_t)
- userdom_dontaudit_search_sysadm_home_dirs(nagios_t)
+ files_dontaudit_search_pids(mailman_queue_t)
  
-@@ -108,14 +108,10 @@
- 	netutils_domtrans_ping(nagios_t)
- 	netutils_signal_ping(nagios_t)
- 	netutils_kill_ping(nagios_t)
--
--	# cjp: leaked file descriptors:
--	#dontaudit ping_t nagios_etc_t:file read;
--	#dontaudit ping_t nagios_log_t:fifo_file read;
- ')
- 
- optional_policy(`
--	nis_use_ypbind(nagios_t)
-+	auth_use_nsswitch(nagios_t)
- ')
- 
- optional_policy(`
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/networkmanager.if serefpolicy-3.0.1/policy/modules/services/networkmanager.if
---- nsaserefpolicy/policy/modules/services/networkmanager.if	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/networkmanager.if	2007-05-30 15:12:50.000000000 -0400
-@@ -78,3 +78,22 @@
- 	allow $1 NetworkManager_t:dbus send_msg;
- 	allow NetworkManager_t $1:dbus send_msg;
- ')
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/mailscanner.fc serefpolicy-3.0.1/policy/modules/services/mailscanner.fc
+--- nsaserefpolicy/policy/modules/services/mailscanner.fc	1969-12-31 19:00:00.000000000 -0500
++++ serefpolicy-3.0.1/policy/modules/services/mailscanner.fc	2007-06-19 17:06:27.000000000 -0400
+@@ -0,0 +1,2 @@
++/var/spool/MailScanner(/.*)?	gen_context(system_u:object_r:mailscanner_spool_t,s0)
++
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/mailscanner.if serefpolicy-3.0.1/policy/modules/services/mailscanner.if
+--- nsaserefpolicy/policy/modules/services/mailscanner.if	1969-12-31 19:00:00.000000000 -0500
++++ serefpolicy-3.0.1/policy/modules/services/mailscanner.if	2007-06-19 17:06:27.000000000 -0400
+@@ -0,0 +1,59 @@
++## <summary>Anti-Virus and Anti-Spam Filter</summary>
 +
 +########################################
 +## <summary>
-+##	Transition to NetworkManager 
++##	Search mailscanner spool directories.
 +## </summary>
 +## <param name="domain">
 +##	<summary>
@@ -4358,17 +5158,214 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/netw
 +##	</summary>
 +## </param>
 +#
-+interface(`networkmanager_domtrans',`
++interface(`mailscanner_search_spool',`
 +	gen_require(`
-+		type NetworkManager_t, NetworkManager_exec_t;
++		type mailscanner_spool_t;
 +	')
-+	corecmd_search_bin($1)
-+	domtrans_pattern($1,NetworkManager_exec_t,NetworkManager_t)
 +
++	files_search_spool($1)
++	allow $1 mailscanner_spool_t:dir search_dir_perms;
++')
++
++########################################
++## <summary>
++##	read mailscanner spool files.
++## </summary>
++## <param name="domain">
++##	<summary>
++##	Domain allowed access.
++##	</summary>
++## </param>
++#
++interface(`mailscanner_read_spool',`
++	gen_require(`
++		type mailscanner_spool_t;
++	')
++
++	files_search_spool($1)
++	read_files_pattern($1,mailscanner_spool_t,mailscanner_spool_t)
++')
++
++########################################
++## <summary>
++##	Create, read, write, and delete
++##	mailscanner spool files.
++## </summary>
++## <param name="domain">
++##	<summary>
++##	Domain allowed access.
++##	</summary>
++## </param>
++#
++interface(`mailscanner_manage_spool',`
++	gen_require(`
++		type mailscanner_spool_t;
++	')
++
++	files_search_spool($1)
++	manage_files_pattern($1,mailscanner_spool_t,mailscanner_spool_t)
++')
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/mailscanner.te serefpolicy-3.0.1/policy/modules/services/mailscanner.te
+--- nsaserefpolicy/policy/modules/services/mailscanner.te	1969-12-31 19:00:00.000000000 -0500
++++ serefpolicy-3.0.1/policy/modules/services/mailscanner.te	2007-06-19 17:11:15.000000000 -0400
+@@ -0,0 +1,5 @@
++
++policy_module(mailscanner,1.0.0)
++
++type mailscanner_spool_t;
++files_type(mailscanner_spool_t)
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/mta.if serefpolicy-3.0.1/policy/modules/services/mta.if
+--- nsaserefpolicy/policy/modules/services/mta.if	2007-05-30 11:47:29.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/mta.if	2007-06-19 17:06:27.000000000 -0400
+@@ -392,6 +392,7 @@
+ 	allow $1 mail_spool_t:dir list_dir_perms;
+ 	create_files_pattern($1,mail_spool_t,mail_spool_t)
+ 	read_files_pattern($1,mail_spool_t,mail_spool_t)
++	append_files_pattern($1,mail_spool_t,mail_spool_t)
+ 	create_lnk_files_pattern($1,mail_spool_t,mail_spool_t)
+ 	read_lnk_files_pattern($1,mail_spool_t,mail_spool_t)
+ 
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/mta.te serefpolicy-3.0.1/policy/modules/services/mta.te
+--- nsaserefpolicy/policy/modules/services/mta.te	2007-06-15 14:54:33.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/mta.te	2007-06-19 17:06:27.000000000 -0400
+@@ -27,6 +27,7 @@
+ 
+ type sendmail_exec_t;
+ files_type(sendmail_exec_t)
++application_executable_file(sendmail_exec_t)
+ 
+ mta_base_mail_template(system)
+ role system_r types system_mail_t;
+@@ -52,9 +53,37 @@
+ userdom_use_sysadm_terms(system_mail_t)
+ userdom_dontaudit_search_sysadm_home_dirs(system_mail_t)
+ 
++ifdef(`targeted_policy',`
++
++	manage_dirs_pattern(system_mail_t,mail_spool_t,mail_spool_t)
++	manage_files_pattern(system_mail_t,mail_spool_t,mail_spool_t)
++	manage_lnk_files_pattern(system_mail_t,mail_spool_t,mail_spool_t)
++	manage_fifo_files_pattern(system_mail_t,mail_spool_t,mail_spool_t)
++
++	# for reading .forward - maybe we need a new type for it?
++	# also for delivering mail to maildir
++	userdom_manage_generic_user_home_content_dirs(mailserver_delivery)
++	userdom_manage_generic_user_home_content_files(mailserver_delivery)
++	userdom_manage_generic_user_home_content_symlinks(mailserver_delivery)
++	userdom_manage_generic_user_home_content_sockets(mailserver_delivery)
++	userdom_manage_generic_user_home_content_pipes(mailserver_delivery)
++	userdom_generic_user_home_dir_filetrans_generic_user_home_content(mailserver_delivery,{ dir file lnk_file sock_file fifo_file })
++
++# cjp: another require-in-else to resolve
++#	optional_policy(`',`
++		corecmd_exec_all_executables(system_mail_t)
++
++		files_exec_etc_files(system_mail_t)
++
++		libs_exec_ld_so(system_mail_t)
++		libs_exec_lib_files(system_mail_t)
++#	')
++')
++
+ optional_policy(`
+ 	apache_read_squirrelmail_data(system_mail_t)
+ 	apache_append_squirrelmail_data(system_mail_t)
++	apache_search_bugzilla_dirs(system_mail_t)
+ 
+ 	# apache should set close-on-exec
+ 	apache_dontaudit_append_log(system_mail_t)
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/nagios.te serefpolicy-3.0.1/policy/modules/services/nagios.te
+--- nsaserefpolicy/policy/modules/services/nagios.te	2007-05-29 14:10:57.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/nagios.te	2007-06-19 17:06:27.000000000 -0400
+@@ -73,8 +73,10 @@
+ corenet_udp_sendrecv_all_nodes(nagios_t)
+ corenet_tcp_sendrecv_all_ports(nagios_t)
+ corenet_udp_sendrecv_all_ports(nagios_t)
++corenet_tcp_connect_all_ports(nagios_t)
+ 
+ dev_read_sysfs(nagios_t)
++dev_read_urand(nagios_t)
+ 
+ domain_use_interactive_fds(nagios_t)
+ # for ps
+@@ -97,8 +99,6 @@
+ 
+ miscfiles_read_localization(nagios_t)
+ 
+-sysnet_read_config(nagios_t)
+-
+ userdom_dontaudit_use_unpriv_user_fds(nagios_t)
+ userdom_dontaudit_search_sysadm_home_dirs(nagios_t)
+ 
+@@ -108,14 +108,10 @@
+ 	netutils_domtrans_ping(nagios_t)
+ 	netutils_signal_ping(nagios_t)
+ 	netutils_kill_ping(nagios_t)
+-
+-	# cjp: leaked file descriptors:
+-	#dontaudit ping_t nagios_etc_t:file read;
+-	#dontaudit ping_t nagios_log_t:fifo_file read;
+ ')
+ 
+ optional_policy(`
+-	nis_use_ypbind(nagios_t)
++	auth_use_nsswitch(nagios_t)
+ ')
+ 
+ optional_policy(`
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/networkmanager.fc serefpolicy-3.0.1/policy/modules/services/networkmanager.fc
+--- nsaserefpolicy/policy/modules/services/networkmanager.fc	2007-05-29 14:10:57.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/networkmanager.fc	2007-06-19 17:06:27.000000000 -0400
+@@ -1,5 +1,6 @@
+ 
+ /usr/(s)?bin/NetworkManager	--	gen_context(system_u:object_r:NetworkManager_exec_t,s0)
++/usr/(s)?bin/wpa_supplicant	--	gen_context(system_u:object_r:NetworkManager_exec_t,s0)
+ /var/run/NetworkManager\.pid	--	gen_context(system_u:object_r:NetworkManager_var_run_t,s0)
+ /var/run/NetworkManager(/.*)?		gen_context(system_u:object_r:NetworkManager_var_run_t,s0)
+ /var/run/wpa_supplicant(/.*)?		gen_context(system_u:object_r:NetworkManager_var_run_t,s0)
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/networkmanager.te serefpolicy-3.0.1/policy/modules/services/networkmanager.te
+--- nsaserefpolicy/policy/modules/services/networkmanager.te	2007-06-15 14:54:33.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/networkmanager.te	2007-06-21 06:00:26.000000000 -0400
+@@ -41,6 +41,8 @@
+ kernel_read_kernel_sysctls(NetworkManager_t)
+ kernel_load_module(NetworkManager_t)
+ 
++can_exec(NetworkManager_t, NetworkManager_exec_t)
++
+ corenet_non_ipsec_sendrecv(NetworkManager_t)
+ corenet_tcp_sendrecv_all_if(NetworkManager_t)
+ corenet_udp_sendrecv_all_if(NetworkManager_t)
+@@ -135,6 +137,7 @@
+ 	dbus_system_bus_client_template(NetworkManager,NetworkManager_t)
+ 	dbus_connect_system_bus(NetworkManager_t)
+ 	dbus_send_system_bus(NetworkManager_t)
++	userdom_dbus_chat_all_users(NetworkManager_t)
+ ')
+ 
+ optional_policy(`
+@@ -151,6 +154,11 @@
+ ')
+ 
+ optional_policy(`
++	openvpn_domtrans(NetworkManager_t)
++	openvpn_signal(NetworkManager_t)
 +')
++
++optional_policy(`
+ 	ppp_domtrans(NetworkManager_t)
+ 	ppp_read_pid_files(NetworkManager_t)
+ 	ppp_signal(NetworkManager_t)
+@@ -165,6 +173,7 @@
+ ')
+ 
+ optional_policy(`
++	unconfined_rw_pipes(NetworkManager_t)
+ 	# Read gnome-keyring
+ 	unconfined_read_home_content_files(NetworkManager_t)
+ ')
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/nis.fc serefpolicy-3.0.1/policy/modules/services/nis.fc
 --- nsaserefpolicy/policy/modules/services/nis.fc	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/nis.fc	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/nis.fc	2007-06-19 17:06:27.000000000 -0400
 @@ -4,6 +4,7 @@
  /sbin/ypbind		--	gen_context(system_u:object_r:ypbind_exec_t,s0)
  
@@ -4379,7 +5376,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/nis.
  /usr/sbin/rpc\.ypxfrd	--	gen_context(system_u:object_r:ypxfr_exec_t,s0)
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/nis.if serefpolicy-3.0.1/policy/modules/services/nis.if
 --- nsaserefpolicy/policy/modules/services/nis.if	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/nis.if	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/nis.if	2007-06-19 17:06:27.000000000 -0400
 @@ -48,8 +48,8 @@
  	corenet_udp_bind_all_nodes($1)
  	corenet_tcp_bind_generic_port($1)
@@ -4393,7 +5390,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/nis.
  	corenet_tcp_connect_portmap_port($1)
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/nis.te serefpolicy-3.0.1/policy/modules/services/nis.te
 --- nsaserefpolicy/policy/modules/services/nis.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/nis.te	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/nis.te	2007-06-19 17:06:27.000000000 -0400
 @@ -112,6 +112,14 @@
  userdom_dontaudit_use_unpriv_user_fds(ypbind_t)
  userdom_dontaudit_search_sysadm_home_dirs(ypbind_t)
@@ -4409,15 +5406,18 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/nis.
  optional_policy(`
  	seutil_sigchld_newrole(ypbind_t)
  ')
-@@ -192,6 +200,7 @@
- userdom_dontaudit_use_unpriv_user_fds(yppasswdd_t)
- userdom_dontaudit_search_sysadm_home_dirs(yppasswdd_t)
- 
-+
- optional_policy(`
- 	hostname_exec(yppasswdd_t)
- ')
-@@ -244,6 +253,8 @@
+@@ -154,8 +162,8 @@
+ corenet_udp_sendrecv_all_ports(yppasswdd_t)
+ corenet_tcp_bind_all_nodes(yppasswdd_t)
+ corenet_udp_bind_all_nodes(yppasswdd_t)
+-corenet_tcp_bind_reserved_port(yppasswdd_t)
+-corenet_udp_bind_reserved_port(yppasswdd_t)
++corenet_tcp_bind_all_rpc_ports(yppasswdd_t)
++corenet_udp_bind_all_rpc_ports(yppasswdd_t)
+ corenet_dontaudit_tcp_bind_all_reserved_ports(yppasswdd_t)
+ corenet_dontaudit_udp_bind_all_reserved_ports(yppasswdd_t)
+ corenet_sendrecv_generic_server_packets(yppasswdd_t)
+@@ -244,6 +252,8 @@
  corenet_udp_bind_all_nodes(ypserv_t)
  corenet_tcp_bind_reserved_port(ypserv_t)
  corenet_udp_bind_reserved_port(ypserv_t)
@@ -4426,15 +5426,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/nis.
  corenet_dontaudit_tcp_bind_all_reserved_ports(ypserv_t)
  corenet_dontaudit_udp_bind_all_reserved_ports(ypserv_t)
  corenet_sendrecv_generic_server_packets(ypserv_t)
-@@ -274,6 +285,7 @@
- userdom_dontaudit_use_unpriv_user_fds(ypserv_t)
- userdom_dontaudit_search_sysadm_home_dirs(ypserv_t)
- 
-+
- optional_policy(`
- 	seutil_sigchld_newrole(ypserv_t)
- ')
-@@ -311,6 +323,8 @@
+@@ -311,6 +321,8 @@
  corenet_udp_bind_all_nodes(ypxfr_t)
  corenet_tcp_bind_reserved_port(ypxfr_t)
  corenet_udp_bind_reserved_port(ypxfr_t)
@@ -4445,7 +5437,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/nis.
  corenet_tcp_connect_all_ports(ypxfr_t)
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/nscd.te serefpolicy-3.0.1/policy/modules/services/nscd.te
 --- nsaserefpolicy/policy/modules/services/nscd.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/nscd.te	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/nscd.te	2007-06-19 17:06:27.000000000 -0400
 @@ -28,14 +28,14 @@
  # Local policy
  #
@@ -4464,14 +5456,14 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/nscd
  allow nscd_t self:tcp_socket create_socket_perms;
  allow nscd_t self:udp_socket create_socket_perms;
  
-@@ -93,6 +93,7 @@
+@@ -92,6 +92,7 @@
+ libs_use_ld_so(nscd_t)
  libs_use_shared_libs(nscd_t)
  
++logging_send_audit_msgs(nscd_t)
  logging_send_syslog_msg(nscd_t)
-+logging_send_audit_msg(nscd_t)
  
  miscfiles_read_localization(nscd_t)
- 
 @@ -113,3 +114,11 @@
  	xen_dontaudit_rw_unix_stream_sockets(nscd_t)
  	xen_append_log(nscd_t)
@@ -4485,24 +5477,9 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/nscd
 +')
 +
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/ntp.te serefpolicy-3.0.1/policy/modules/services/ntp.te
---- nsaserefpolicy/policy/modules/services/ntp.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/ntp.te	2007-05-30 17:34:07.000000000 -0400
-@@ -110,14 +110,6 @@
- userdom_list_sysadm_home_dirs(ntpd_t)
- userdom_dontaudit_list_sysadm_home_dirs(ntpd_t)
- 
--ifdef(`targeted_policy', `
--	optional_policy(`
--		# The Gnome date GUI code is requesting that 
--		# the ntp code change the date of the machine.
--		unconfined_rw_pipes(ntpd_t)
--	')
--')
--
- optional_policy(`
- 	# for cron jobs
- 	cron_system_entry(ntpd_t,ntpdate_exec_t)
-@@ -133,6 +125,10 @@
+--- nsaserefpolicy/policy/modules/services/ntp.te	2007-06-11 16:05:30.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/ntp.te	2007-06-19 17:06:27.000000000 -0400
+@@ -125,6 +125,10 @@
  ')
  
  optional_policy(`
@@ -4513,60 +5490,17 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/ntp.
  	seutil_sigchld_newrole(ntpd_t)
  ')
  
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/oddjob.te serefpolicy-3.0.1/policy/modules/services/oddjob.te
---- nsaserefpolicy/policy/modules/services/oddjob.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/oddjob.te	2007-05-30 15:12:50.000000000 -0400
-@@ -27,7 +27,7 @@
- # oddjob local policy
- #
- 
--allow oddjob_t self:capability { audit_write setgid } ;
-+allow oddjob_t self:capability setgid;
- allow oddjob_t self:process { setexec signal };
- allow oddjob_t self:fifo_file { read write };
- allow oddjob_t self:unix_stream_socket create_stream_socket_perms;
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/openct.fc serefpolicy-3.0.1/policy/modules/services/openct.fc
---- nsaserefpolicy/policy/modules/services/openct.fc	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/openct.fc	2007-05-30 15:12:50.000000000 -0400
-@@ -2,6 +2,7 @@
- # /usr
- #
- /usr/sbin/openct-control	 --	gen_context(system_u:object_r:openct_exec_t,s0)
-+/usr/sbin/ifdhandler		--	gen_context(system_u:object_r:openct_exec_t,s0)
- 
- #
- # /var
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/openct.if serefpolicy-3.0.1/policy/modules/services/openct.if
---- nsaserefpolicy/policy/modules/services/openct.if	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/openct.if	2007-05-30 15:12:50.000000000 -0400
-@@ -1 +1,82 @@
- ## <summary>Service for handling smart card readers.</summary>
-+
-+########################################
-+## <summary>
-+##	Execute a domain transition to run openct.
-+## </summary>
-+## <param name="domain">
-+## <summary>
-+##	Domain allowed to transition.
-+## </summary>
-+## </param>
-+#
-+interface(`openct_domtrans',`
-+	gen_require(`
-+		type openct_t, openct_exec_t;
-+	')
-+
-+	domain_auto_trans($1,openct_exec_t,openct_t)
-+
-+	allow openct_t $1:fd use;
-+	allow openct_t $1:fifo_file rw_file_perms;
-+	allow openct_t $1:process sigchld;
-+')
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/openvpn.if serefpolicy-3.0.1/policy/modules/services/openvpn.if
+--- nsaserefpolicy/policy/modules/services/openvpn.if	2007-05-29 14:10:57.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/openvpn.if	2007-06-19 17:06:27.000000000 -0400
+@@ -22,3 +22,71 @@
+ 	read_files_pattern($1,openvpn_etc_t,openvpn_etc_t)
+ 	read_lnk_files_pattern($1,openvpn_etc_t,openvpn_etc_t)
+ ')
 +
 +########################################
 +## <summary>
-+##	Read openct PID files.
++##	Execute OPENVPN clients in the openvpn domain.
 +## </summary>
 +## <param name="domain">
 +##	<summary>
@@ -4574,40 +5508,49 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/open
 +##	</summary>
 +## </param>
 +#
-+interface(`openct_read_pid_files',`
++interface(`openvpn_domtrans',`
 +	gen_require(`
-+		type openct_var_run_t;
++		type openvpn_t, openvpn_exec_t;
 +	')
 +
-+	files_search_pids($1)
-+	allow $1 openct_var_run_t:dir search_dir_perms;
-+	allow $1 openct_var_run_t:file r_file_perms;
++	domtrans_pattern($1,openvpn_exec_t,openvpn_t)
 +')
 +
 +########################################
 +## <summary>
-+##	Connect to openct over an unix stream socket.
++##	Execute OPENVPN clients in the openvpn domain, and
++##	allow the specified role the openvpn domain.
 +## </summary>
 +## <param name="domain">
 +##	<summary>
 +##	Domain allowed access.
 +##	</summary>
 +## </param>
++## <param name="role">
++##	<summary>
++##	The role to be allowed the openvpn domain.
++##	</summary>
++## </param>
++## <param name="terminal">
++##	<summary>
++##	The type of the terminal allow the openvpn domain to use.
++##	</summary>
++## </param>
++## <rolecap/>
 +#
-+interface(`openct_stream_connect',`
++interface(`openvpn_run',`
 +	gen_require(`
-+		type openct_t, openct_var_run_t;
++		type openvpn_t;
 +	')
 +
-+	files_search_pids($1)
-+	allow $1 openct_var_run_t:dir search_dir_perms;
-+	allow $1 openct_var_run_t:sock_file write;
-+	allow $1 openct_t:unix_stream_socket connectto;
++	openvpn_domtrans($1)
++	role $2 types openvpn_t;
++	allow openvpn_t $3:chr_file rw_term_perms;
 +')
 +
 +########################################
 +## <summary>
-+##	Send openct a null signal.
++##	Send generic signals to OPENVPN clients.
 +## </summary>
 +## <param name="domain">
 +##	<summary>
@@ -4615,54 +5558,36 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/open
 +##	</summary>
 +## </param>
 +#
-+interface(`openct_signull',`
++interface(`openvpn_signal',`
 +	gen_require(`
-+		type openct_t;
++		type openvpn_t;
 +	')
 +
-+	allow $1 openct_t:process signull;
++	allow $1 openvpn_t:process signal;
 +')
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/openct.te serefpolicy-3.0.1/policy/modules/services/openct.te
---- nsaserefpolicy/policy/modules/services/openct.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/openct.te	2007-05-30 15:12:50.000000000 -0400
-@@ -21,9 +21,13 @@
- dontaudit openct_t self:capability sys_tty_config;
- allow openct_t self:process signal_perms;
- 
-+can_exec(openct_t,openct_exec_t)
-+
- manage_files_pattern(openct_t,openct_var_run_t,openct_var_run_t)
- files_pid_filetrans(openct_t,openct_var_run_t,file)
- 
-+corecmd_search_bin(openct_t)
-+
- kernel_read_kernel_sysctls(openct_t)
- kernel_list_proc(openct_t)
- kernel_read_proc_symlinks(openct_t)
-@@ -31,6 +35,8 @@
- dev_read_sysfs(openct_t)
- # openct asks for this
- dev_rw_usbfs(openct_t)
-+dev_rw_smartcard(openct_t)
-+dev_rw_generic_usb_dev(openct_t)
- 
- domain_use_interactive_fds(openct_t)
- 
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/openvpn.fc serefpolicy-3.0.1/policy/modules/services/openvpn.fc
---- nsaserefpolicy/policy/modules/services/openvpn.fc	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/openvpn.fc	2007-05-30 15:12:50.000000000 -0400
-@@ -11,5 +11,5 @@
- #
- # /var
- #
--/var/log/openvpn.*	--	gen_context(system_u:object_r:openvpn_var_log_t,s0)
--/var/run/openvpn.*	--	gen_context(system_u:object_r:openvpn_var_run_t,s0)
-+/var/log/openvpn(/.*)?		gen_context(system_u:object_r:openvpn_var_log_t,s0)
-+/var/run/openvpn(/.*)?		gen_context(system_u:object_r:openvpn_var_run_t,s0)
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/openvpn.te serefpolicy-3.0.1/policy/modules/services/openvpn.te
---- nsaserefpolicy/policy/modules/services/openvpn.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/openvpn.te	2007-05-30 15:12:50.000000000 -0400
-@@ -84,6 +84,11 @@
+--- nsaserefpolicy/policy/modules/services/openvpn.te	2007-06-11 16:05:30.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/openvpn.te	2007-06-19 17:06:27.000000000 -0400
+@@ -42,8 +42,8 @@
+ allow openvpn_t openvpn_var_log_t:file manage_file_perms;
+ logging_log_filetrans(openvpn_t,openvpn_var_log_t,file)
+ 
+-allow openvpn_t openvpn_var_run_t:file manage_file_perms;
+-files_pid_filetrans(openvpn_t, openvpn_var_run_t, file)
++manage_files_pattern(openvpn_t,openvpn_var_run_t,openvpn_var_run_t)
++files_pid_filetrans(openvpn_t, openvpn_var_run_t, { file dir })
+ 
+ kernel_read_kernel_sysctls(openvpn_t)
+ kernel_read_net_sysctls(openvpn_t)
+@@ -66,6 +66,7 @@
+ corenet_udp_bind_openvpn_port(openvpn_t)
+ corenet_sendrecv_openvpn_server_packets(openvpn_t)
+ corenet_rw_tun_tap_dev(openvpn_t)
++corenet_tcp_connect_openvpn_port(openvpn_t)
+ 
+ dev_search_sysfs(openvpn_t)
+ dev_read_rand(openvpn_t)
+@@ -84,6 +85,11 @@
  sysnet_dns_name_resolve(openvpn_t)
  sysnet_exec_ifconfig(openvpn_t)
  
@@ -4674,34 +5599,9 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/open
  optional_policy(`
  	daemontools_service_domain(openvpn_t,openvpn_exec_t)
  ')
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/pcscd.te serefpolicy-3.0.1/policy/modules/services/pcscd.te
---- nsaserefpolicy/policy/modules/services/pcscd.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/pcscd.te	2007-05-30 15:12:50.000000000 -0400
-@@ -21,6 +21,7 @@
- #
- 
- allow pcscd_t self:capability { dac_override dac_read_search };
-+allow pcscd_t self:process signal;
- allow pcscd_t self:fifo_file { read write };
- allow pcscd_t self:unix_stream_socket create_stream_socket_perms;
- allow pcscd_t self:unix_dgram_socket create_socket_perms;
-@@ -57,5 +58,13 @@
- sysnet_dns_name_resolve(pcscd_t)
- 
- optional_policy(`
-+	openct_stream_connect(pcscd_t)
-+	openct_read_pid_files(pcscd_t)
-+	openct_signull(pcscd_t)
-+')
-+
-+optional_policy(`
- 	rpm_use_script_fds(pcscd_t)
- ')
-+
-+
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/pegasus.if serefpolicy-3.0.1/policy/modules/services/pegasus.if
 --- nsaserefpolicy/policy/modules/services/pegasus.if	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/pegasus.if	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/pegasus.if	2007-06-19 17:06:27.000000000 -0400
 @@ -1 +1,19 @@
  ## <summary>The Open Group Pegasus CIM/WBEM Server.</summary>
 +
@@ -4723,21 +5623,13 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/pega
 +	domtrans_pattern($1,pegasus_exec_t,pegasus_t)
 +')
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/pegasus.te serefpolicy-3.0.1/policy/modules/services/pegasus.te
---- nsaserefpolicy/policy/modules/services/pegasus.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/pegasus.te	2007-05-30 15:12:50.000000000 -0400
-@@ -38,8 +38,6 @@
- allow pegasus_t self:unix_stream_socket create_stream_socket_perms;
- allow pegasus_t self:tcp_socket create_stream_socket_perms;
- 
--send_audit_msgs_pattern(pegasus_t)
--
- allow pegasus_t pegasus_conf_t:dir rw_dir_perms;
- allow pegasus_t pegasus_conf_t:file { read_file_perms link unlink };
- allow pegasus_t pegasus_conf_t:lnk_file read_lnk_file_perms;
-@@ -96,13 +94,12 @@
+--- nsaserefpolicy/policy/modules/services/pegasus.te	2007-06-15 14:54:33.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/pegasus.te	2007-06-19 17:06:27.000000000 -0400
+@@ -94,13 +94,13 @@
  
  auth_use_nsswitch(pegasus_t)
  auth_domtrans_chk_passwd(pegasus_t)
++auth_domtrans_upd_passwd(pegasus_t)
 +auth_read_shadow(pegasus_t)
  
  domain_use_interactive_fds(pegasus_t)
@@ -4750,7 +5642,12 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/pega
  files_read_var_lib_symlinks(pegasus_t)
  
  hostname_exec(pegasus_t)
-@@ -116,12 +113,18 @@
+@@ -112,19 +112,17 @@
+ libs_use_shared_libs(pegasus_t)
+ 
+ logging_send_audit_msgs(pegasus_t)
++logging_send_syslog_msg(pegasus_t)
+ 
  miscfiles_read_localization(pegasus_t)
  
  sysnet_read_config(pegasus_t)
@@ -4760,27 +5657,48 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/pega
  userdom_dontaudit_search_sysadm_home_dirs(pegasus_t)
  
  optional_policy(`
-+	unconfined_signull(pegasus_t)
-+')
-+
-+optional_policy(`
- 	logging_send_syslog_msg(pegasus_t)
-+	logging_send_audit_msg(pegasus_t)
- ')
- 
- optional_policy(`
-@@ -136,7 +139,3 @@
- optional_policy(`
- 	udev_read_db(pegasus_t)
- ')
+-	logging_send_syslog_msg(pegasus_t)
+-')
 -
 -optional_policy(`
--	unconfined_signull(pegasus_t)
--')
+ 	rpm_exec(pegasus_t)
+ ')
+ 
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/portslave.te serefpolicy-3.0.1/policy/modules/services/portslave.te
+--- nsaserefpolicy/policy/modules/services/portslave.te	2007-05-29 14:10:57.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/portslave.te	2007-06-19 17:06:27.000000000 -0400
+@@ -84,6 +84,7 @@
+ 
+ auth_rw_login_records(portslave_t)
+ auth_domtrans_chk_passwd(portslave_t)
++auth_domtrans_upd_passwd(portslave_t)
+ 
+ init_rw_utmp(portslave_t)
+ 
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/postfix.fc serefpolicy-3.0.1/policy/modules/services/postfix.fc
+--- nsaserefpolicy/policy/modules/services/postfix.fc	2007-05-29 14:10:57.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/postfix.fc	2007-06-19 17:06:27.000000000 -0400
+@@ -14,6 +14,7 @@
+ /usr/libexec/postfix/smtpd --	gen_context(system_u:object_r:postfix_smtpd_exec_t,s0)
+ /usr/libexec/postfix/bounce --	gen_context(system_u:object_r:postfix_bounce_exec_t,s0)
+ /usr/libexec/postfix/pipe --	gen_context(system_u:object_r:postfix_pipe_exec_t,s0)
++/usr/libexec/postfix/virtual --	gen_context(system_u:object_r:postfix_virtual_exec_t,s0)
+ ', `
+ /usr/lib/postfix/.*	--	gen_context(system_u:object_r:postfix_exec_t,s0)
+ /usr/lib/postfix/cleanup --	gen_context(system_u:object_r:postfix_cleanup_exec_t,s0)
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/postfix.if serefpolicy-3.0.1/policy/modules/services/postfix.if
 --- nsaserefpolicy/policy/modules/services/postfix.if	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/postfix.if	2007-05-30 15:12:50.000000000 -0400
-@@ -131,10 +131,8 @@
++++ serefpolicy-3.0.1/policy/modules/services/postfix.if	2007-06-19 17:06:27.000000000 -0400
+@@ -118,6 +118,8 @@
+ 	allow postfix_$1_t self:udp_socket create_socket_perms;
+ 
+ 	domtrans_pattern(postfix_master_t, postfix_$1_exec_t, postfix_$1_t)
++	#https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=244456
++	allow postfix_$1_t postfix_master_t:file read;
+ 
+ 	corenet_non_ipsec_sendrecv(postfix_$1_t)
+ 	corenet_tcp_sendrecv_all_if(postfix_$1_t)
+@@ -131,10 +133,8 @@
  	corenet_tcp_connect_all_ports(postfix_$1_t)
  	corenet_sendrecv_all_client_packets(postfix_$1_t)
  
@@ -4792,89 +5710,139 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/post
  	')
  ')
  
-@@ -449,3 +447,22 @@
+@@ -268,6 +268,42 @@
  
- 	typeattribute $1 postfix_user_domtrans;
- ')
+ ########################################
+ ## <summary>
++##	Allow domain to read postfix local process state
++## </summary>
++## <param name="domain">
++##	<summary>
++##	Domain to not audit.
++##	</summary>
++## </param>
++#
++interface(`postfix_read_local_state',`
++	gen_require(`
++		type postfix_local_t;
++	')
++
++	read_files_pattern($1,postfix_local_t,postfix_local_t)
++')
 +
 +########################################
 +## <summary>
-+##	Create a named socket in a postfix private directory.
++##	Allow domain to read postfix master process state
 +## </summary>
 +## <param name="domain">
 +##	<summary>
-+##	Domain allowed access.
++##	Domain to not audit.
 +##	</summary>
 +## </param>
 +#
-+interface(`postfix_create_pivate_sockets',`
++interface(`postfix_read_master_state',`
 +	gen_require(`
-+		type postfix_private_t;
++		type postfix_master_t;
 +	')
 +
-+	allow $1 postfix_private_t:dir list_dir_perms;
-+	create_sock_files_pattern($1,postfix_private_t,postfix_private_t)
-+')
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/postfix.te serefpolicy-3.0.1/policy/modules/services/postfix.te
---- nsaserefpolicy/policy/modules/services/postfix.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/postfix.te	2007-05-30 15:12:50.000000000 -0400
-@@ -169,6 +169,12 @@
- mta_rw_aliases(postfix_master_t)
- mta_read_sendmail_bin(postfix_master_t)
- 
-+term_dontaudit_search_ptys(postfix_master_t)
-+
-+optional_policy(`
-+	auth_use_nsswitch(postfix_master_t)
++	read_files_pattern($1,postfix_master_t,postfix_master_t)
 +')
 +
- optional_policy(`
- 	cyrus_stream_connect(postfix_master_t)
- ')
-@@ -179,6 +185,10 @@
- ')
++########################################
++## <summary>
+ ##	Do not audit attempts to use
+ ##	postfix master process file
+ ##	file descriptors.
+@@ -433,6 +469,25 @@
  
- optional_policy(`
-+	mysql_stream_connect(postfix_master_t)
-+')
-+
-+optional_policy(`
- 	nis_use_ypbind(postfix_master_t)
- ')
- 
-@@ -205,6 +215,7 @@
- 
- allow postfix_bounce_t self:capability dac_read_search;
- allow postfix_bounce_t self:tcp_socket create_socket_perms;
-+allow postfix_bounce_t postfix_master_t:file read;
- 
- allow postfix_bounce_t postfix_public_t:sock_file write;
- allow postfix_bounce_t postfix_public_t:dir search;
-@@ -223,6 +234,7 @@
- #
- 
- allow postfix_cleanup_t self:process setrlimit;
-+allow postfix_cleanup_t postfix_master_t:file read;
- 
- # connect to master process
- stream_connect_pattern(postfix_cleanup_t,postfix_private_t,postfix_private_t,postfix_master_t)
-@@ -245,6 +257,7 @@
+ ########################################
+ ## <summary>
++##	Read postfix mail spool files.
++## </summary>
++## <param name="domain">
++##	<summary>
++##	Domain allowed access.
++##	</summary>
++## </param>
++#
++interface(`postfix_read_spool_files',`
++	gen_require(`
++		type postfix_spool_t;
++	')
++
++	files_search_spool($1)
++	read_files_pattern($1,postfix_spool_t, postfix_spool_t)
++')
++
++########################################
++## <summary>
+ ##	Execute postfix user mail programs
+ ##	in their respective domains.
+ ## </summary>
+@@ -449,3 +504,22 @@
  
- allow postfix_local_t self:fifo_file rw_fifo_file_perms;
- allow postfix_local_t self:process { setsched setrlimit };
-+allow postfix_local_t postfix_master_t:file read;
+ 	typeattribute $1 postfix_user_domtrans;
+ ')
++
++########################################
++## <summary>
++##	Create a named socket in a postfix private directory.
++## </summary>
++## <param name="domain">
++##	<summary>
++##	Domain allowed access.
++##	</summary>
++## </param>
++#
++interface(`postfix_create_pivate_sockets',`
++	gen_require(`
++		type postfix_private_t;
++	')
++
++	allow $1 postfix_private_t:dir list_dir_perms;
++	create_sock_files_pattern($1,postfix_private_t,postfix_private_t)
++')
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/postfix.te serefpolicy-3.0.1/policy/modules/services/postfix.te
+--- nsaserefpolicy/policy/modules/services/postfix.te	2007-05-29 14:10:57.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/postfix.te	2007-06-22 09:40:18.000000000 -0400
+@@ -84,6 +84,12 @@
+ type postfix_var_run_t;
+ files_pid_file(postfix_var_run_t)
  
- manage_dirs_pattern(postfix_local_t,postfix_local_tmp_t,postfix_local_tmp_t)
- manage_files_pattern(postfix_local_t,postfix_local_tmp_t,postfix_local_tmp_t)
-@@ -359,6 +372,7 @@
++postfix_server_domain_template(virtual)
++mta_mailserver_delivery(postfix_virtual_t)
++
++type postfix_virtual_tmp_t;
++files_tmp_file(postfix_virtual_tmp_t)
++
+ ########################################
  #
+ # Postfix master process local policy
+@@ -169,6 +175,12 @@
+ mta_rw_aliases(postfix_master_t)
+ mta_read_sendmail_bin(postfix_master_t)
  
- allow postfix_pickup_t self:tcp_socket create_socket_perms;
-+allow postfix_pickup_t postfix_master_t:file read;
++term_dontaudit_search_ptys(postfix_master_t)
++
++optional_policy(`
++	auth_use_nsswitch(postfix_master_t)
++')
++
+ optional_policy(`
+ 	cyrus_stream_connect(postfix_master_t)
+ ')
+@@ -179,6 +191,10 @@
+ ')
  
- stream_connect_pattern(postfix_pickup_t,postfix_private_t,postfix_private_t,postfix_master_t)
+ optional_policy(`
++	mysql_stream_connect(postfix_master_t)
++')
++
++optional_policy(`
+ 	nis_use_ypbind(postfix_master_t)
+ ')
  
-@@ -376,7 +390,7 @@
+@@ -376,7 +392,7 @@
  # Postfix pipe local policy
  #
  
@@ -4883,7 +5851,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/post
  
  write_sock_files_pattern(postfix_pipe_t,postfix_private_t,postfix_private_t)
  
-@@ -385,6 +399,10 @@
+@@ -385,6 +401,10 @@
  rw_files_pattern(postfix_pipe_t,postfix_spool_t,postfix_spool_t)
  
  optional_policy(`
@@ -4894,7 +5862,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/post
  	procmail_domtrans(postfix_pipe_t)
  ')
  
-@@ -425,6 +443,11 @@
+@@ -425,6 +445,11 @@
  	cron_system_entry(postfix_postdrop_t, postfix_postdrop_exec_t)
  ')
  
@@ -4906,15 +5874,6 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/post
  optional_policy(`
  	ppp_use_fds(postfix_postqueue_t)
  	ppp_sigchld(postfix_postqueue_t)
-@@ -460,6 +483,8 @@
- # Postfix qmgr local policy
- #
- 
-+allow postfix_qmgr_t postfix_master_t:file read;
-+
- stream_connect_pattern(postfix_qmgr_t,{ postfix_private_t postfix_public_t },{ postfix_private_t postfix_public_t },postfix_master_t)
- 
- rw_fifo_files_pattern(postfix_qmgr_t,postfix_public_t,postfix_public_t)
 @@ -504,8 +529,6 @@
  # Postfix smtp delivery local policy
  #
@@ -4924,7 +5883,16 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/post
  # connect to master process
  stream_connect_pattern(postfix_smtp_t,{ postfix_private_t postfix_public_t },{ postfix_private_t postfix_public_t },postfix_master_t)
  
-@@ -537,9 +560,18 @@
+@@ -513,6 +536,8 @@
+ 
+ allow postfix_smtp_t postfix_spool_t:file rw_file_perms;
+ 
++files_dontaudit_getattr_home_dir(postfix_smtp_t)
++
+ optional_policy(`
+ 	cyrus_stream_connect(postfix_smtp_t)
+ ')
+@@ -537,9 +562,45 @@
  mta_read_aliases(postfix_smtpd_t)
  
  optional_policy(`
@@ -4943,21 +5911,36 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/post
 +	dovecot_auth_stream_connect(postfix_smtpd_t)
 +')
 +
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/ppp.te serefpolicy-3.0.1/policy/modules/services/ppp.te
---- nsaserefpolicy/policy/modules/services/ppp.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/ppp.te	2007-05-30 15:12:50.000000000 -0400
-@@ -153,7 +153,7 @@
- 
- files_exec_etc_files(pppd_t)
- files_manage_etc_runtime_files(pppd_t)
--files_etc_filetrans_etc_runtime(pppd_t, { dir file })
-+sysnet_etc_filetrans_config(pppd_t)
- files_dontaudit_write_etc_files(pppd_t)
- 
- # for scripts
++########################################
++#
++# Postfix virtual local policy
++#
++
++allow postfix_virtual_t self:fifo_file rw_fifo_file_perms;
++allow postfix_virtual_t self:process { setsched setrlimit };
++
++manage_dirs_pattern(postfix_virtual_t,postfix_virtual_tmp_t,postfix_virtual_tmp_t)
++manage_files_pattern(postfix_virtual_t,postfix_virtual_tmp_t,postfix_virtual_tmp_t)
++files_tmp_filetrans(postfix_virtual_t, postfix_virtual_tmp_t, { file dir })
++
++# connect to master process
++stream_connect_pattern(postfix_virtual_t,postfix_public_t,postfix_public_t,postfix_master_t)
++
++allow postfix_virtual_t postfix_spool_t:file rw_file_perms;
++
++corecmd_exec_shell(postfix_virtual_t)
++corecmd_exec_bin(postfix_virtual_t)
++
++files_read_etc_files(postfix_virtual_t)
++
++mta_read_aliases(postfix_virtual_t)
++mta_delete_spool(postfix_virtual_t)
++# For reading spamassasin
++mta_read_config(postfix_virtual_t)
++mta_manage_spool(postfix_virtual_t)
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/procmail.te serefpolicy-3.0.1/policy/modules/services/procmail.te
 --- nsaserefpolicy/policy/modules/services/procmail.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/procmail.te	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/procmail.te	2007-06-19 17:06:27.000000000 -0400
 @@ -10,6 +10,7 @@
  type procmail_exec_t;
  domain_type(procmail_t)
@@ -4966,7 +5949,16 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/proc
  role system_r types procmail_t;
  
  type procmail_tmp_t;
-@@ -101,6 +102,10 @@
+@@ -31,6 +32,8 @@
+ allow procmail_t procmail_tmp_t:file manage_file_perms;
+ files_tmp_filetrans(procmail_t, procmail_tmp_t, file)
+ 
++can_exec(procmail_t,procmail_exec_t)
++
+ kernel_read_system_state(procmail_t)
+ kernel_read_kernel_sysctls(procmail_t)
+ 
+@@ -101,9 +104,16 @@
  ')
  
  optional_policy(`
@@ -4977,7 +5969,13 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/proc
  	# for a bug in the postfix local program
  	postfix_dontaudit_rw_local_tcp_sockets(procmail_t)
  	postfix_dontaudit_use_fds(procmail_t)
-@@ -119,8 +124,11 @@
++	postfix_read_spool_files(procmail_t)
++	postfix_read_local_state(procmail_t)
++	postfix_read_master_state(procmail_t)
+ ')
+ 
+ optional_policy(`
+@@ -119,8 +129,13 @@
  
  optional_policy(`
  	corenet_udp_bind_generic_port(procmail_t)
@@ -4988,10 +5986,12 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/proc
  	spamassassin_read_lib_files(procmail_t)
  ')
 +
-+
++optional_policy(`
++	mailscanner_read_spool(procmail_t)
++')
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/pyzor.te serefpolicy-3.0.1/policy/modules/services/pyzor.te
---- nsaserefpolicy/policy/modules/services/pyzor.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/pyzor.te	2007-05-30 15:12:50.000000000 -0400
+--- nsaserefpolicy/policy/modules/services/pyzor.te	2007-06-11 16:05:30.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/pyzor.te	2007-06-19 17:06:27.000000000 -0400
 @@ -54,6 +54,11 @@
  corenet_udp_sendrecv_all_nodes(pyzor_t)
  corenet_udp_sendrecv_all_ports(pyzor_t)
@@ -5004,15 +6004,18 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/pyzo
  dev_read_urand(pyzor_t)
  
  files_read_etc_files(pyzor_t)
-@@ -68,6 +73,7 @@
+@@ -67,12 +72,18 @@
+ 
  userdom_dontaudit_search_sysadm_home_dirs(pyzor_t)
  
- ifdef(`targeted_policy',`
++ifdef(`targeted_policy',`
 +	userdom_dontaudit_write_sysadm_home_dirs(pyzor_t)
- 	userdom_read_generic_user_home_content_files(pyzor_t)
- ')
- 
-@@ -77,6 +83,7 @@
++	userdom_read_generic_user_home_content_files(pyzor_t)
++')
++
+ optional_policy(`
+ 	amavis_manage_lib_files(pyzor_t)
+ 	amavis_manage_spool_files(pyzor_t)
  ')
  
  optional_policy(`
@@ -5020,10 +6023,29 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/pyzo
  	spamassassin_read_spamd_tmp_files(pyzor_t)
  ')
  
+@@ -128,6 +139,10 @@
+ 
+ mta_manage_spool(pyzord_t)
+ 
++ifdef(`targeted_policy',`
++	userdom_read_generic_user_home_content_files(pyzord_t)
++')
++
+ optional_policy(`
+ 	logging_send_syslog_msg(pyzord_t)
+ ')
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/radius.te serefpolicy-3.0.1/policy/modules/services/radius.te
 --- nsaserefpolicy/policy/modules/services/radius.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/radius.te	2007-05-30 15:12:50.000000000 -0400
-@@ -124,3 +124,7 @@
++++ serefpolicy-3.0.1/policy/modules/services/radius.te	2007-06-19 17:06:27.000000000 -0400
+@@ -81,6 +81,7 @@
+ 
+ auth_read_shadow(radiusd_t)
+ auth_domtrans_chk_passwd(radiusd_t)
++auth_domtrans_upd_passwd(radiusd_t)
+ 
+ corecmd_exec_bin(radiusd_t)
+ corecmd_exec_shell(radiusd_t)
+@@ -124,3 +125,7 @@
  optional_policy(`
  	udev_read_db(radiusd_t)
  ')
@@ -5031,21 +6053,42 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/radi
 +optional_policy(`
 +	samba_read_var_files(radiusd_t)
 +')
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/remotelogin.te serefpolicy-3.0.1/policy/modules/services/remotelogin.te
---- nsaserefpolicy/policy/modules/services/remotelogin.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/remotelogin.te	2007-05-30 17:31:03.000000000 -0400
-@@ -95,7 +95,7 @@
- # Search for mail spool file.
- mta_getattr_spool(remote_login_t)
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/rhgb.te serefpolicy-3.0.1/policy/modules/services/rhgb.te
+--- nsaserefpolicy/policy/modules/services/rhgb.te	2007-06-11 16:05:30.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/rhgb.te	2007-06-19 17:06:27.000000000 -0400
+@@ -108,6 +108,7 @@
  
--ifdef(`targeted_policy',`
+ userdom_dontaudit_use_unpriv_user_fds(rhgb_t)
+ userdom_dontaudit_search_sysadm_home_dirs(rhgb_t)
++userdom_dontaudit_search_all_users_home_content(rhgb_t)
+ 
+ xserver_read_xdm_xserver_tmp_files(rhgb_t)
+ xserver_kill_xdm_xserver(rhgb_t)
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/ricci.te serefpolicy-3.0.1/policy/modules/services/ricci.te
+--- nsaserefpolicy/policy/modules/services/ricci.te	2007-05-29 14:10:57.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/ricci.te	2007-06-19 17:06:27.000000000 -0400
+@@ -137,6 +137,7 @@
+ files_create_boot_flag(ricci_t)
+ 
+ auth_domtrans_chk_passwd(ricci_t)
++auth_domtrans_upd_passwd(ricci_t)
+ auth_append_login_records(ricci_t)
+ 
+ init_dontaudit_stream_connect_script(ricci_t)
+@@ -320,6 +321,10 @@
+ ')
+ 
+ optional_policy(`
++	rpm_dontaudit_use_script_fds(ricci_modclusterd_t)
++')
++
 +optional_policy(`
- 	unconfined_shell_domtrans(remote_login_t)
+ 	unconfined_use_fds(ricci_modclusterd_t)
  ')
  
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/rlogin.te serefpolicy-3.0.1/policy/modules/services/rlogin.te
 --- nsaserefpolicy/policy/modules/services/rlogin.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/rlogin.te	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/rlogin.te	2007-06-19 17:06:27.000000000 -0400
 @@ -64,6 +64,7 @@
  fs_search_auto_mountpoints(rlogind_t)
  
@@ -5056,7 +6099,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/rlog
  
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/rpcbind.fc serefpolicy-3.0.1/policy/modules/services/rpcbind.fc
 --- nsaserefpolicy/policy/modules/services/rpcbind.fc	1969-12-31 19:00:00.000000000 -0500
-+++ serefpolicy-3.0.1/policy/modules/services/rpcbind.fc	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/rpcbind.fc	2007-06-19 17:06:27.000000000 -0400
 @@ -0,0 +1,6 @@
 +
 +/sbin/rpcbind		--	gen_context(system_u:object_r:rpcbind_exec_t,s0)
@@ -5066,7 +6109,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/rpcb
 +/var/lib/rpcbind(/.*)?			gen_context(system_u:object_r:rpcbind_var_lib_t,s0)
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/rpcbind.if serefpolicy-3.0.1/policy/modules/services/rpcbind.if
 --- nsaserefpolicy/policy/modules/services/rpcbind.if	1969-12-31 19:00:00.000000000 -0500
-+++ serefpolicy-3.0.1/policy/modules/services/rpcbind.if	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/rpcbind.if	2007-06-19 17:06:27.000000000 -0400
 @@ -0,0 +1,104 @@
 +
 +## <summary>policy for rpcbind</summary>
@@ -5174,7 +6217,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/rpcb
 +')
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/rpcbind.te serefpolicy-3.0.1/policy/modules/services/rpcbind.te
 --- nsaserefpolicy/policy/modules/services/rpcbind.te	1969-12-31 19:00:00.000000000 -0500
-+++ serefpolicy-3.0.1/policy/modules/services/rpcbind.te	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/rpcbind.te	2007-06-19 17:06:27.000000000 -0400
 @@ -0,0 +1,79 @@
 +policy_module(rpcbind,1.0.0)
 +
@@ -5206,7 +6249,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/rpcb
 +init_use_script_ptys(rpcbind_t)
 +domain_use_interactive_fds(rpcbind_t)
 +
-+allow rpcbind_t self:capability setuid;
++allow rpcbind_t self:capability { sys_tty_config setuid };
 +allow rpcbind_t self:netlink_route_socket r_netlink_socket_perms;
 +allow rpcbind_t self:udp_socket listen;
 +allow rpcbind_t self:tcp_socket create_stream_socket_perms;
@@ -5257,7 +6300,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/rpcb
 +
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/rpc.if serefpolicy-3.0.1/policy/modules/services/rpc.if
 --- nsaserefpolicy/policy/modules/services/rpc.if	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/rpc.if	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/rpc.if	2007-06-19 17:06:27.000000000 -0400
 @@ -89,8 +89,11 @@
  	# bind to arbitary unused ports
  	corenet_tcp_bind_generic_port($1_t)
@@ -5272,8 +6315,8 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/rpc.
  	fs_rw_rpc_named_pipes($1_t) 
  	fs_search_auto_mountpoints($1_t)
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/rpc.te serefpolicy-3.0.1/policy/modules/services/rpc.te
---- nsaserefpolicy/policy/modules/services/rpc.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/rpc.te	2007-05-30 15:12:50.000000000 -0400
+--- nsaserefpolicy/policy/modules/services/rpc.te	2007-06-11 16:05:30.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/rpc.te	2007-06-20 06:34:45.000000000 -0400
 @@ -79,6 +79,7 @@
  
  optional_policy(`
@@ -5282,7 +6325,17 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/rpc.
  ')
  
  ########################################
-@@ -123,6 +124,7 @@
+@@ -91,6 +92,9 @@
+ allow nfsd_t exports_t:file { getattr read };
+ allow nfsd_t { nfsd_rw_t nfsd_ro_t }:dir list_dir_perms;
+ 
++dev_dontaudit_getattr_all_blk_files(nfsd_t) 
++dev_dontaudit_getattr_all_chr_files(nfsd_t) 
++
+ # for /proc/fs/nfs/exports - should we have a new type?
+ kernel_read_system_state(nfsd_t) 
+ kernel_read_network_state(nfsd_t) 
+@@ -123,6 +127,7 @@
  tunable_policy(`nfs_export_all_rw',`
  	fs_read_noxattr_fs_files(nfsd_t) 
  	auth_manage_all_files_except_shadow(nfsd_t)
@@ -5290,41 +6343,39 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/rpc.
  ')
  
  tunable_policy(`nfs_export_all_ro',`
-@@ -159,8 +161,6 @@
+@@ -158,6 +163,11 @@
+ 
  miscfiles_read_certs(gssd_t)
  
- ifdef(`targeted_policy',`
--	files_read_generic_tmp_files(gssd_t) 
--	files_read_generic_tmp_symlinks(gssd_t) 
- 	# Manage the users kerberos tgt file
- 	files_manage_generic_tmp_files(gssd_t) 
- ')
++ifdef(`targeted_policy',`
++	# Manage the users kerberos tgt file
++	files_manage_generic_tmp_files(gssd_t) 
++')
++
+ tunable_policy(`allow_gssd_read_tmp',`
+ 	userdom_list_unpriv_users_tmp(gssd_t) 
+ 	userdom_read_unpriv_users_tmp_files(gssd_t) 
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/rshd.te serefpolicy-3.0.1/policy/modules/services/rshd.te
---- nsaserefpolicy/policy/modules/services/rshd.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/rshd.te	2007-05-30 17:32:57.000000000 -0400
-@@ -65,10 +65,6 @@
+--- nsaserefpolicy/policy/modules/services/rshd.te	2007-06-11 16:05:30.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/rshd.te	2007-06-19 17:06:27.000000000 -0400
+@@ -44,6 +44,7 @@
+ selinux_compute_user_contexts(rshd_t)
  
- userdom_search_all_users_home_content(rshd_t)
+ auth_domtrans_chk_passwd(rshd_t)
++auth_domtrans_upd_passwd(rshd_t)
  
--ifdef(`targeted_policy',`
--	unconfined_shell_domtrans(rshd_t)
--')
--
- tunable_policy(`use_nfs_home_dirs',`
- 	fs_read_nfs_files(rshd_t)
- 	fs_read_nfs_symlinks(rshd_t)
-@@ -88,7 +84,7 @@
+ corecmd_read_bin_symlinks(rshd_t)
+ 
+@@ -84,6 +85,5 @@
  ')
  
  optional_policy(`
 -	unconfined_domain(rshd_t)
-+	unconfined_shell_domtrans(rshd_t)
+ 	unconfined_shell_domtrans(rshd_t)
  ')
- 
- ifdef(`TODO',`
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/rsync.te serefpolicy-3.0.1/policy/modules/services/rsync.te
 --- nsaserefpolicy/policy/modules/services/rsync.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/rsync.te	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/rsync.te	2007-06-19 17:06:27.000000000 -0400
 @@ -17,6 +17,7 @@
  type rsync_t;
  type rsync_exec_t;
@@ -5333,39 +6384,30 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/rsyn
  role system_r types rsync_t;
  
  type rsync_data_t;
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/rwho.fc serefpolicy-3.0.1/policy/modules/services/rwho.fc
+--- nsaserefpolicy/policy/modules/services/rwho.fc	2007-05-29 14:10:57.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/rwho.fc	2007-06-19 17:06:27.000000000 -0400
+@@ -1,3 +1,4 @@
+ /usr/sbin/rwhod		--	gen_context(system_u:object_r:rwho_exec_t,s0)
+ 
+ /var/spool/rwho(/.*)?		gen_context(system_u:object_r:rwho_spool_t,s0)
++/var/log/rwhod(/.*)?		gen_context(system_u:object_r:rwho_log_t,s0)
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/rwho.if serefpolicy-3.0.1/policy/modules/services/rwho.if
---- nsaserefpolicy/policy/modules/services/rwho.if	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/rwho.if	2007-05-30 15:12:50.000000000 -0400
-@@ -1 +1,84 @@
--## <summary>Who is logged in on other machines?</summary>
-+
-+## <summary>policy for rwho</summary>
-+
-+########################################
-+## <summary>
-+##	Execute a domain transition to run rwho.
-+## </summary>
-+## <param name="domain">
-+## <summary>
-+##	Domain allowed to transition.
-+## </summary>
-+## </param>
-+#
-+interface(`rwho_domtrans',`
-+	gen_require(`
-+		type rwho_t, rwho_exec_t;
-+	')
-+
-+	domain_auto_trans($1,rwho_exec_t,rwho_t)
-+
-+	allow rwho_t $1:fd use;
-+	allow rwho_t $1:fifo_file rw_file_perms;
-+	allow rwho_t $1:process sigchld;
-+')
+--- nsaserefpolicy/policy/modules/services/rwho.if	2007-06-15 14:54:33.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/rwho.if	2007-06-19 17:06:27.000000000 -0400
+@@ -72,6 +72,47 @@
+ 		type rwho_spool_t;
+ 	')
+ 
+-	manage_files_pattern($1,rwho_spool_t,rwho_spool_t)
++	allow $1 rwho_spool_t:file manage_file_perms;
++	allow $1 rwho_spool_t:dir rw_dir_perms;
+ 	files_search_spool($1)
+ ')
 +
 +########################################
 +## <summary>
-+##	Search rwho spool directories.
++##	Search rwho log directories.
 +## </summary>
 +## <param name="domain">
 +##	<summary>
@@ -5373,18 +6415,18 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/rwho
 +##	</summary>
 +## </param>
 +#
-+interface(`rwho_search_spool',`
++interface(`rwho_search_log',`
 +	gen_require(`
-+		type rwho_spool_t;
++		type rwho_log_t;
 +	')
 +
-+	allow $1 rwho_spool_t:dir search_dir_perms;
-+	files_search_spool($1)
++	allow $1 rwho_log_t:dir search_dir_perms;
++	logging_search_logs($1)
 +')
 +
 +########################################
 +## <summary>
-+##	Read rwho spool files.
++##	Read rwho log files.
 +## </summary>
 +## <param name="domain">
 +##	<summary>
@@ -5392,130 +6434,105 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/rwho
 +##	</summary>
 +## </param>
 +#
-+interface(`rwho_read_spool_files',`
++interface(`rwho_read_log_files',`
 +	gen_require(`
-+		type rwho_spool_t;
++		type rwho_log_t;
 +	')
 +
-+	allow $1 rwho_spool_t:file r_file_perms;
-+	allow $1 rwho_spool_t:dir list_dir_perms;
-+	files_search_spool($1)
++	allow $1 rwho_log_t:file r_file_perms;
++	allow $1 rwho_log_t:dir list_dir_perms;
++	logging_search_logs($1)
 +')
 +
-+########################################
-+## <summary>
-+##	Create, read, write, and delete
-+##	rwho spool files.
-+## </summary>
-+## <param name="domain">
-+##	<summary>
-+##	Domain allowed access.
-+##	</summary>
-+## </param>
-+#
-+interface(`rwho_manage_spool_files',`
-+	gen_require(`
-+		type rwho_spool_t;
-+	')
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/rwho.te serefpolicy-3.0.1/policy/modules/services/rwho.te
+--- nsaserefpolicy/policy/modules/services/rwho.te	2007-06-15 14:54:33.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/rwho.te	2007-06-19 17:06:27.000000000 -0400
+@@ -10,10 +10,12 @@
+ type rwho_exec_t;
+ init_daemon_domain(rwho_t, rwho_exec_t)
+ 
+-# var/spool files
+ type rwho_spool_t;
+ files_type(rwho_spool_t)
+ 
++type rwho_log_t;
++files_type(rwho_log_t)
 +
-+	allow $1 rwho_spool_t:file manage_file_perms;
-+	allow $1 rwho_spool_t:dir rw_dir_perms;
-+	files_search_spool($1)
-+')
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/samba.fc serefpolicy-3.0.1/policy/modules/services/samba.fc
---- nsaserefpolicy/policy/modules/services/samba.fc	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/samba.fc	2007-05-30 15:12:50.000000000 -0400
-@@ -3,6 +3,7 @@
- # /etc
+ ########################################
  #
- /etc/samba/MACHINE\.SID		--	gen_context(system_u:object_r:samba_secrets_t,s0)
-+/etc/samba/passdb.tdb		--	gen_context(system_u:object_r:samba_secrets_t,s0)
- /etc/samba/secrets\.tdb		--	gen_context(system_u:object_r:samba_secrets_t,s0)
- /etc/samba/smbpasswd		--	gen_context(system_u:object_r:samba_secrets_t,s0)
- /etc/samba(/.*)?			gen_context(system_u:object_r:samba_etc_t,s0)
-@@ -27,6 +28,9 @@
- /var/cache/samba/winbindd_privileged(/.*)? gen_context(system_u:object_r:winbind_var_run_t,s0)
+ # rwho local policy
+@@ -30,6 +32,10 @@
+ allow rwho_t rwho_spool_t:file manage_file_perms;
+ files_spool_filetrans(rwho_t,rwho_spool_t, { file dir })
  
- /var/lib/samba(/.*)?			gen_context(system_u:object_r:samba_var_t,s0)
-+/var/lib/samba/winbindd_privileged(/.*)? gen_context(system_u:object_r:winbind_var_run_t,s0)
++allow rwho_t rwho_log_t:dir manage_dir_perms;
++allow rwho_t rwho_log_t:file manage_file_perms;
++logging_log_filetrans(rwho_t,rwho_log_t, { file dir })
 +
-+/var/lib/samba/scripts(/.*)?		gen_context(system_u:object_r:samba_unconfined_script_exec_t,s0)
+ kernel_read_system_state(rwho_t)
+ 
+ corenet_non_ipsec_sendrecv(rwho_t)
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/samba.fc serefpolicy-3.0.1/policy/modules/services/samba.fc
+--- nsaserefpolicy/policy/modules/services/samba.fc	2007-06-19 16:23:34.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/samba.fc	2007-06-19 17:06:27.000000000 -0400
+@@ -30,6 +30,8 @@
+ /var/lib/samba(/.*)?			gen_context(system_u:object_r:samba_var_t,s0)
+ /var/lib/samba/winbindd_privileged(/.*)? gen_context(system_u:object_r:winbind_var_run_t,s0)
  
++/var/lib/samba/scripts(/.*)?		gen_context(system_u:object_r:samba_unconfined_script_exec_t,s0)
++
  /var/log/samba(/.*)?			gen_context(system_u:object_r:samba_log_t,s0)
  
+ /var/run/samba/brlock\.tdb	--	gen_context(system_u:object_r:smbd_var_run_t,s0)
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/samba.if serefpolicy-3.0.1/policy/modules/services/samba.if
---- nsaserefpolicy/policy/modules/services/samba.if	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/samba.if	2007-05-30 15:12:50.000000000 -0400
-@@ -210,6 +210,27 @@
+--- nsaserefpolicy/policy/modules/services/samba.if	2007-06-19 16:23:35.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/samba.if	2007-06-19 17:06:27.000000000 -0400
+@@ -349,6 +349,7 @@
+ 	files_search_var($1)
+ 	files_search_var_lib($1)
+ 	manage_files_pattern($1,samba_var_t,samba_var_t)
++	manage_lnk_files_pattern($1,samba_var_t,samba_var_t)
+ ')
  
  ########################################
- ## <summary>
-+##	Allow the specified domain to append to  samba's log files.
-+## </summary>
-+## <param name="domain">
-+##	<summary>
-+##	Domain allowed access.
-+##	</summary>
-+## </param>
-+## <rolecap/>
-+#
-+interface(`samba_append_log',`
-+	gen_require(`
-+		type samba_log_t;
-+	')
-+
-+	logging_search_logs($1)
-+	allow $1 samba_log_t:dir list_dir_perms;
-+	allow $1 samba_log_t:file append_file_perms;
-+')
+@@ -493,3 +494,52 @@
+ 	allow $1 samba_var_t:dir search_dir_perms;
+ 	stream_connect_pattern($1,winbind_var_run_t,winbind_var_run_t,winbind_t)
+ ')
 +
 +########################################
 +## <summary>
- ##	Execute samba log in the caller domain.
- ## </summary>
- ## <param name="domain">
-@@ -263,6 +284,7 @@
- 	')
- 
- 	files_search_var($1)
-+	files_search_var_lib($1)
- 	allow $1 samba_var_t:dir search_dir_perms;
- ')
- 
-@@ -283,11 +305,55 @@
- 	')
- 
- 	files_search_var($1)
-+	files_search_var_lib($1)
- 	rw_files_pattern($1,samba_var_t,samba_var_t)
- ')
- 
- ########################################
- ## <summary>
-+##	Allow the specified domain to
-+##	read and write samba /var files.
++##	Create a set of derived types for apache
++##	web content.
 +## </summary>
-+## <param name="domain">
++## <param name="prefix">
 +##	<summary>
-+##	Domain allowed access.
++##	The prefix to be used for deriving type names.
 +##	</summary>
 +## </param>
 +#
-+interface(`samba_manage_var_files',`
++template(`samba_helper_template',`
 +	gen_require(`
-+		type samba_var_t;
++		type smbd_t;
 +	')
++	#This type is for samba helper scripts
++	type samba_$1_script_t;
++	domain_type(samba_$1_script_t)
++	role system_r types samba_$1_script_t;
++
++	# This type is used for executable scripts files
++	type samba_$1_script_exec_t;
++	corecmd_shell_entry_type(samba_$1_script_t)
++	domain_entry_file(samba_$1_script_t,samba_$1_script_exec_t)
++
++	domtrans_pattern(smbd_t, samba_$1_script_exec_t, samba_$1_script_t)
++	allow smbd_t samba_$1_script_exec_t:file ioctl;
 +
-+	files_search_var($1)
-+	files_search_var_lib($1)
-+	manage_files_pattern($1,samba_var_t,samba_var_t)
-+	manage_lnk_files_pattern($1,samba_var_t,samba_var_t)
 +')
 +
 +########################################
 +## <summary>
-+##	Allow the specified domain to
-+##	read samba /var files.
++##	Allow the specified domain to read samba's shares
 +## </summary>
 +## <param name="domain">
 +##	<summary>
@@ -5523,122 +6540,18 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/samb
 +##	</summary>
 +## </param>
 +#
-+interface(`samba_read_var_files',`
++interface(`samba_read_share_files',`
 +	gen_require(`
-+		type samba_var_t;
++		type samba_share_t;
 +	')
 +
-+	files_search_var($1)
-+	files_search_var_lib($1)
-+	read_files_pattern($1,samba_var_t,samba_var_t)
++	read_files_pattern($1, samba_share_t, samba_share_t)
 +')
 +
-+########################################
-+## <summary>
- ##	Allow the specified domain to write to smbmount tcp sockets.
- ## </summary>
- ## <param name="domain">
-@@ -410,3 +476,52 @@
- 	allow $1 samba_var_t:dir search_dir_perms;
- 	stream_connect_pattern($1,winbind_var_run_t,winbind_var_run_t,winbind_t)
- ')
-+
-+########################################
-+## <summary>
-+##	Do not audit attempts to use file descriptors from samba.
-+## </summary>
-+## <param name="domain">
-+##	<summary>
-+##	Domain to not audit.
-+##	</summary>
-+## </param>
-+#
-+interface(`samba_dontaudit_use_fds',`
-+	gen_require(`
-+		type smbd_t;
-+	')
-+
-+	dontaudit $1 smbd_t:fd use; 
-+')
-+
-+
-+########################################
-+## <summary>
-+##	Create a set of derived types for apache
-+##	web content.
-+## </summary>
-+## <param name="prefix">
-+##	<summary>
-+##	The prefix to be used for deriving type names.
-+##	</summary>
-+## </param>
-+#
-+template(`samba_helper_template',`
-+	gen_require(`
-+		type smbd_t;
-+	')
-+	#This type is for samba helper scripts
-+	type samba_$1_script_t;
-+	domain_type(samba_$1_script_t)
-+	role system_r types samba_$1_script_t;
-+
-+	# This type is used for executable scripts files
-+	type samba_$1_script_exec_t;
-+	corecmd_shell_entry_type(samba_$1_script_t)
-+	domain_entry_file(samba_$1_script_t,samba_$1_script_exec_t)
-+
-+	domtrans_pattern(smbd_t, samba_$1_script_exec_t, samba_$1_script_t)
-+	allow smbd_t samba_$1_script_exec_t:file ioctl;
-+
-+')
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/samba.te serefpolicy-3.0.1/policy/modules/services/samba.te
---- nsaserefpolicy/policy/modules/services/samba.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/samba.te	2007-05-31 13:00:53.000000000 -0400
-@@ -28,6 +28,35 @@
- ## </desc>
- gen_tunable(samba_share_nfs,false)
- 
-+## <desc>
-+## <p>
-+## Allow samba to run as the domain controller; add machines to passwd file
-+## 
-+## </p>
-+## </desc>
-+gen_tunable(samba_domain_controller,false)
-+
-+## <desc>
-+## <p>
-+## Allow samba to be exported read/write.
-+## </p>
-+## </desc>
-+gen_tunable(samba_export_all_rw,false)
-+
-+## <desc>
-+## <p>
-+## Allow samba to be exported read only
-+## </p>
-+## </desc>
-+gen_tunable(samba_export_all_ro,false)
-+
-+## <desc>
-+## <p>
-+## Allow samba to run unconfined scripts
-+## </p>
-+## </desc>
-+gen_tunable(samba_run_unconfined,false)
-+
- type nmbd_t;
- type nmbd_exec_t;
- init_daemon_domain(nmbd_t,nmbd_exec_t)
-@@ -117,6 +146,7 @@
- allow samba_net_t self:unix_stream_socket create_stream_socket_perms;
- allow samba_net_t self:udp_socket create_socket_perms;
- allow samba_net_t self:tcp_socket create_socket_perms;
-+allow samba_net_t self:netlink_route_socket r_netlink_socket_perms;
- 
- allow samba_net_t samba_etc_t:file read_file_perms;
- 
-@@ -159,6 +189,8 @@
+--- nsaserefpolicy/policy/modules/services/samba.te	2007-06-19 16:23:35.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/samba.te	2007-06-19 17:06:27.000000000 -0400
+@@ -189,6 +189,8 @@
  
  miscfiles_read_localization(samba_net_t) 
  
@@ -5647,106 +6560,37 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/samb
  sysnet_read_config(samba_net_t)
  sysnet_use_ldap(samba_net_t)
  
-@@ -197,7 +229,6 @@
+@@ -225,8 +227,8 @@
+ 
+ allow smbd_t samba_etc_t:file { rw_file_perms setattr };
  
- create_dirs_pattern(smbd_t,samba_log_t,samba_log_t)
- create_files_pattern(smbd_t,samba_log_t,samba_log_t)
--append_files_pattern(smbd_t,samba_log_t,samba_log_t)
+-create_dirs_pattern(smbd_t,samba_log_t,samba_log_t)
+-create_files_pattern(smbd_t,samba_log_t,samba_log_t)
++manage_dirs_pattern(smbd_t,samba_log_t,samba_log_t)
++manage_files_pattern(smbd_t,samba_log_t,samba_log_t)
  allow smbd_t samba_log_t:dir setattr;
  dontaudit smbd_t samba_log_t:dir remove_name;
  
-@@ -251,6 +282,9 @@
- corenet_tcp_connect_ipp_port(smbd_t)
- corenet_tcp_connect_smbd_port(smbd_t)
- 
-+corecmd_exec_shell(smbd_t)
-+corecmd_exec_bin(smbd_t)
-+
- dev_read_sysfs(smbd_t)
- dev_read_urand(smbd_t)
- dev_getattr_mtrr_dev(smbd_t)
-@@ -260,11 +294,13 @@
- fs_get_xattr_fs_quotas(smbd_t)
- fs_search_auto_mountpoints(smbd_t)
- fs_getattr_rpc_dirs(smbd_t)
-+fs_list_inotifyfs(smbd_t)
+@@ -296,6 +298,7 @@
  
  auth_use_nsswitch(smbd_t)
  auth_domtrans_chk_passwd(smbd_t)
++auth_domtrans_upd_passwd(smbd_t)
  
  domain_use_interactive_fds(smbd_t)
-+domain_dontaudit_list_all_domains_state(smbd_t)
- 
- files_list_var_lib(smbd_t)
- files_read_etc_files(smbd_t)
-@@ -291,6 +327,12 @@
- userdom_dontaudit_use_unpriv_user_fds(smbd_t)
- userdom_use_unpriv_users_fds(smbd_t)
- 
-+tunable_policy(`samba_domain_controller',`
-+	usermanage_domtrans_passwd(smbd_t)
-+	usermanage_domtrans_useradd(smbd_t)
-+	usermanage_domtrans_groupadd(smbd_t)
-+')
-+
- ifdef(`hide_broken_symptoms', `
- 	files_dontaudit_getattr_default_dirs(smbd_t)
- 	files_dontaudit_getattr_boot_dirs(smbd_t)
-@@ -328,6 +370,23 @@
- 	udev_read_db(smbd_t)
+ domain_dontaudit_list_all_domains_state(smbd_t)
+@@ -348,6 +351,10 @@
  ')
  
-+tunable_policy(`samba_export_all_rw',`
-+	fs_read_noxattr_fs_files(smbd_t) 
-+	auth_manage_all_files_except_shadow(smbd_t)
-+	fs_read_noxattr_fs_files(nmbd_t) 
-+	auth_manage_all_files_except_shadow(nmbd_t)
-+	userdom_generic_user_home_dir_filetrans_generic_user_home_content(nmbd_t, { file dir })
-+
-+')
-+
-+tunable_policy(`samba_export_all_ro',`
-+	fs_read_noxattr_fs_files(smbd_t) 
-+	auth_read_all_files_except_shadow(smbd_t)
-+	fs_read_noxattr_fs_files(nmbd_t) 
-+	auth_read_all_files_except_shadow(nmbd_t)
+ optional_policy(`
++	lpd_exec_lpr(smbd_t)
 +')
 +
-+
- ########################################
- #
- # nmbd Local policy
-@@ -351,9 +410,12 @@
- files_pid_filetrans(nmbd_t,nmbd_var_run_t,file)
- 
- read_files_pattern(nmbd_t,samba_etc_t,samba_etc_t)
-+files_list_var_lib(nmbd_t)
- 
--create_dirs_pattern(nmbd_t,samba_log_t,samba_log_t)
-+manage_dirs_pattern(nmbd_t,samba_log_t,samba_log_t)
- append_files_pattern(nmbd_t,samba_log_t,samba_log_t)
-+allow nmbd_t samba_log_t:file unlink;
-+
- read_files_pattern(nmbd_t,samba_log_t,samba_log_t)
- create_files_pattern(nmbd_t,samba_log_t,samba_log_t)
- allow nmbd_t samba_log_t:dir setattr;
-@@ -380,6 +442,7 @@
- corenet_udp_bind_nmbd_port(nmbd_t)
- corenet_sendrecv_nmbd_server_packets(nmbd_t)
- corenet_sendrecv_nmbd_client_packets(nmbd_t)
-+corenet_tcp_connect_smbd_port(nmbd_t)
- 
- dev_read_sysfs(nmbd_t)
- dev_getattr_mtrr_dev(nmbd_t)
-@@ -440,6 +503,7 @@
- 
- allow smbmount_t samba_secrets_t:file manage_file_perms;
- 
-+files_list_var_lib(smbmount_t)
- allow smbmount_t samba_var_t:dir rw_dir_perms;
- manage_files_pattern(smbmount_t,samba_var_t,samba_var_t)
- manage_lnk_files_pattern(smbmount_t,samba_var_t,samba_var_t)
-@@ -470,6 +534,7 @@
++optional_policy(`
+ 	cups_read_rw_config(smbd_t)
+ 	cups_stream_connect(smbd_t)
+ ')
+@@ -529,6 +536,7 @@
  storage_raw_write_fixed_disk(smbmount_t)
  
  term_list_ptys(smbmount_t)
@@ -5754,7 +6598,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/samb
  
  corecmd_list_bin(smbmount_t)
  
-@@ -493,6 +558,11 @@
+@@ -552,6 +560,11 @@
  sysnet_read_config(smbmount_t)
  
  userdom_use_all_users_fds(smbmount_t)
@@ -5766,83 +6610,25 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/samb
  
  optional_policy(`
  	nis_use_ypbind(smbmount_t)
-@@ -511,7 +581,6 @@
- allow swat_t self:process signal_perms;
- allow swat_t self:fifo_file rw_file_perms;
- allow swat_t self:netlink_tcpdiag_socket r_netlink_socket_perms;
--allow swat_t self:netlink_audit_socket create;
- allow swat_t self:tcp_socket create_stream_socket_perms;
- allow swat_t self:udp_socket create_socket_perms;
- allow swat_t self:netlink_route_socket r_netlink_socket_perms;
-@@ -602,6 +671,8 @@
- # Winbind local policy
- #
- 
-+
-+allow winbind_t self:capability { dac_override ipc_lock setuid };
- dontaudit winbind_t self:capability sys_tty_config;
- allow winbind_t self:process signal_perms;
- allow winbind_t self:fifo_file { read write };
-@@ -611,10 +682,15 @@
- allow winbind_t self:tcp_socket create_stream_socket_perms;
- allow winbind_t self:udp_socket create_socket_perms;
- 
-+allow winbind_t nmbd_t:process { signal signull };
-+allow winbind_t nmbd_var_run_t:file read_file_perms;
-+
- allow winbind_t samba_etc_t:dir list_dir_perms;
- read_files_pattern(winbind_t,samba_etc_t,samba_etc_t)
- read_lnk_files_pattern(winbind_t,samba_etc_t,samba_etc_t)
+@@ -623,6 +636,7 @@
+ fs_getattr_xattr_fs(swat_t)
  
-+rw_files_pattern(winbind_t,smbd_tmp_t,smbd_tmp_t)
-+
- manage_files_pattern(winbind_t,samba_etc_t,samba_secrets_t)
- filetrans_pattern(winbind_t,samba_etc_t,samba_secrets_t,file)
- 
-@@ -622,6 +698,8 @@
- manage_files_pattern(winbind_t,samba_log_t,samba_log_t)
- manage_lnk_files_pattern(winbind_t,samba_log_t,samba_log_t)
+ auth_domtrans_chk_passwd(swat_t)
++auth_domtrans_upd_passwd(swat_t)
  
-+files_list_var_lib(winbind_t)
-+manage_dirs_pattern(winbind_t,samba_var_t,samba_var_t)
- manage_files_pattern(winbind_t,samba_var_t,samba_var_t)
- manage_lnk_files_pattern(winbind_t,samba_var_t,samba_var_t)
+ libs_use_ld_so(swat_t)
+ libs_use_shared_libs(swat_t)
+@@ -728,6 +742,7 @@
+ fs_search_auto_mountpoints(winbind_t)
  
-@@ -707,6 +785,7 @@
- read_files_pattern(winbind_helper_t,samba_etc_t,samba_etc_t)
- read_lnk_files_pattern(winbind_helper_t,samba_etc_t,samba_etc_t)
+ auth_domtrans_chk_passwd(winbind_t)
++auth_domtrans_upd_passwd(winbind_t)
  
-+files_list_var_lib(winbind_helper_t)
- allow winbind_helper_t samba_var_t:dir search;
+ domain_use_interactive_fds(winbind_t)
  
- stream_connect_pattern(winbind_helper_t,winbind_var_run_t,winbind_var_run_t,winbind_t)
-@@ -730,3 +809,23 @@
- 	squid_read_log(winbind_helper_t)
- 	squid_append_log(winbind_helper_t)
- ')
-+
-+########################################
-+#
-+# samba_unconfined_script_t local policy
-+#
-+type samba_unconfined_script_t;
-+domain_type(samba_unconfined_script_t)
-+role system_r types samba_unconfined_script_t;
-+
-+# This type is used for executable scripts files
-+type samba_unconfined_script_exec_t;
-+corecmd_shell_entry_type(samba_unconfined_script_t)
-+domain_entry_file(samba_unconfined_script_t,samba_unconfined_script_exec_t)
-+allow smbd_t samba_unconfined_script_exec_t:dir search_dir_perms;
-+allow smbd_t samba_unconfined_script_exec_t:file ioctl;
-+
-+tunable_policy(`samba_run_unconfined',`
-+	domtrans_pattern(smbd_t, samba_unconfined_script_exec_t, samba_unconfined_script_t)
-+')
-+unconfined_domain(samba_unconfined_script_t)
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/sasl.te serefpolicy-3.0.1/policy/modules/services/sasl.te
 --- nsaserefpolicy/policy/modules/services/sasl.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/sasl.te	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/sasl.te	2007-06-19 17:06:27.000000000 -0400
 @@ -63,6 +63,7 @@
  selinux_compute_access_vector(saslauthd_t)
  
@@ -5851,55 +6637,48 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/sasl
  auth_use_nsswitch(saslauthd_t)
  
  domain_use_interactive_fds(saslauthd_t)
-@@ -90,7 +91,7 @@
- userdom_dontaudit_use_unpriv_user_fds(saslauthd_t)
- userdom_dontaudit_search_sysadm_home_dirs(saslauthd_t)
- 
--# cjp: typeattribute doesnt work in conditionals
-+# cjp: typeattribute dont work in conditionals yet
- auth_can_read_shadow_passwords(saslauthd_t)
- tunable_policy(`allow_saslauthd_read_shadow',`
- 	auth_tunable_read_shadow(saslauthd_t) 
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/sendmail.te serefpolicy-3.0.1/policy/modules/services/sendmail.te
---- nsaserefpolicy/policy/modules/services/sendmail.te	2007-05-30 11:47:29.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/sendmail.te	2007-05-30 15:12:50.000000000 -0400
-@@ -136,10 +136,6 @@
- 	udev_read_db(sendmail_t)
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/setroubleshoot.if serefpolicy-3.0.1/policy/modules/services/setroubleshoot.if
+--- nsaserefpolicy/policy/modules/services/setroubleshoot.if	2007-05-29 14:10:57.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/setroubleshoot.if	2007-06-21 11:54:56.000000000 -0400
+@@ -19,3 +19,22 @@
+ 	allow $1 setroubleshoot_var_run_t:sock_file write;
+ 	allow $1 setroubleshootd_t:unix_stream_socket connectto;
  ')
- 
--optional_policy(`
--	unconfined_domain(sendmail_t)
--')
--
- ifdef(`TODO',`
- allow sendmail_t etc_mail_t:dir rw_dir_perms;
- allow sendmail_t etc_mail_t:file manage_file_perms;
++
++########################################
++## <summary>
++##	Dontaudit Connect to setroubleshootd over an unix stream socket.
++## </summary>
++## <param name="domain">
++##	<summary>
++##	Domain allowed access.
++##	</summary>
++## </param>
++#
++interface(`setroubleshoot_dontaudit_stream_connect',`
++	gen_require(`
++		type setroubleshootd_t, setroubleshoot_var_run_t;
++	')
++
++	dontaudit $1 setroubleshoot_var_run_t:sock_file write;
++	dontaudit $1 setroubleshootd_t:unix_stream_socket connectto;
++')
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/setroubleshoot.te serefpolicy-3.0.1/policy/modules/services/setroubleshoot.te
---- nsaserefpolicy/policy/modules/services/setroubleshoot.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/setroubleshoot.te	2007-05-31 11:02:58.000000000 -0400
-@@ -28,7 +28,7 @@
- #
- 
- allow setroubleshootd_t self:capability { dac_override sys_tty_config };
--allow setroubleshootd_t self:process { signal getattr getsched };
-+allow setroubleshootd_t self:process { signull signal getattr getsched };
- allow setroubleshootd_t self:fifo_file rw_fifo_file_perms;
- allow setroubleshootd_t self:tcp_socket create_stream_socket_perms;
- allow setroubleshootd_t self:unix_stream_socket { create_stream_socket_perms connectto };
-@@ -75,6 +75,10 @@
+--- nsaserefpolicy/policy/modules/services/setroubleshoot.te	2007-06-11 16:05:30.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/setroubleshoot.te	2007-06-19 17:06:27.000000000 -0400
+@@ -75,6 +75,9 @@
  files_getattr_all_dirs(setroubleshootd_t)
  files_getattr_all_files(setroubleshootd_t)
  
 +fs_getattr_all_dirs(setroubleshootd_t)
 +fs_getattr_all_files(setroubleshootd_t)
 +
-+selinux_get_fs_mount(setroubleshootd_t)
  selinux_get_enforce_mode(setroubleshootd_t)
  selinux_validate_context(setroubleshootd_t)
  
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/smartmon.te serefpolicy-3.0.1/policy/modules/services/smartmon.te
 --- nsaserefpolicy/policy/modules/services/smartmon.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/smartmon.te	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/smartmon.te	2007-06-19 17:06:27.000000000 -0400
 @@ -60,6 +60,7 @@
  fs_search_auto_mountpoints(fsdaemon_t)
  
@@ -5908,43 +6687,37 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/smar
  
  storage_raw_read_fixed_disk(fsdaemon_t)
  storage_raw_write_fixed_disk(fsdaemon_t)
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/snmp.te serefpolicy-3.0.1/policy/modules/services/snmp.te
---- nsaserefpolicy/policy/modules/services/snmp.te	2007-05-30 11:47:29.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/snmp.te	2007-05-30 15:12:50.000000000 -0400
-@@ -9,9 +9,6 @@
- type snmpd_exec_t;
- init_daemon_domain(snmpd_t,snmpd_exec_t)
- 
--type snmpd_etc_t;
--files_config_file(snmpd_etc_t)
--
- type snmpd_log_t;
- logging_log_file(snmpd_log_t)
- 
-@@ -33,8 +30,6 @@
- allow snmpd_t self:tcp_socket create_stream_socket_perms;
- allow snmpd_t self:udp_socket connected_stream_socket_perms;
- 
--allow snmpd_t snmpd_etc_t:file { getattr read };
--
- allow snmpd_t snmpd_log_t:file manage_file_perms;
- logging_log_filetrans(snmpd_t,snmpd_log_t,file)
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/snmp.fc serefpolicy-3.0.1/policy/modules/services/snmp.fc
+--- nsaserefpolicy/policy/modules/services/snmp.fc	2007-06-19 16:23:35.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/snmp.fc	2007-06-19 17:06:27.000000000 -0400
+@@ -1,3 +1,10 @@
++
++#
++# /etc
++#
++
++/etc/snmp/snmp(trap)?d\.conf -- gen_context(system_u:object_r:snmpd_etc_t,s0)
++
+ #
+ # /usr
+ #
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/spamassassin.fc serefpolicy-3.0.1/policy/modules/services/spamassassin.fc
+--- nsaserefpolicy/policy/modules/services/spamassassin.fc	2007-06-11 16:05:30.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/spamassassin.fc	2007-06-19 17:06:27.000000000 -0400
+@@ -10,3 +10,9 @@
+ /var/lib/spamassassin(/.*)?	gen_context(system_u:object_r:spamd_var_lib_t,s0)
  
+ /var/spool/spamassassin(/.*)?	gen_context(system_u:object_r:spamd_spool_t,s0)
++/var/spool/spamd(/.*)?	gen_context(system_u:object_r:spamd_spool_t,s0)
++
++/var/run/spamassassin(/.*)?	gen_context(system_u:object_r:spamd_var_run_t,s0)
++/var/run/spamass-milter(/.*)?	gen_context(system_u:object_r:spamd_var_run_t,s0)
++
++
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/spamassassin.te serefpolicy-3.0.1/policy/modules/services/spamassassin.te
---- nsaserefpolicy/policy/modules/services/spamassassin.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/spamassassin.te	2007-05-30 15:12:50.000000000 -0400
-@@ -13,18 +13,16 @@
- ## </desc>
- gen_tunable(spamassassin_can_network,false)
- 
--ifdef(`targeted_policy',`
- ## <desc>
- ## <p>
- ## Allow spamd to read/write user home directories.
- ## </p>
- ## </desc>
- gen_tunable(spamd_enable_home_dirs,true)
--')
+--- nsaserefpolicy/policy/modules/services/spamassassin.te	2007-06-15 14:54:33.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/spamassassin.te	2007-06-19 17:06:27.000000000 -0400
+@@ -22,7 +22,7 @@
  
  # spamassassin client executable
  type spamc_exec_t;
@@ -5953,7 +6726,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/spam
  
  type spamd_t;
  type spamd_exec_t;
-@@ -44,7 +42,7 @@
+@@ -42,7 +42,7 @@
  files_pid_file(spamd_var_run_t)
  
  type spamassassin_exec_t;
@@ -5962,38 +6735,20 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/spam
  
  ########################################
  #
-@@ -101,6 +99,7 @@
- corenet_tcp_bind_all_nodes(spamd_t)
- corenet_tcp_bind_spamd_port(spamd_t)
- corenet_tcp_connect_razor_port(spamd_t)
-+corenet_tcp_connect_smtp_port(spamd_t)
- corenet_sendrecv_razor_client_packets(spamd_t)
- corenet_sendrecv_spamd_server_packets(spamd_t)
- # spamassassin 3.1 needs this for its
-@@ -155,7 +154,7 @@
- 		userdom_manage_generic_user_home_content_dirs(spamd_t)
- 		userdom_manage_generic_user_home_content_files(spamd_t)
- 		userdom_manage_generic_user_home_content_symlinks(spamd_t)
--		userdom_generic_user_home_dir_filetrans_generic_user_home_content(spamd_t,dir)
-+#		userdom_generic_user_home_dir_filetrans_generic_user_home_content(spamd_t,dir)
- 	')
- ')
+@@ -83,8 +83,9 @@
+ allow spamd_t spamd_var_lib_t:dir list_dir_perms;
+ read_files_pattern(spamd_t,spamd_var_lib_t,spamd_var_lib_t)
  
-@@ -185,6 +184,11 @@
- ')
- 
- optional_policy(`
-+	mysql_search_db(spamd_t)
-+	mysql_stream_connect(spamd_t)
-+')
-+
-+optional_policy(`
- 	nis_use_ypbind(spamd_t)
- ')
++manage_dirs_pattern(spamd_t,spamd_var_run_t,spamd_var_run_t)
+ manage_files_pattern(spamd_t,spamd_var_run_t,spamd_var_run_t)
+-files_pid_filetrans(spamd_t,spamd_var_run_t,file)
++files_pid_filetrans(spamd_t,spamd_var_run_t,{ file dir })
  
+ kernel_read_all_sysctls(spamd_t)
+ kernel_read_system_state(spamd_t)
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/squid.fc serefpolicy-3.0.1/policy/modules/services/squid.fc
 --- nsaserefpolicy/policy/modules/services/squid.fc	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/squid.fc	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/squid.fc	2007-06-19 17:06:27.000000000 -0400
 @@ -12,3 +12,5 @@
  /var/run/squid\.pid	--	gen_context(system_u:object_r:squid_var_run_t,s0)
  
@@ -6002,7 +6757,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/squi
 +/usr/lib64/squid/cachemgr\.cgi	--	gen_context(system_u:object_r:httpd_squid_script_exec_t,s0)
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/squid.te serefpolicy-3.0.1/policy/modules/services/squid.te
 --- nsaserefpolicy/policy/modules/services/squid.te	2007-05-30 11:47:29.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/squid.te	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/squid.te	2007-06-19 17:06:27.000000000 -0400
 @@ -179,3 +179,12 @@
  #squid requires the following when run in diskd mode, the recommended setting
  allow squid_t tmpfs_t:file { read write };
@@ -6018,8 +6773,16 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/squi
 +')
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/ssh.if serefpolicy-3.0.1/policy/modules/services/ssh.if
 --- nsaserefpolicy/policy/modules/services/ssh.if	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/ssh.if	2007-05-30 15:12:50.000000000 -0400
-@@ -709,3 +709,42 @@
++++ serefpolicy-3.0.1/policy/modules/services/ssh.if	2007-06-21 12:35:37.000000000 -0400
+@@ -202,6 +202,7 @@
+ #
+ template(`ssh_per_role_template',`
+ 	gen_require(`
++		type sshd_t;
+ 		type ssh_agent_exec_t, ssh_keysign_exec_t;
+ 	')
+ 
+@@ -709,3 +710,42 @@
  
  	dontaudit $1 sshd_key_t:file { getattr read };
  ')
@@ -6064,7 +6827,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/ssh.
 +
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/ssh.te serefpolicy-3.0.1/policy/modules/services/ssh.te
 --- nsaserefpolicy/policy/modules/services/ssh.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/ssh.te	2007-05-31 14:36:21.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/ssh.te	2007-06-19 17:06:27.000000000 -0400
 @@ -24,11 +24,11 @@
  
  # Type for the ssh-agent executable.
@@ -6079,50 +6842,45 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/ssh.
  
  type ssh_keygen_t;
  type ssh_keygen_exec_t;
-@@ -119,7 +119,13 @@
+@@ -119,7 +119,12 @@
  ')
  
  optional_policy(`
+-	unconfined_domain(sshd_t)
 +	usermanage_read_crack_db(sshd_t)
 +')
 +
 +optional_policy(`
- 	unconfined_domain(sshd_t)
 +	unconfined_shell_domtrans(sshd_t)
 +	userdom_read_all_users_home_content_files(sshd_t)
  ')
  
  ifdef(`TODO',`
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/tftp.te serefpolicy-3.0.1/policy/modules/services/tftp.te
---- nsaserefpolicy/policy/modules/services/tftp.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/tftp.te	2007-05-30 15:12:50.000000000 -0400
-@@ -69,6 +69,7 @@
- logging_send_syslog_msg(tftpd_t)
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/uwimap.te serefpolicy-3.0.1/policy/modules/services/uwimap.te
+--- nsaserefpolicy/policy/modules/services/uwimap.te	2007-05-29 14:10:57.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/uwimap.te	2007-06-19 17:06:27.000000000 -0400
+@@ -63,6 +63,7 @@
+ fs_search_auto_mountpoints(imapd_t)
  
- miscfiles_read_localization(tftpd_t)
-+miscfiles_read_public_files(tftpd_t)
+ auth_domtrans_chk_passwd(imapd_t)
++auth_domtrans_upd_passwd(imapd_t)
  
- sysnet_read_config(tftpd_t)
- sysnet_use_ldap(tftpd_t)
-@@ -96,3 +97,4 @@
- optional_policy(`
-         udev_read_db(tftpd_t)
- ')
-+
+ libs_use_ld_so(imapd_t)
+ libs_use_shared_libs(imapd_t)
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/w3c.fc serefpolicy-3.0.1/policy/modules/services/w3c.fc
 --- nsaserefpolicy/policy/modules/services/w3c.fc	1969-12-31 19:00:00.000000000 -0500
-+++ serefpolicy-3.0.1/policy/modules/services/w3c.fc	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/w3c.fc	2007-06-19 17:06:27.000000000 -0400
 @@ -0,0 +1,2 @@
 +/usr/share/w3c-markup-validator(/.*)?		gen_context(system_u:object_r:httpd_w3c_validator_content_t,s0)
 +/usr/share/w3c-markup-validator/cgi-bin(/.*)?	gen_context(system_u:object_r:httpd_w3c_validator_script_exec_t,s0)
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/w3c.if serefpolicy-3.0.1/policy/modules/services/w3c.if
 --- nsaserefpolicy/policy/modules/services/w3c.if	1969-12-31 19:00:00.000000000 -0500
-+++ serefpolicy-3.0.1/policy/modules/services/w3c.if	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/w3c.if	2007-06-19 17:06:27.000000000 -0400
 @@ -0,0 +1 @@
 +## <summary>W3C</summary>
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/w3c.te serefpolicy-3.0.1/policy/modules/services/w3c.te
 --- nsaserefpolicy/policy/modules/services/w3c.te	1969-12-31 19:00:00.000000000 -0500
-+++ serefpolicy-3.0.1/policy/modules/services/w3c.te	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/w3c.te	2007-06-19 17:06:27.000000000 -0400
 @@ -0,0 +1,14 @@
 +policy_module(w3c,1.2.1)
 +
@@ -6138,117 +6896,327 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/w3c.
 +corenet_tcp_sendrecv_http_cache_port(httpd_w3c_validator_script_t)
 +
 +miscfiles_read_certs(httpd_w3c_validator_script_t)
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/xserver.if serefpolicy-3.0.1/policy/modules/services/xserver.if
---- nsaserefpolicy/policy/modules/services/xserver.if	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/xserver.if	2007-05-30 15:12:50.000000000 -0400
-@@ -154,6 +154,8 @@
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/xserver.fc serefpolicy-3.0.1/policy/modules/services/xserver.fc
+--- nsaserefpolicy/policy/modules/services/xserver.fc	2007-05-29 14:10:57.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/xserver.fc	2007-06-21 11:16:21.000000000 -0400
+@@ -92,6 +92,7 @@
+ /var/log/XFree86.*	--	gen_context(system_u:object_r:xserver_log_t,s0)
+ /var/log/Xorg.*		--	gen_context(system_u:object_r:xserver_log_t,s0)
+ 
++/var/run/gdm_socket	-s	gen_context(system_u:object_r:xdm_var_run_t,s0)
+ /var/run/[gx]dm\.pid	--	gen_context(system_u:object_r:xdm_var_run_t,s0)
+ /var/run/xdmctl(/.*)?		gen_context(system_u:object_r:xdm_var_run_t,s0)
  
- 	modutils_domtrans_insmod($1_xserver_t)
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/xserver.if serefpolicy-3.0.1/policy/modules/services/xserver.if
+--- nsaserefpolicy/policy/modules/services/xserver.if	2007-06-15 14:54:33.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/xserver.if	2007-06-22 14:11:27.000000000 -0400
+@@ -83,6 +83,8 @@
+ 	manage_files_pattern($1_xserver_t,xserver_log_t,xserver_log_t)
+ 	logging_log_filetrans($1_xserver_t,xserver_log_t,file)
  
-+	selinux_get_fs_mount($1_xserver_t)
++	domain_mmap_low($1_xserver_t)
 +
- 	seutil_dontaudit_search_config($1_xserver_t)
+ 	kernel_read_system_state($1_xserver_t)
+ 	kernel_read_device_sysctls($1_xserver_t)
+ 	kernel_read_modprobe_sysctls($1_xserver_t)
+@@ -229,7 +231,8 @@
  
- 	sysnet_read_config($1_xserver_t)
-@@ -732,12 +734,8 @@
- 		attribute xauth_home_type;
+ 	gen_require(`
+ 		type iceauth_exec_t, xauth_exec_t;
+-		attribute fonts_type, fonts_cache_type, fonts_config_type;
++		attribute fonts_cache_type, fonts_config_type;
++		attribute fonts_type;
  	')
  
--	ifdef(`strict_policy',`
--		allow $1 xauth_home_type:file read_file_perms;
--		userdom_search_all_users_home_dirs($1)
--	',`
--		userdom_read_generic_user_home_content_files($1)
--	')
-+	allow $1 xauth_home_type:file read_file_perms;
-+	userdom_search_all_users_home_dirs($1)
- ')
+ 	##############################
+@@ -349,9 +352,6 @@
+ 	# allow ps to show xauth
+ 	ps_process_pattern($2,$1_xauth_t)
  
- ########################################
-@@ -1136,7 +1134,7 @@
- 		type xdm_xserver_tmp_t;
+-	allow $2 $1_xauth_home_t:file manage_file_perms;
+-	allow $2 $1_xauth_home_t:file { relabelfrom relabelto };
+-
+ 	allow xdm_t $1_xauth_home_t:file manage_file_perms;
+ 	userdom_user_home_dir_filetrans($1,xdm_t,$1_xauth_home_t,file)
+ 
+@@ -383,6 +383,14 @@
  	')
  
--	allow $1 xdm_xserver_tmp_t:file { getattr read };
-+	read_files_pattern($1,xdm_xserver_tmp_t,xdm_xserver_tmp_t)
- ')
+ 	optional_policy(`
++		xserver_read_user_xauth($1, $2)
++	')
++
++	optional_policy(`
++		xserver_read_user_iceauth($1, $2)
++	')
++
++	optional_policy(`
+ 		nis_use_ypbind($1_xauth_t)
+ 	')
  
- ########################################
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/xserver.te serefpolicy-3.0.1/policy/modules/services/xserver.te
---- nsaserefpolicy/policy/modules/services/xserver.te	2007-05-29 14:10:57.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/services/xserver.te	2007-05-31 14:35:46.000000000 -0400
-@@ -132,6 +132,7 @@
- manage_fifo_files_pattern(xdm_t,xdm_tmpfs_t,xdm_tmpfs_t)
- manage_sock_files_pattern(xdm_t,xdm_tmpfs_t,xdm_tmpfs_t)
- fs_tmpfs_filetrans(xdm_t,xdm_tmpfs_t,{ dir file lnk_file sock_file fifo_file })
-+fs_rw_tmpfs_files(xdm_xserver_t)
+@@ -533,16 +541,14 @@
  
- manage_dirs_pattern(xdm_t,xdm_var_lib_t,xdm_var_lib_t)	
- manage_files_pattern(xdm_t,xdm_var_lib_t,xdm_var_lib_t)
-@@ -256,6 +257,7 @@
- libs_exec_lib_files(xdm_t)
+ 	gen_require(`
+ 		type xdm_t, xdm_tmp_t;
+-		type $1_xauth_home_t, $1_iceauth_home_t, $1_xserver_t, $1_xserver_tmpfs_t;
+ 	')
  
- logging_read_generic_logs(xdm_t)
-+logging_send_audit_msg(xdm_t)
+ 	allow $2 self:shm create_shm_perms;
+ 	allow $2 self:unix_dgram_socket create_socket_perms;
+ 	allow $2 self:unix_stream_socket { connectto create_stream_socket_perms };
  
- miscfiles_read_localization(xdm_t)
- miscfiles_read_fonts(xdm_t)
-@@ -305,6 +307,8 @@
+-	# Read .Xauthority file
+-	allow $2 $1_xauth_home_t:file { getattr read };
+-	allow $2 $1_iceauth_home_t:file { getattr read };
++	# this should cause the .xsession-errors file to be written to /tmp
++	dontaudit xdm_t $1_home_t:file rw_file_perms;
  
- optional_policy(`
- 	consolekit_dbus_chat(xdm_t)
-+	dbus_system_bus_client_template(xdm, xdm_t)
-+	dbus_send_system_bus(xdm_t)
- ')
+ 	# for when /tmp/.X11-unix is created by the system
+ 	allow $2 xdm_t:fd use;
+@@ -561,16 +567,36 @@
+ 	userdom_dontaudit_write_user_home_content_files($1,$2)
  
- optional_policy(`
-@@ -349,11 +353,7 @@
- optional_policy(`
- 	unconfined_domain(xdm_t)
- 	unconfined_domtrans(xdm_t)
--	userdom_generic_user_home_dir_filetrans_generic_user_home_content(xdm_t, {file dir })
--
--	ifndef(`distro_redhat',`
--		allow xdm_t self:process { execheap execmem };
--	')
-+	unconfined_signal(xdm_t)
+ 	xserver_ro_session_template(xdm,$2,$3)
+-	xserver_rw_session_template($1,$2,$3)
+-	xserver_use_user_fonts($1,$2)
  
- 	ifdef(`distro_rhel4',`
- 		allow xdm_t self:process { execheap execmem };
-@@ -425,6 +425,10 @@
- ')
+ 	xserver_read_xdm_tmp_files($2)
  
- optional_policy(`
-+	mono_rw_shm(xdm_xserver_t)
-+')
++	# Read .Xauthority file
++	optional_policy(`
++		xserver_read_user_xauth($1, $2)
++	')
 +
-+optional_policy(`
- 	resmgr_stream_connect(xdm_t)
- ')
- 
-@@ -434,41 +438,17 @@
- ')
- 
- optional_policy(`
--	unconfined_domain_noaudit(xdm_xserver_t)
-+	unconfined_domain(xdm_xserver_t)
- 	unconfined_domtrans(xdm_xserver_t)
--
--	ifndef(`distro_redhat',`
--		allow xdm_xserver_t self:process { execheap execmem };
--	')
-+	unconfined_rw_shm(xdm_xserver_t)
- 
- 	ifdef(`distro_rhel4',`
- 		allow xdm_xserver_t self:process { execheap execmem };
++	optional_policy(`
++		xserver_read_user_iceauth($1, $2)
++	')
++
++	optional_policy(`
++		xserver_use_user_fonts($1,$2)
++	')
++
++	optional_policy(`
++		xserver_rw_session_template($1,$2,$3)
++	')
++
++	ifdef(`TODO',`
++	this does not work properly
++	$1 would be a user not xdm
++	user_xserver_t does not exist
+ 	# Client write xserver shm
+ 	tunable_policy(`allow_write_xshm',`
+ 		allow $2 $1_xserver_t:shm rw_shm_perms;
+ 		allow $2 $1_xserver_tmpfs_t:file rw_file_perms;
  	')
++	')
  ')
  
--ifdef(`TODO',`
--# Need to further investigate these permissions and
--# perhaps define derived types.
--allow xdm_t var_lib_t:dir { write search add_name remove_name  create unlink };
--allow xdm_t var_lib_t:file { create write unlink };
+ ########################################
+@@ -655,6 +681,73 @@
+ 
+ ########################################
+ ## <summary>
++##	Read a user Xauthority domain.
++## </summary>
++## <desc>
++##	<p>
++##	read to a user Xauthority domain.
++##	</p>
++##	<p>
++##	This is a templated interface, and should only
++##	be called from a per-userdomain template.
++##	</p>
++## </desc>
++## <param name="userdomain_prefix">
++##	<summary>
++##	The prefix of the user domain (e.g., user
++##	is the prefix for user_t).
++##	</summary>
++## </param>
++## <param name="domain">
++##	<summary>
++##	Domain allowed access.
++##	</summary>
++## </param>
++#
++template(`xserver_read_user_xauth',`
++	gen_require(`
++		type $1_xauth_home_t;
++	')
++
++	allow $2 $1_xauth_home_t:file { getattr read };
++')
++
++########################################
++## <summary>
++##	Read a user Iceauthority domain.
++## </summary>
++## <desc>
++##	<p>
++##	read to a user Iceauthority domain.
++##	</p>
++##	<p>
++##	This is a templated interface, and should only
++##	be called from a per-userdomain template.
++##	</p>
++## </desc>
++## <param name="userdomain_prefix">
++##	<summary>
++##	The prefix of the user domain (e.g., user
++##	is the prefix for user_t).
++##	</summary>
++## </param>
++## <param name="domain">
++##	<summary>
++##	Domain allowed access.
++##	</summary>
++## </param>
++#
++template(`xserver_read_user_iceauth',`
++	gen_require(`
++		type $1_iceauth_home_t;
++	')
++
++	# Read .Iceauthority file
++	allow $2 $1_iceauth_home_t:file { getattr read };
++')
++
++########################################
++## <summary>
+ ##	Transition to a user Xauthority domain.
+ ## </summary>
+ ## <desc>
+@@ -1132,7 +1225,7 @@
+ 		type xdm_xserver_tmp_t;
+ 	')
+ 
+-	allow $1 xdm_xserver_tmp_t:file { getattr read };
++	read_files_pattern($1,xdm_xserver_tmp_t,xdm_xserver_tmp_t)
+ ')
+ 
+ ########################################
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/xserver.te serefpolicy-3.0.1/policy/modules/services/xserver.te
+--- nsaserefpolicy/policy/modules/services/xserver.te	2007-06-11 16:05:30.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/services/xserver.te	2007-06-20 09:48:35.000000000 -0400
+@@ -16,6 +16,13 @@
+ 
+ ## <desc>
+ ## <p>
++## Allows XServer to execute writable memory
++## </p>
++## </desc>
++gen_tunable(allow_xserver_execmem,false)
++
++## <desc>
++## <p>
+ ## Allow xdm logins as sysadm
+ ## </p>
+ ## </desc>
+@@ -132,6 +139,7 @@
+ manage_fifo_files_pattern(xdm_t,xdm_tmpfs_t,xdm_tmpfs_t)
+ manage_sock_files_pattern(xdm_t,xdm_tmpfs_t,xdm_tmpfs_t)
+ fs_tmpfs_filetrans(xdm_t,xdm_tmpfs_t,{ dir file lnk_file sock_file fifo_file })
++fs_rw_tmpfs_files(xdm_xserver_t)
+ 
+ manage_dirs_pattern(xdm_t,xdm_var_lib_t,xdm_var_lib_t)	
+ manage_files_pattern(xdm_t,xdm_var_lib_t,xdm_var_lib_t)
+@@ -140,7 +148,8 @@
+ manage_dirs_pattern(xdm_t,xdm_var_run_t,xdm_var_run_t)
+ manage_files_pattern(xdm_t,xdm_var_run_t,xdm_var_run_t)
+ manage_fifo_files_pattern(xdm_t,xdm_var_run_t,xdm_var_run_t)
+-files_pid_filetrans(xdm_t,xdm_var_run_t,{ dir file fifo_file })
++manage_sock_files_pattern(xdm_t,xdm_var_run_t,xdm_var_run_t)
++files_pid_filetrans(xdm_t,xdm_var_run_t,{ dir file fifo_file sock_file })
+ 
+ allow xdm_t xdm_xserver_t:process signal;
+ allow xdm_t xdm_xserver_t:unix_stream_socket connectto;
+@@ -245,6 +254,7 @@
+ auth_domtrans_pam_console(xdm_t)
+ auth_manage_pam_pid(xdm_t)
+ auth_manage_pam_console_data(xdm_t)
++auth_signal_pam(xdm_t)
+ auth_rw_faillog(xdm_t)
+ auth_write_login_records(xdm_t)
+ 
+@@ -256,6 +266,7 @@
+ libs_exec_lib_files(xdm_t)
+ 
+ logging_read_generic_logs(xdm_t)
++logging_send_audit_msgs(xdm_t)
+ 
+ miscfiles_read_localization(xdm_t)
+ miscfiles_read_fonts(xdm_t)
+@@ -270,6 +281,10 @@
+ # Search /proc for any user domain processes.
+ userdom_read_all_users_state(xdm_t)
+ userdom_signal_all_users(xdm_t)
++#
++# Wants to delete .xsession-errors file
++#
++userdom_unlink_unpriv_users_home_content_files(xdm_t)
+ 
+ xserver_rw_session_template(xdm,xdm_t,xdm_tmpfs_t)
+ 
+@@ -305,6 +320,8 @@
+ 
+ optional_policy(`
+ 	consolekit_dbus_chat(xdm_t)
++	dbus_system_bus_client_template(xdm, xdm_t)
++	dbus_send_system_bus(xdm_t)
+ ')
+ 
+ optional_policy(`
+@@ -347,12 +364,8 @@
+ ')
+ 
+ optional_policy(`
+-	unconfined_domain(xdm_t)
+ 	unconfined_domtrans(xdm_t)
+-
+-	ifndef(`distro_redhat',`
+-		allow xdm_t self:process { execheap execmem };
+-	')
++	unconfined_signal(xdm_t)
+ 
+ 	ifdef(`distro_rhel4',`
+ 		allow xdm_t self:process { execheap execmem };
+@@ -424,6 +437,10 @@
+ ')
+ 
+ optional_policy(`
++	mono_rw_shm(xdm_xserver_t)
++')
++
++optional_policy(`
+ 	resmgr_stream_connect(xdm_t)
+ ')
+ 
+@@ -433,47 +450,15 @@
+ ')
+ 
+ optional_policy(`
+-	unconfined_domain_noaudit(xdm_xserver_t)
+-	unconfined_domtrans(xdm_xserver_t)
+-
+-	ifndef(`distro_redhat',`
+-		allow xdm_xserver_t self:process { execheap execmem };
+-	')
++	unconfined_rw_shm(xdm_xserver_t)
++	unconfined_execmem_rw_shm(xdm_xserver_t)
++')
+ 
+-	ifdef(`distro_rhel4',`
+-		allow xdm_xserver_t self:process { execheap execmem };
+-	')
++tunable_policy(`allow_xserver_execmem', `
++	allow xdm_xserver_t self:process { execheap execmem };
+ ')
+ 
+-ifdef(`TODO',`
+-# Need to further investigate these permissions and
+-# perhaps define derived types.
+-allow xdm_t var_lib_t:dir { write search add_name remove_name  create unlink };
+-allow xdm_t var_lib_t:file { create write unlink };
 -
 -# Do not audit attempts to write to index files under /usr
 -dontaudit xdm_t usr_t:file write;
@@ -6265,25 +7233,27 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/services/xser
 -allow xdm_t polymember:lnk_file { create unlink };
 -# xdm needs access for copying .Xauthority into new home
 -allow xdm_t polymember:file { create getattr write };
--')
++ifdef(`distro_rhel4',`
++	allow xdm_xserver_t self:process { execheap execmem };
+ ')
  
-+ifdef(`TODO',`
- #
- # Wants to delete .xsession-errors file
- #
-@@ -478,3 +458,4 @@
- #
- allow pam_t xdm_t:fifo_file { getattr ioctl write };
- ') dnl end TODO
-+
+-#
+-# Wants to delete .xsession-errors file
+-#
+-allow xdm_t user_home_type:file unlink;
+-#
+-# Should fix exec of pam_timestamp_check is not closing xdm file descriptor
+-#
+-allow pam_t xdm_t:fifo_file { getattr ioctl write };
+-') dnl end TODO
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/application.fc serefpolicy-3.0.1/policy/modules/system/application.fc
 --- nsaserefpolicy/policy/modules/system/application.fc	1969-12-31 19:00:00.000000000 -0500
-+++ serefpolicy-3.0.1/policy/modules/system/application.fc	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/application.fc	2007-06-19 17:06:27.000000000 -0400
 @@ -0,0 +1 @@
 +# No application file contexts.
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/application.if serefpolicy-3.0.1/policy/modules/system/application.if
 --- nsaserefpolicy/policy/modules/system/application.if	1969-12-31 19:00:00.000000000 -0500
-+++ serefpolicy-3.0.1/policy/modules/system/application.if	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/application.if	2007-06-19 17:06:27.000000000 -0400
 @@ -0,0 +1,104 @@
 +## <summary>Policy for application domains</summary>
 +
@@ -6391,7 +7361,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/applic
 +')
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/application.te serefpolicy-3.0.1/policy/modules/system/application.te
 --- nsaserefpolicy/policy/modules/system/application.te	1969-12-31 19:00:00.000000000 -0500
-+++ serefpolicy-3.0.1/policy/modules/system/application.te	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/application.te	2007-06-19 17:06:27.000000000 -0400
 @@ -0,0 +1,14 @@
 +
 +policy_module(application,1.0.0)
@@ -6409,7 +7379,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/applic
 +
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/authlogin.fc serefpolicy-3.0.1/policy/modules/system/authlogin.fc
 --- nsaserefpolicy/policy/modules/system/authlogin.fc	2007-05-29 14:10:58.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/authlogin.fc	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/authlogin.fc	2007-06-19 17:06:27.000000000 -0400
 @@ -14,6 +14,7 @@
  /sbin/pam_timestamp_check --	gen_context(system_u:object_r:pam_exec_t,s0)
  /sbin/unix_chkpwd	--	gen_context(system_u:object_r:chkpwd_exec_t,s0)
@@ -6419,9 +7389,9 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/authlo
  /sbin/unix2_chkpwd	--	gen_context(system_u:object_r:chkpwd_exec_t,s0)
  ')
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/authlogin.if serefpolicy-3.0.1/policy/modules/system/authlogin.if
---- nsaserefpolicy/policy/modules/system/authlogin.if	2007-05-29 14:10:58.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/authlogin.if	2007-05-31 11:10:26.000000000 -0400
-@@ -27,11 +27,10 @@
+--- nsaserefpolicy/policy/modules/system/authlogin.if	2007-06-15 14:54:34.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/authlogin.if	2007-06-21 10:33:53.000000000 -0400
+@@ -27,7 +27,8 @@
  	domain_type($1_chkpwd_t)
  	domain_entry_file($1_chkpwd_t,chkpwd_exec_t)
  
@@ -6430,30 +7400,18 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/authlo
 +	dontaudit $1_chkpwd_t self:capability sys_tty_config;
  	allow $1_chkpwd_t self:process getattr;
  
--	send_audit_msgs_pattern($1_chkpwd_t)
--
  	files_list_etc($1_chkpwd_t)
- 	allow $1_chkpwd_t shadow_t:file { getattr read };
- 
-@@ -53,6 +52,7 @@
- 	libs_use_shared_libs($1_chkpwd_t)
- 
- 	logging_send_syslog_msg($1_chkpwd_t)
-+	logging_send_audit_msg($1_chkpwd_t)
- 
- 	miscfiles_read_localization($1_chkpwd_t)
- 
-@@ -109,7 +109,8 @@
+@@ -108,7 +109,8 @@
  	role $3 types system_chkpwd_t;
  
  	# cjp: is this really needed?
 -	allow $2 self:netlink_audit_socket { create_netlink_socket_perms nlmsg_relay };
-+	logging_send_audit_msg($2)
++	logging_send_audit_msgs($2)
 +	logging_set_loginuid($2)
  
  	dontaudit $2 shadow_t:file { getattr read };
  
-@@ -171,6 +172,9 @@
+@@ -170,6 +172,9 @@
  ## </param>
  #
  interface(`auth_login_pgm_domain',`
@@ -6463,7 +7421,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/authlo
  
  	domain_type($1)
  	domain_subj_id_change_exemption($1)
-@@ -178,6 +182,9 @@
+@@ -177,6 +182,9 @@
  	domain_obj_id_change_exemption($1)
  	role system_r types $1;
  
@@ -6473,7 +7431,12 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/authlo
  	# for SSP/ProPolice
  	dev_read_urand($1)
  
-@@ -202,16 +209,20 @@
+@@ -197,16 +205,19 @@
+ 	mls_fd_share_all_levels($1)
+ 
+ 	auth_domtrans_chk_passwd($1)
++	auth_domtrans_upd_passwd($1)
+ 	auth_dontaudit_read_shadow($1)
  	auth_read_login_records($1)
  	auth_append_login_records($1)
  	auth_rw_lastlog($1)
@@ -6481,33 +7444,25 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/authlo
 +	auth_rw_faillog($1)
  	auth_exec_pam($1)
  
-+	auth_domtrans_upd_passwd($1)
-+
  	init_rw_utmp($1)
  
++	logging_send_audit_msgs($1)
  	logging_send_syslog_msg($1)
-+	logging_send_audit_msg($1)
 +	logging_set_loginuid($1)
  
  	seutil_read_config($1)
  	seutil_read_default_contexts($1)
--
-+	
- 	tunable_policy(`allow_polyinstantiation',`
- 		files_polyinstantiate_all($1)
- 	')
-@@ -311,10 +322,6 @@
+@@ -310,9 +321,6 @@
  		type system_chkpwd_t, chkpwd_exec_t, shadow_t;
  	')
  
 -	# cjp: is this really needed?
 -	allow $1 self:capability audit_control;
--	send_audit_msgs_pattern($1)
 -
  	corecmd_search_bin($1)
  	domtrans_pattern($1,chkpwd_exec_t,system_chkpwd_t)
  
-@@ -348,6 +355,37 @@
+@@ -348,6 +356,37 @@
  
  ########################################
  ## <summary>
@@ -6545,16 +7500,32 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/authlo
  ##	Get the attributes of the shadow passwords file.
  ## </summary>
  ## <param name="domain">
-@@ -1322,7 +1360,7 @@
- 	gen_require(`
- 		type var_auth_t;
- 	')
--
-+	
- 	allow $1 self:netlink_route_socket r_netlink_socket_perms;
+@@ -696,6 +735,24 @@
  
- 	allow $1 var_auth_t:dir list_dir_perms;
-@@ -1382,3 +1420,114 @@
+ ########################################
+ ## <summary>
++##	Execute pam programs in the pam domain.
++## </summary>
++## <param name="domain">
++##	<summary>
++##	Domain allowed access.
++##	</summary>
++## </param>
++#
++interface(`auth_signal_pam',`
++	gen_require(`
++		type pam_t;
++	')
++
++	allow $1 pam_t:process signal;
++')
++
++########################################
++## <summary>
+ ##	Execute pam programs in the PAM domain.
+ ## </summary>
+ ## <param name="domain">
+@@ -1382,3 +1439,114 @@
  	typeattribute $1 can_write_shadow_passwords;
  	typeattribute $1 can_relabelto_shadow_passwords;
  ')
@@ -6670,8 +7641,8 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/authlo
 +')
 +
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/authlogin.te serefpolicy-3.0.1/policy/modules/system/authlogin.te
---- nsaserefpolicy/policy/modules/system/authlogin.te	2007-05-29 14:10:58.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/authlogin.te	2007-05-30 15:12:50.000000000 -0400
+--- nsaserefpolicy/policy/modules/system/authlogin.te	2007-06-15 14:54:34.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/authlogin.te	2007-06-19 17:06:27.000000000 -0400
 @@ -9,6 +9,13 @@
  attribute can_read_shadow_passwords;
  attribute can_write_shadow_passwords;
@@ -6686,41 +7657,29 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/authlo
  
  type chkpwd_exec_t;
  corecmd_executable_file(chkpwd_exec_t)
-@@ -238,7 +245,6 @@
+@@ -161,6 +168,8 @@
+ dev_setattr_mouse_dev(pam_console_t)
+ dev_getattr_power_mgmt_dev(pam_console_t)
+ dev_setattr_power_mgmt_dev(pam_console_t)
++dev_getattr_printer_dev(pam_console_t)
++dev_setattr_printer_dev(pam_console_t)
+ dev_getattr_scanner_dev(pam_console_t)
+ dev_setattr_scanner_dev(pam_console_t)
+ dev_getattr_sound_dev(pam_console_t)
+@@ -238,7 +247,7 @@
  
  optional_policy(`
  	xserver_read_xdm_pid(pam_console_t)
 -	xserver_use_xdm_fds(pam_t)
++	xserver_dontaudit_write_log(pam_console_t)
  ')
  
  ########################################
-@@ -246,12 +252,16 @@
- # System check password local policy
- #
- 
-+logging_send_audit_msg(system_chkpwd_t)
-+
- allow system_chkpwd_t shadow_t:file { getattr read };
- 
- corecmd_search_bin(system_chkpwd_t)
- 
- domain_dontaudit_use_interactive_fds(system_chkpwd_t)
- 
-+selinux_get_fs_mount(system_chkpwd_t)
-+
- term_dontaudit_use_unallocated_ttys(system_chkpwd_t)
- term_dontaudit_use_generic_ptys(system_chkpwd_t)
- 
-@@ -296,11 +306,33 @@
- ')
- 
- optional_policy(`
--	# Allow utemper to write to /tmp/.xses-*
--	unconfined_write_tmp_files(utempter_t)
-+	xserver_use_xdm_fds(utempter_t)
-+	xserver_rw_xdm_pipes(utempter_t)
+@@ -304,3 +313,30 @@
+ 	xserver_use_xdm_fds(utempter_t)
+ 	xserver_rw_xdm_pipes(utempter_t)
  ')
- 
++
 +########################################
 +#
 +# updpwd local policy
@@ -6744,35 +7703,13 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/authlo
 +kernel_read_system_state(updpwd_t)
 +logging_send_syslog_msg(updpwd_t)
 +
- optional_policy(`
--	xserver_use_xdm_fds(utempter_t)
--	xserver_rw_xdm_pipes(utempter_t)
++optional_policy(`
 +	nscd_socket_use(updpwd_t)
- ')
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/clock.te serefpolicy-3.0.1/policy/modules/system/clock.te
---- nsaserefpolicy/policy/modules/system/clock.te	2007-05-29 14:10:58.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/clock.te	2007-05-30 15:12:50.000000000 -0400
-@@ -26,8 +26,6 @@
- allow hwclock_t self:process signal_perms;
- allow hwclock_t self:fifo_file { getattr read write };
- 
--send_audit_msgs_pattern(hwclock_t)
--
- # Allow hwclock to store & retrieve correction factors.
- allow hwclock_t adjtime_t:file { rw_file_perms setattr };
- 
-@@ -61,6 +59,7 @@
- libs_use_shared_libs(hwclock_t)
- 
- logging_send_syslog_msg(hwclock_t)
-+logging_send_audit_msg(hwclock_t)
- 
- miscfiles_read_localization(hwclock_t)
- 
++')
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/fstools.fc serefpolicy-3.0.1/policy/modules/system/fstools.fc
---- nsaserefpolicy/policy/modules/system/fstools.fc	2007-05-29 14:10:58.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/fstools.fc	2007-05-30 15:12:50.000000000 -0400
-@@ -19,7 +19,6 @@
+--- nsaserefpolicy/policy/modules/system/fstools.fc	2007-06-11 16:05:30.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/fstools.fc	2007-06-19 17:06:27.000000000 -0400
+@@ -20,7 +20,6 @@
  /sbin/mkfs.*		--	gen_context(system_u:object_r:fsadm_exec_t,s0)
  /sbin/mkraid		--	gen_context(system_u:object_r:fsadm_exec_t,s0)
  /sbin/mkreiserfs	--	gen_context(system_u:object_r:fsadm_exec_t,s0)
@@ -6782,7 +7719,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/fstool
  /sbin/partx		--	gen_context(system_u:object_r:fsadm_exec_t,s0)
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/fstools.if serefpolicy-3.0.1/policy/modules/system/fstools.if
 --- nsaserefpolicy/policy/modules/system/fstools.if	2007-05-29 14:10:58.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/fstools.if	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/fstools.if	2007-06-19 17:06:27.000000000 -0400
 @@ -124,3 +124,22 @@
  
  	allow $1 swapfile_t:file getattr;
@@ -6807,8 +7744,8 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/fstool
 +')
 +
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/fstools.te serefpolicy-3.0.1/policy/modules/system/fstools.te
---- nsaserefpolicy/policy/modules/system/fstools.te	2007-05-29 14:10:58.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/fstools.te	2007-05-30 15:12:50.000000000 -0400
+--- nsaserefpolicy/policy/modules/system/fstools.te	2007-06-11 16:05:30.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/fstools.te	2007-06-19 17:06:27.000000000 -0400
 @@ -9,6 +9,7 @@
  type fsadm_t;
  type fsadm_exec_t;
@@ -6819,7 +7756,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/fstool
  type fsadm_log_t;
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/fusermount.fc serefpolicy-3.0.1/policy/modules/system/fusermount.fc
 --- nsaserefpolicy/policy/modules/system/fusermount.fc	1969-12-31 19:00:00.000000000 -0500
-+++ serefpolicy-3.0.1/policy/modules/system/fusermount.fc	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/fusermount.fc	2007-06-19 17:06:27.000000000 -0400
 @@ -0,0 +1,6 @@
 +# fusermount executable will have:
 +# label: system_u:object_r:fusermount_exec_t
@@ -6829,7 +7766,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/fuserm
 +/usr/bin/fusermount		--	gen_context(system_u:object_r:fusermount_exec_t,s0)
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/fusermount.if serefpolicy-3.0.1/policy/modules/system/fusermount.if
 --- nsaserefpolicy/policy/modules/system/fusermount.if	1969-12-31 19:00:00.000000000 -0500
-+++ serefpolicy-3.0.1/policy/modules/system/fusermount.if	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/fusermount.if	2007-06-19 17:06:27.000000000 -0400
 @@ -0,0 +1,41 @@
 +## <summary>policy for fusermount</summary>
 +
@@ -6875,7 +7812,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/fuserm
 \ No newline at end of file
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/fusermount.te serefpolicy-3.0.1/policy/modules/system/fusermount.te
 --- nsaserefpolicy/policy/modules/system/fusermount.te	1969-12-31 19:00:00.000000000 -0500
-+++ serefpolicy-3.0.1/policy/modules/system/fusermount.te	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/fusermount.te	2007-06-19 17:06:27.000000000 -0400
 @@ -0,0 +1,46 @@
 +policy_module(fusermount,1.0.0)
 +
@@ -6925,7 +7862,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/fuserm
 +
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/getty.te serefpolicy-3.0.1/policy/modules/system/getty.te
 --- nsaserefpolicy/policy/modules/system/getty.te	2007-05-29 14:10:58.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/getty.te	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/getty.te	2007-06-19 17:06:27.000000000 -0400
 @@ -33,7 +33,8 @@
  #
  
@@ -6938,7 +7875,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/getty.
  allow getty_t self:fifo_file rw_fifo_file_perms;
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/hostname.te serefpolicy-3.0.1/policy/modules/system/hostname.te
 --- nsaserefpolicy/policy/modules/system/hostname.te	2007-05-29 14:10:58.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/hostname.te	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/hostname.te	2007-06-19 17:06:27.000000000 -0400
 @@ -8,8 +8,12 @@
  
  type hostname_t;
@@ -6966,8 +7903,8 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/hostna
 +	unconfined_dontaudit_rw_pipes(hostname_t)
 +')
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/init.if serefpolicy-3.0.1/policy/modules/system/init.if
---- nsaserefpolicy/policy/modules/system/init.if	2007-05-30 11:47:29.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/init.if	2007-05-30 15:12:50.000000000 -0400
+--- nsaserefpolicy/policy/modules/system/init.if	2007-06-11 16:05:30.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/init.if	2007-06-19 17:06:27.000000000 -0400
 @@ -194,11 +194,14 @@
  	gen_require(`
  		type initrc_t;
@@ -6983,57 +7920,16 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/init.i
  	role system_r types $1;
  
  	domtrans_pattern(initrc_t,$2,$1)
-@@ -300,6 +303,9 @@
- interface(`init_getpgid',`
- 	gen_require(`
- 		type init_t;
-+
-+		# cjp: remove this when init_t decl is moved back to this module
-+		attribute direct_run_init;
- 	')
- 
- 	allow $1 init_t:process getpgid;
-@@ -318,6 +324,9 @@
- interface(`init_signull',`
- 	gen_require(`
- 		type init_t;
-+
-+		# cjp: remove this when init_t decl is moved back to this module
-+		attribute direct_run_init;
- 	')
- 
- 	allow $1 init_t:process signull;
-@@ -336,6 +345,9 @@
- interface(`init_sigchld',`
- 	gen_require(`
- 		type init_t;
-+
-+		# cjp: remove this when init_t decl is moved back to this module
-+		attribute direct_run_init;
- 	')
- 
- 	allow $1 init_t:process sigchld;
-@@ -354,6 +366,9 @@
- interface(`init_use_fds',`
- 	gen_require(`
- 		type init_t;
-+
-+		# cjp: remove this when init_t decl is moved back to this module
-+		attribute direct_run_init;
+@@ -1251,7 +1254,7 @@
+ 		type initrc_var_run_t;
  	')
  
- 	allow $1 init_t:fd use;
-@@ -373,6 +388,9 @@
- interface(`init_dontaudit_use_fds',`
- 	gen_require(`
- 		type init_t;
-+
-+		# cjp: remove this when init_t decl is moved back to this module
-+		attribute direct_run_init;
- 	')
+-	dontaudit $1 initrc_var_run_t:file { getattr read write append };
++	dontaudit $1 initrc_var_run_t:file rw_file_perms;
+ ')
  
- 	dontaudit $1 init_t:fd use;
-@@ -1254,3 +1272,42 @@
+ ########################################
+@@ -1272,3 +1275,42 @@
  	files_search_pids($1)
  	allow $1 initrc_var_run_t:file manage_file_perms;
  ')
@@ -7078,7 +7974,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/init.i
 +')
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/init.te serefpolicy-3.0.1/policy/modules/system/init.te
 --- nsaserefpolicy/policy/modules/system/init.te	2007-05-29 14:10:58.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/init.te	2007-05-30 17:29:20.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/init.te	2007-06-22 11:29:08.000000000 -0400
 @@ -10,6 +10,20 @@
  # Declarations
  #
@@ -7128,7 +8024,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/init.t
  
  can_exec(initrc_t,initrc_exec_t)
  
-@@ -500,6 +513,33 @@
+@@ -500,6 +513,39 @@
  ')
  
  optional_policy(`
@@ -7149,20 +8045,26 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/init.t
 + 	')
 + 
 +	# system-config-services causes avc messages that should be dontaudited
-+	optional_policy(`
-+		unconfined_dontaudit_rw_pipes(daemon)
-+	')
-+
 + 	tunable_policy(`allow_daemons_dump_core',`
 + 		files_dump_core(daemon)
 +  	')
 +')
 +
 +optional_policy(`
++	unconfined_dontaudit_rw_pipes(daemon)
++
++	tunable_policy(`allow_daemons_use_tty',`
++		unconfined_use_terminals(daemon)
++ 	', `
++		unconfined_dontaudit_use_terminals(daemon)
++ 	')
++')
++ 
++optional_policy(`
  	amavis_search_lib(initrc_t)
  	amavis_setattr_pid_files(initrc_t)
  ')
-@@ -630,12 +670,6 @@
+@@ -630,12 +676,6 @@
  	mta_read_config(initrc_t)
  	mta_dontaudit_read_spool_symlinks(initrc_t)
  ')
@@ -7175,7 +8077,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/init.t
  
  optional_policy(`
  	ifdef(`distro_redhat',`
-@@ -701,6 +735,9 @@
+@@ -701,6 +741,9 @@
  
  	# why is this needed:
  	rpm_manage_db(initrc_t)
@@ -7187,7 +8089,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/init.t
  optional_policy(`
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/ipsec.if serefpolicy-3.0.1/policy/modules/system/ipsec.if
 --- nsaserefpolicy/policy/modules/system/ipsec.if	2007-05-29 14:10:58.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/ipsec.if	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/ipsec.if	2007-06-19 17:06:27.000000000 -0400
 @@ -114,6 +114,26 @@
  
  ########################################
@@ -7217,81 +8119,72 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/ipsec.
  ## <param name="domain">
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/ipsec.te serefpolicy-3.0.1/policy/modules/system/ipsec.te
 --- nsaserefpolicy/policy/modules/system/ipsec.te	2007-05-29 14:10:58.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/ipsec.te	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/ipsec.te	2007-06-19 17:06:27.000000000 -0400
 @@ -283,6 +283,7 @@
  allow racoon_t self:netlink_selinux_socket { bind create read };
  allow racoon_t self:udp_socket create_socket_perms;
  allow racoon_t self:key_socket { create read setopt write };
-+logging_send_audit_msg(racoon_t)
++logging_send_audit_msgs(racoon_t)
  
  # manage pid file
  manage_files_pattern(racoon_t,ipsec_var_run_t,ipsec_var_run_t)
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/iptables.te serefpolicy-3.0.1/policy/modules/system/iptables.te
---- nsaserefpolicy/policy/modules/system/iptables.te	2007-05-29 14:10:58.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/iptables.te	2007-05-30 16:53:27.000000000 -0400
-@@ -56,6 +56,7 @@
- domain_use_interactive_fds(iptables_t)
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/libraries.fc serefpolicy-3.0.1/policy/modules/system/libraries.fc
+--- nsaserefpolicy/policy/modules/system/libraries.fc	2007-06-15 14:54:34.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/libraries.fc	2007-06-22 09:05:47.000000000 -0400
+@@ -158,8 +158,11 @@
+ /usr/(local/)?.*\.so(\.[^/]*)*		--	gen_context(system_u:object_r:shlib_t,s0)
+ /usr/(local/)?lib(64)?/wine/.+\.so  	--	gen_context(system_u:object_r:textrel_shlib_t,s0)
+ /usr/(local/)?lib(64)?/(sse2/)?libfame-.*\.so.*	--	gen_context(system_u:object_r:textrel_shlib_t,s0)
++
+ /usr/NX/lib/libXcomp\.so.*		--	gen_context(system_u:object_r:textrel_shlib_t,s0)
+ /usr/NX/lib/libjpeg\.so.* 		--	gen_context(system_u:object_r:textrel_shlib_t,s0)
++/usr/lib/NX/libXcomp\.so.*		--	gen_context(system_u:object_r:textrel_shlib_t,s0)
++/usr/lib/NX/libjpeg\.so.* 		--	gen_context(system_u:object_r:textrel_shlib_t,s0)
  
- files_read_etc_files(iptables_t)
-+files_read_etc_runtime_files(iptables_t)
+ /usr/X11R6/lib/libGL\.so.* 		--	gen_context(system_u:object_r:textrel_shlib_t,s0)
+ /usr/X11R6/lib/libXvMCNVIDIA\.so.* 	--	gen_context(system_u:object_r:textrel_shlib_t,s0)
+@@ -257,6 +260,8 @@
+ /usr/lib(64)?/libdivxdecore\.so\.0	--	gen_context(system_u:object_r:textrel_shlib_t,s0)
+ /usr/lib(64)?/libdivxencore\.so\.0	--	gen_context(system_u:object_r:textrel_shlib_t,s0)
  
- init_use_fds(iptables_t)
- init_use_script_ptys(iptables_t)
-@@ -74,9 +75,15 @@
- sysnet_domtrans_ifconfig(iptables_t)
- sysnet_dns_name_resolve(iptables_t)
++/usr/lib(64)?/libdvdcss\.so.*  		--	gen_context(system_u:object_r:textrel_shlib_t,s0)
++
+ /usr/lib(64)?/python2.4/site-packages/M2Crypto/__m2crypto.so --	gen_context(system_u:object_r:textrel_shlib_t,s0)
  
-+selinux_get_fs_mount(iptables_t)
+ # vmware 
+@@ -309,3 +314,7 @@
+ /var/spool/postfix/lib(64)?/lib.*\.so.*	--	gen_context(system_u:object_r:shlib_t,s0)
+ /var/spool/postfix/lib(64)?/[^/]*/lib.*\.so.* -- gen_context(system_u:object_r:shlib_t,s0)
+ /var/spool/postfix/lib(64)?/devfsd/.+\.so.* --	gen_context(system_u:object_r:shlib_t,s0)
 +
- userdom_use_all_users_fds(iptables_t)
++/usr/lib/mozilla/plugins/libvlcplugin.so  --	gen_context(system_u:object_r:textrel_shlib_t,s0)
++/usr/lib64/mozilla/plugins/libvlcplugin.so  --	gen_context(system_u:object_r:textrel_shlib_t,s0)
++
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/libraries.te serefpolicy-3.0.1/policy/modules/system/libraries.te
+--- nsaserefpolicy/policy/modules/system/libraries.te	2007-06-15 14:54:34.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/libraries.te	2007-06-21 09:35:55.000000000 -0400
+@@ -97,6 +97,11 @@
+ 	')
+ ')
  
- optional_policy(`
-+	fail2ban_append_log(iptables_t)
++ifdef(`targeted_policy',`
++	allow ldconfig_t lib_t:file read_file_perms;
++	files_read_generic_tmp_symlinks(ldconfig_t)
 +')
 +
-+optional_policy(`
- 	firstboot_use_fds(iptables_t)
- 	firstboot_rw_pipes(iptables_t)
- ')
-@@ -105,3 +112,4 @@
  optional_policy(`
- 	udev_read_db(iptables_t)
+ 	# dontaudit access to /usr/lib/apache, normal programs cannot read these libs anyway
+ 	apache_dontaudit_search_modules(ldconfig_t)
+@@ -107,4 +112,6 @@
+ 	# and executes ldconfig on it.  If you dont allow this kernel installs 
+ 	# blow up.
+ 	rpm_manage_script_tmp_files(ldconfig_t)
++	# smart package manager needs the following for the same reason
++	rpm_rw_tmp_files(ldconfig_t)
  ')
-+
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/libraries.fc serefpolicy-3.0.1/policy/modules/system/libraries.fc
---- nsaserefpolicy/policy/modules/system/libraries.fc	2007-05-29 14:10:58.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/libraries.fc	2007-05-30 15:12:50.000000000 -0400
-@@ -134,11 +134,14 @@
- 
- /usr/lib/transgaming_cedega/gddb_parser.so --	gen_context(system_u:object_r:shlib_t,s0)
- /usr/lib/win32/.*			--	gen_context(system_u:object_r:shlib_t,s0)
-+/usr/lib/vlc/codec/libdmo_plugin.so	   --	gen_context(system_u:object_r:textrel_shlib_t,s0)
-+/usr/lib/vlc/codec/librealaudio_plugin.so  --	gen_context(system_u:object_r:textrel_shlib_t,s0)
- 
- /usr/(.*/)?lib(64)?(/.*)?/nvidia/.+\.so(\..*)? -- gen_context(system_u:object_r:textrel_shlib_t,s0)
- /usr/lib(64)?(/.*)?/nvidia/.+\.so(\..*)? --	gen_context(system_u:object_r:textrel_shlib_t,s0)
- /usr/lib(64)?/libsipphoneapi\.so.*	--	gen_context(system_u:object_r:textrel_shlib_t,s0)
- /usr/lib(64)?/ati-fglrx/.+\.so(\..*)?	--	gen_context(system_u:object_r:textrel_shlib_t,s0)
-+/usr/lib(64)?/xorg/libGL\.so(\.[^/]*)*	--	gen_context(system_u:object_r:textrel_shlib_t,s0)
- /usr/lib(64)?/(nvidia/)?libGL(core)?\.so(\.[^/]*)* -- gen_context(system_u:object_r:textrel_shlib_t,s0)
- /usr/lib(64)?/fglrx/libGL\.so(\.[^/]*)*	--	gen_context(system_u:object_r:textrel_shlib_t,s0)
- /usr/lib(64)?/libGLU\.so(\.[^/]*)*	--	gen_context(system_u:object_r:textrel_shlib_t,s0)
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/libraries.te serefpolicy-3.0.1/policy/modules/system/libraries.te
---- nsaserefpolicy/policy/modules/system/libraries.te	2007-05-29 14:10:58.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/libraries.te	2007-05-30 15:12:50.000000000 -0400
-@@ -62,7 +62,8 @@
- 
- manage_dirs_pattern(ldconfig_t,ldconfig_tmp_t,ldconfig_tmp_t)
- manage_files_pattern(ldconfig_t,ldconfig_tmp_t,ldconfig_tmp_t)
--files_tmp_filetrans(ldconfig_t, ldconfig_tmp_t, { file dir })
-+manage_lnk_files_pattern(ldconfig_t,ldconfig_tmp_t,ldconfig_tmp_t)
-+files_tmp_filetrans(ldconfig_t, ldconfig_tmp_t, { file dir lnk_file })
- 
- manage_lnk_files_pattern(ldconfig_t,lib_t,lib_t)
- 
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/locallogin.te serefpolicy-3.0.1/policy/modules/system/locallogin.te
---- nsaserefpolicy/policy/modules/system/locallogin.te	2007-05-29 14:10:58.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/locallogin.te	2007-05-31 14:36:02.000000000 -0400
+--- nsaserefpolicy/policy/modules/system/locallogin.te	2007-06-11 16:05:30.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/locallogin.te	2007-06-19 17:06:27.000000000 -0400
 @@ -48,6 +48,8 @@
  allow local_login_t self:msgq create_msgq_perms;
  allow local_login_t self:msg { send receive };
@@ -7324,18 +8217,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/locall
  auth_rw_login_records(local_login_t)
  auth_rw_faillog(local_login_t)
  auth_manage_pam_console_data(local_login_t)
-@@ -138,10 +149,6 @@
- userdom_sigchld_all_users(local_login_t)
- userdom_create_all_users_keys(local_login_t)
- 
--ifdef(`targeted_policy',`
--	unconfined_shell_domtrans(local_login_t)
--')
--
- tunable_policy(`read_default_t',`
- 	files_list_default(local_login_t)
- 	files_read_default_files(local_login_t)
-@@ -165,6 +172,15 @@
+@@ -161,6 +172,15 @@
  ')
  
  optional_policy(`
@@ -7351,10 +8233,11 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/locall
  	gpm_getattr_gpmctl(local_login_t)
  	gpm_setattr_gpmctl(local_login_t)
  ')
-@@ -184,12 +200,18 @@
+@@ -179,13 +199,18 @@
+ ')
  
  optional_policy(`
- 	unconfined_domain(local_login_t)
+-	unconfined_domain(local_login_t)
 +	unconfined_shell_domtrans(local_login_t)
  ')
  
@@ -7370,10 +8253,34 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/locall
  #################################
  # 
  # Sulogin local policy
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/logging.fc serefpolicy-3.0.1/policy/modules/system/logging.fc
+--- nsaserefpolicy/policy/modules/system/logging.fc	2007-05-29 14:10:58.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/logging.fc	2007-06-20 07:06:30.000000000 -0400
+@@ -43,3 +43,5 @@
+ /var/spool/postfix/pid	-d	gen_context(system_u:object_r:var_run_t,s0)
+ 
+ /var/tinydns/log/main(/.*)?	gen_context(system_u:object_r:var_log_t,s0)
++
++/var/log/syslog-ng(/.*)?	--	gen_context(system_u:object_r:syslogd_var_run_t,s0)
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/logging.if serefpolicy-3.0.1/policy/modules/system/logging.if
---- nsaserefpolicy/policy/modules/system/logging.if	2007-05-29 14:10:58.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/logging.if	2007-05-30 15:12:50.000000000 -0400
-@@ -223,6 +223,25 @@
+--- nsaserefpolicy/policy/modules/system/logging.if	2007-06-15 14:54:34.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/logging.if	2007-06-19 17:06:27.000000000 -0400
+@@ -33,8 +33,13 @@
+ ## </param>
+ #
+ interface(`logging_send_audit_msgs',`
++	gen_require(`
++		attribute can_send_audit_msg;
++	')
++
++	typeattribute $1 can_send_audit_msg;
+ 	allow $1 self:capability audit_write;
+-	allow $1 self:netlink_audit_socket { create_netlink_socket_perms nlmsg_relay };
++	allow $1 self:netlink_audit_socket { r_netlink_socket_perms nlmsg_relay };
+ ')
+ 
+ ########################################
+@@ -238,6 +243,25 @@
  
  ########################################
  ## <summary>
@@ -7399,7 +8306,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/loggin
  ##	Create an object in the log directory, with a private
  ##	type using a type transition.
  ## </summary>
-@@ -302,6 +321,25 @@
+@@ -317,6 +341,25 @@
  
  ########################################
  ## <summary>
@@ -7425,7 +8332,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/loggin
  ##	Allows the domain to open a file in the
  ##	log directory, but does not allow the listing
  ##	of the contents of the log directory.
-@@ -436,7 +474,7 @@
+@@ -451,7 +494,7 @@
  
  	files_search_var($1)
  	allow $1 var_log_t:dir list_dir_perms;
@@ -7434,7 +8341,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/loggin
  ')
  
  ########################################
-@@ -480,6 +518,8 @@
+@@ -495,6 +538,8 @@
  	files_search_var($1)
  	manage_files_pattern($1,logfile,logfile)
  	read_lnk_files_pattern($1,logfile,logfile)
@@ -7443,33 +8350,13 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/loggin
  ')
  
  ########################################
-@@ -563,3 +603,121 @@
+@@ -578,3 +623,101 @@
  	files_search_var($1)
  	manage_files_pattern($1,var_log_t,var_log_t)
  ')
 +
 +########################################
 +## <summary>
-+##	Send audit messages
-+## </summary>
-+## <param name="domain">
-+##	<summary>
-+##	Domain allowed access.
-+##	</summary>
-+## </param>
-+#
-+interface(`logging_send_audit_msg',`
-+	gen_require(`
-+		attribute can_send_audit_msg;
-+	')
-+
-+	typeattribute $1 can_send_audit_msg;
-+	allow $1 self:capability audit_write;
-+	allow $1 self:netlink_audit_socket { create_socket_perms nlmsg_read nlmsg_relay };
-+')
-+
-+########################################
-+## <summary>
 +##	Set login uid
 +## </summary>
 +## <param name="domain">
@@ -7487,7 +8374,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/loggin
 +	typeattribute $1 can_set_loginuid, can_send_audit_msg;
 +
 +	allow $1 self:capability audit_control;
-+	allow $1 self:netlink_audit_socket { create_socket_perms nlmsg_read nlmsg_relay };
++	allow $1 self:netlink_audit_socket { r_netlink_socket_perms nlmsg_relay };
 +')
 +
 +########################################
@@ -7508,7 +8395,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/loggin
 +
 +	typeattribute $1  can_set_audit, can_send_audit_msg;
 +	allow $1 self:capability { audit_write audit_control };
-+	allow $1 self:netlink_audit_socket { create_socket_perms nlmsg_read nlmsg_write nlmsg_relay };
++	allow $1 self:netlink_audit_socket { create_netlink_socket_perms nlmsg_relay };
 +')
 +
 +########################################
@@ -7566,8 +8453,8 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/loggin
 +')
 +
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/logging.te serefpolicy-3.0.1/policy/modules/system/logging.te
---- nsaserefpolicy/policy/modules/system/logging.te	2007-05-29 14:10:58.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/logging.te	2007-05-30 17:30:40.000000000 -0400
+--- nsaserefpolicy/policy/modules/system/logging.te	2007-06-15 14:54:33.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/logging.te	2007-06-20 07:06:09.000000000 -0400
 @@ -7,10 +7,15 @@
  #
  
@@ -7584,7 +8471,17 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/loggin
  role system_r types auditctl_t;
  
  type auditd_etc_t;
-@@ -59,14 +64,17 @@
+@@ -48,6 +53,9 @@
+ type syslogd_tmp_t;
+ files_tmp_file(syslogd_tmp_t)
+ 
++type syslogd_var_lib_t;
++files_type(syslogd_var_lib_t)
++
+ type syslogd_var_run_t;
+ files_pid_file(syslogd_var_run_t)
+ 
+@@ -59,14 +67,17 @@
  	init_ranged_daemon_domain(auditd_t,auditd_exec_t,mls_systemhigh)
  ')
  
@@ -7605,7 +8502,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/loggin
  read_files_pattern(auditctl_t,auditd_etc_t,auditd_etc_t)
  allow auditctl_t auditd_etc_t:dir list_dir_perms;
  
-@@ -91,6 +99,7 @@
+@@ -91,6 +102,7 @@
  
  locallogin_dontaudit_use_fds(auditctl_t)
  
@@ -7613,7 +8510,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/loggin
  logging_send_syslog_msg(auditctl_t)
  
  ########################################
-@@ -98,12 +107,11 @@
+@@ -98,12 +110,11 @@
  # Auditd local policy
  #
  
@@ -7627,7 +8524,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/loggin
  allow auditd_t self:fifo_file rw_file_perms;
  
  allow auditd_t auditd_etc_t:dir list_dir_perms;
-@@ -141,6 +149,7 @@
+@@ -141,6 +152,7 @@
  
  init_telinit(auditd_t)
  
@@ -7635,7 +8532,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/loggin
  logging_send_syslog_msg(auditd_t)
  
  libs_use_ld_so(auditd_t)
-@@ -157,6 +166,8 @@
+@@ -157,6 +169,8 @@
  
  userdom_dontaudit_use_unpriv_user_fds(auditd_t)
  userdom_dontaudit_search_sysadm_home_dirs(auditd_t)
@@ -7644,7 +8541,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/loggin
  
  optional_policy(`
  	seutil_sigchld_newrole(auditd_t)
-@@ -249,6 +260,10 @@
+@@ -249,6 +263,10 @@
  
  # create/append log files.
  manage_files_pattern(syslogd_t,var_log_t,var_log_t)
@@ -7655,7 +8552,17 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/loggin
  # Allow access for syslog-ng
  allow syslogd_t var_log_t:dir { create setattr };
  
-@@ -313,6 +328,7 @@
+@@ -257,6 +275,9 @@
+ manage_files_pattern(syslogd_t,syslogd_tmp_t,syslogd_tmp_t)
+ files_tmp_filetrans(syslogd_t,syslogd_tmp_t,{ dir file })
+ 
++files_search_var_lib(syslogd_t)
++manage_files_pattern(syslogd_t,syslogd_var_lib_t,syslogd_var_lib_t)
++
+ allow syslogd_t syslogd_var_run_t:file manage_file_perms;
+ files_pid_filetrans(syslogd_t,syslogd_var_run_t,file)
+ 
+@@ -313,6 +334,7 @@
  domain_use_interactive_fds(syslogd_t)
  
  files_read_etc_files(syslogd_t)
@@ -7663,17 +8570,9 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/loggin
  files_read_etc_runtime_files(syslogd_t)
  # /initrd is not umounted before minilog starts
  files_dontaudit_search_isid_type_dirs(syslogd_t)
-@@ -342,6 +358,7 @@
- 	files_var_lib_filetrans(syslogd_t,devlog_t,sock_file)
- ')
- 
-+
- optional_policy(`
- 	inn_manage_log(syslogd_t)
- ')
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/lvm.fc serefpolicy-3.0.1/policy/modules/system/lvm.fc
 --- nsaserefpolicy/policy/modules/system/lvm.fc	2007-05-29 14:10:58.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/lvm.fc	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/lvm.fc	2007-06-19 17:06:27.000000000 -0400
 @@ -15,6 +15,7 @@
  #
  /etc/lvm(/.*)?			gen_context(system_u:object_r:lvm_etc_t,s0)
@@ -7684,7 +8583,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/lvm.fc
  /etc/lvm/lock(/.*)?		gen_context(system_u:object_r:lvm_lock_t,s0)
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/lvm.te serefpolicy-3.0.1/policy/modules/system/lvm.te
 --- nsaserefpolicy/policy/modules/system/lvm.te	2007-05-29 14:10:58.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/lvm.te	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/lvm.te	2007-06-19 17:06:27.000000000 -0400
 @@ -16,6 +16,7 @@
  type lvm_t;
  type lvm_exec_t;
@@ -7737,10 +8636,41 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/lvm.te
 +	xen_dontaudit_rw_unix_stream_sockets(lvm_t)
 +')
 +
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/miscfiles.fc serefpolicy-3.0.1/policy/modules/system/miscfiles.fc
+--- nsaserefpolicy/policy/modules/system/miscfiles.fc	2007-05-29 14:10:58.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/miscfiles.fc	2007-06-21 06:25:16.000000000 -0400
+@@ -66,6 +66,7 @@
+ /var/lib/texmf(/.*)?		gen_context(system_u:object_r:tetex_data_t,s0)
+ 
+ /var/cache/fonts(/.*)?		gen_context(system_u:object_r:tetex_data_t,s0)
++/var/cache/fontconfig(/.*)?	gen_context(system_u:object_r:fonts_t,s0)
+ /var/cache/man(/.*)?		gen_context(system_u:object_r:man_t,s0)
+ 
+ /var/spool/texmf(/.*)?		gen_context(system_u:object_r:tetex_data_t,s0)
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/modutils.te serefpolicy-3.0.1/policy/modules/system/modutils.te
 --- nsaserefpolicy/policy/modules/system/modutils.te	2007-05-29 14:10:58.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/modutils.te	2007-05-30 15:12:50.000000000 -0400
-@@ -102,6 +102,7 @@
++++ serefpolicy-3.0.1/policy/modules/system/modutils.te	2007-06-19 17:06:27.000000000 -0400
+@@ -43,7 +43,7 @@
+ # insmod local policy
+ #
+ 
+-allow insmod_t self:capability { dac_override net_raw sys_tty_config };
++allow insmod_t self:capability { dac_override mknod net_raw sys_tty_config };
+ allow insmod_t self:process { execmem sigchld sigkill sigstop signull signal };
+ 
+ allow insmod_t self:udp_socket create_socket_perms; 
+@@ -77,9 +77,7 @@
+ dev_read_sound(insmod_t)
+ dev_write_sound(insmod_t)
+ dev_rw_apm_bios(insmod_t)
+-# cjp: why is this needed?  insmod cannot mounton any dir
+-# and it also transitions to mount
+-dev_mount_usbfs(insmod_t)
++dev_create_generic_chr_files(insmod_t)
+ 
+ fs_getattr_xattr_fs(insmod_t)
+ 
+@@ -102,6 +100,7 @@
  init_use_fds(insmod_t)
  init_use_script_fds(insmod_t)
  init_use_script_ptys(insmod_t)
@@ -7748,7 +8678,14 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/moduti
  
  libs_use_ld_so(insmod_t)
  libs_use_shared_libs(insmod_t)
-@@ -118,6 +119,18 @@
+@@ -113,11 +112,25 @@
+ 
+ seutil_read_file_contexts(insmod_t)
+ 
++term_dontaudit_use_unallocated_ttys(insmod_t)
++
+ if( ! secure_mode_insmod ) {
+ 	kernel_domtrans_to(insmod_t,insmod_exec_t)
  }
  
  optional_policy(`
@@ -7783,9 +8720,22 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/moduti
  
  fs_getattr_xattr_fs(depmod_t)
  
+@@ -206,9 +221,12 @@
+ userdom_read_staff_home_content_files(depmod_t)
+ userdom_read_sysadm_home_content_files(depmod_t)
+ 
++userdom_dontaudit_use_sysadm_terms(depmod_t)
++
+ optional_policy(`
+ 	# Read System.map from home directories.
+ 	unconfined_read_home_content_files(depmod_t)
++	unconfined_dontaudit_use_terminals(depmod_t)
+ ')
+ 
+ optional_policy(`
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/mount.fc serefpolicy-3.0.1/policy/modules/system/mount.fc
 --- nsaserefpolicy/policy/modules/system/mount.fc	2007-05-29 14:10:58.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/mount.fc	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/mount.fc	2007-06-19 17:06:27.000000000 -0400
 @@ -1,4 +1,3 @@
  /bin/mount.*			--	gen_context(system_u:object_r:mount_exec_t,s0)
  /bin/umount.*			--	gen_context(system_u:object_r:mount_exec_t,s0)
@@ -7793,16 +8743,11 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/mount.
 -/usr/bin/fusermount		--	gen_context(system_u:object_r:mount_exec_t,s0)
 +/sbin/mount.ntfs-3g		--	gen_context(system_u:object_r:mount_ntfs_exec_t,s0)
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/mount.if serefpolicy-3.0.1/policy/modules/system/mount.if
---- nsaserefpolicy/policy/modules/system/mount.if	2007-05-29 14:10:58.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/mount.if	2007-05-30 15:12:50.000000000 -0400
-@@ -143,8 +143,42 @@
- 		allow unconfined_mount_t $1:fd use;
- 		allow unconfined_mount_t $1:fifo_file rw_file_perms;
- 		allow unconfined_mount_t $1:process sigchld;
--# cjp: require in the else doesnt work
--#	',`
--#		mount_domtrans($1)
- 	')
+--- nsaserefpolicy/policy/modules/system/mount.if	2007-06-11 16:05:30.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/mount.if	2007-06-19 17:06:27.000000000 -0400
+@@ -171,3 +171,40 @@
+ 	role $2 types unconfined_mount_t;
+ 	allow unconfined_mount_t $3:chr_file rw_file_perms;
  ')
 +
 +########################################
@@ -7842,8 +8787,8 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/mount.
 +	allow $1 mount_ntfs_t:unix_stream_socket { read write };
 +')
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/mount.te serefpolicy-3.0.1/policy/modules/system/mount.te
---- nsaserefpolicy/policy/modules/system/mount.te	2007-05-29 14:10:58.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/mount.te	2007-05-30 17:17:50.000000000 -0400
+--- nsaserefpolicy/policy/modules/system/mount.te	2007-06-11 16:05:30.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/mount.te	2007-06-19 17:06:27.000000000 -0400
 @@ -8,6 +8,13 @@
  
  ## <desc>
@@ -7858,7 +8803,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/mount.
  ## Allow mount to mount any file
  ## </p>
  ## </desc>
-@@ -16,21 +23,30 @@
+@@ -16,20 +23,23 @@
  type mount_t;
  type mount_exec_t;
  init_system_domain(mount_t,mount_exec_t)
@@ -7875,13 +8820,17 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/mount.
  type mount_tmp_t;
  files_tmp_file(mount_tmp_t)
  
-+type unconfined_mount_t;
-+domain_type(unconfined_mount_t)
-+domain_entry_file(unconfined_mount_t,mount_exec_t)
-+
+-# causes problems with interfaces when
+-# this is optionally declared in monolithic
+-# policy--duplicate type declaration
+ type unconfined_mount_t;
+ domain_type(unconfined_mount_t)
+ domain_entry_file(unconfined_mount_t,mount_exec_t)
++role system_r types unconfined_mount_t;
+ 
  ########################################
  #
- # mount local policy
+@@ -37,7 +47,7 @@
  #
  
  # setuid/setgid needed to mount cifs 
@@ -7890,15 +8839,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/mount.
  
  allow mount_t mount_loopback_t:file read_file_perms;
  allow mount_t self:netlink_route_socket r_netlink_socket_perms;
-@@ -108,6 +124,7 @@
- 
- sysnet_use_portmap(mount_t)
- 
-+selinux_get_fs_mount(mount_t)
- selinux_get_enforce_mode(mount_t)
- seutil_read_config(mount_t)
- 
-@@ -121,10 +138,15 @@
+@@ -128,10 +138,15 @@
  	')
  ')
  
@@ -7915,16 +8856,13 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/mount.
  ')
  
  optional_policy(`
-@@ -192,10 +214,52 @@
- #
- 
+@@ -201,4 +216,53 @@
  optional_policy(`
--	type unconfined_mount_t;
--	domain_type(unconfined_mount_t)
--	domain_entry_file(unconfined_mount_t,mount_exec_t)
--
  	files_etc_filetrans_etc_runtime(unconfined_mount_t,file)
  	unconfined_domain(unconfined_mount_t)
++	optional_policy(`
++		hal_dbus_chat(unconfined_mount_t)
++	')
  ')
 +
 +########################################
@@ -7974,7 +8912,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/mount.
 +
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/netlabel.te serefpolicy-3.0.1/policy/modules/system/netlabel.te
 --- nsaserefpolicy/policy/modules/system/netlabel.te	2007-05-29 14:10:58.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/netlabel.te	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/netlabel.te	2007-06-19 17:06:27.000000000 -0400
 @@ -20,6 +20,8 @@
  allow netlabel_mgmt_t self:capability net_admin;
  allow netlabel_mgmt_t self:netlink_socket create_socket_perms;
@@ -7985,8 +8923,8 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/netlab
  
  libs_use_ld_so(netlabel_mgmt_t)
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/raid.te serefpolicy-3.0.1/policy/modules/system/raid.te
---- nsaserefpolicy/policy/modules/system/raid.te	2007-05-29 14:10:58.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/raid.te	2007-05-30 15:12:50.000000000 -0400
+--- nsaserefpolicy/policy/modules/system/raid.te	2007-06-15 14:54:34.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/raid.te	2007-06-19 17:06:27.000000000 -0400
 @@ -19,7 +19,7 @@
  # Local policy
  #
@@ -7996,17 +8934,9 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/raid.t
  dontaudit mdadm_t self:capability sys_tty_config;
  allow mdadm_t self:process { sigchld sigkill sigstop signull signal };
  allow mdadm_t self:fifo_file rw_fifo_file_perms;
-@@ -46,6 +46,7 @@
- # RAID block device access
- storage_manage_fixed_disk(mdadm_t)
- storage_dev_filetrans_fixed_disk(mdadm_t)
-+storage_read_scsi_generic(mdadm_t)
- 
- term_dontaudit_list_ptys(mdadm_t)
- 
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/selinuxutil.fc serefpolicy-3.0.1/policy/modules/system/selinuxutil.fc
 --- nsaserefpolicy/policy/modules/system/selinuxutil.fc	2007-05-30 11:47:29.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/selinuxutil.fc	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/selinuxutil.fc	2007-06-19 17:06:27.000000000 -0400
 @@ -40,6 +40,7 @@
  /usr/sbin/setfiles.*		--	gen_context(system_u:object_r:setfiles_exec_t,s0)
  /usr/sbin/setsebool		--	gen_context(system_u:object_r:semanage_exec_t,s0)
@@ -8017,7 +8947,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/selinu
  #
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/selinuxutil.if serefpolicy-3.0.1/policy/modules/system/selinuxutil.if
 --- nsaserefpolicy/policy/modules/system/selinuxutil.if	2007-05-30 11:47:29.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/selinuxutil.if	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/selinuxutil.if	2007-06-19 17:06:27.000000000 -0400
 @@ -432,6 +432,7 @@
  	role $2 types run_init_t;
  	allow run_init_t $3:chr_file rw_term_perms;
@@ -8028,7 +8958,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/selinu
  ########################################
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/selinuxutil.te serefpolicy-3.0.1/policy/modules/system/selinuxutil.te
 --- nsaserefpolicy/policy/modules/system/selinuxutil.te	2007-05-30 11:47:29.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/selinuxutil.te	2007-05-31 11:09:22.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/selinuxutil.te	2007-06-19 17:06:27.000000000 -0400
 @@ -24,11 +24,9 @@
  files_type(selinux_config_t)
  
@@ -8043,7 +8973,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/selinu
  
  #
  # default_context_t is the type applied to
-@@ -81,25 +79,27 @@
+@@ -81,23 +79,20 @@
  type restorecond_exec_t;
  init_daemon_domain(restorecond_t,restorecond_exec_t)
  domain_obj_id_change_exemption(restorecond_t)
@@ -8070,30 +9000,8 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/selinu
 +domain_interactive_fd(semanage_t)
  role system_r types semanage_t;
  
-+ifdef(`targeted_policy',`
-+init_use_fds(semanage_t)
-+init_system_domain(semanage_t, semanage_exec_t)
-+')
-+
  type semanage_store_t;
- files_type(semanage_store_t)
- 
-@@ -113,9 +113,12 @@
- files_type(semanage_trans_lock_t)
- 
- type setfiles_t alias restorecon_t, can_relabelto_binary_policy;
--type setfiles_exec_t alias restorecon_exec_t;
--init_system_domain(setfiles_t,setfiles_exec_t)
- domain_obj_id_change_exemption(setfiles_t)
-+domain_type(setfiles_t)
-+role system_r types setfiles_t;
-+
-+type setfiles_exec_t alias restorecon_exec_t;
-+domain_entry_file(setfiles_t,setfiles_exec_t)
- 
- ifdef(`distro_redhat',`
- 	init_system_domain(setfiles_t,setfiles_exec_t)
-@@ -157,6 +160,11 @@
+@@ -157,6 +152,11 @@
  
  userdom_use_all_users_fds(checkpolicy_t)
  
@@ -8105,7 +9013,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/selinu
  ########################################
  #
  # Load_policy local policy
-@@ -179,6 +187,7 @@
+@@ -179,6 +179,7 @@
  fs_getattr_xattr_fs(load_policy_t)
  
  mls_file_read_up(load_policy_t)
@@ -8113,7 +9021,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/selinu
  
  selinux_get_fs_mount(load_policy_t)
  selinux_load_policy(load_policy_t)
-@@ -201,10 +210,15 @@
+@@ -201,10 +202,15 @@
  	# cjp: cover up stray file descriptors.
  	dontaudit load_policy_t selinux_config_t:file write;
  	optional_policy(`
@@ -8130,33 +9038,43 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/selinu
  ########################################
  #
  # Newrole local policy
-@@ -222,7 +236,7 @@
+@@ -222,7 +228,7 @@
  allow newrole_t self:msg { send receive };
  allow newrole_t self:unix_dgram_socket sendto;
  allow newrole_t self:unix_stream_socket { create_stream_socket_perms connectto };
 -allow newrole_t self:netlink_audit_socket { create_netlink_socket_perms nlmsg_relay };
-+logging_send_audit_msg(newrole_t)
++logging_send_audit_msgs(newrole_t)
  
  read_files_pattern(newrole_t,selinux_config_t,selinux_config_t)
  read_lnk_files_pattern(newrole_t,selinux_config_t,selinux_config_t)
-@@ -260,6 +274,7 @@
+@@ -260,7 +266,9 @@
  term_dontaudit_use_unallocated_ttys(newrole_t)
  
  auth_domtrans_chk_passwd(newrole_t)
 +auth_domtrans_upd_passwd(newrole_t)
  auth_rw_faillog(newrole_t)
++auth_search_key(newrole_t)
  
  corecmd_list_bin(newrole_t)
-@@ -368,7 +383,7 @@
+ corecmd_read_bin_symlinks(newrole_t)
+@@ -280,6 +288,7 @@
+ libs_use_ld_so(newrole_t)
+ libs_use_shared_libs(newrole_t)
+ 
++logging_send_audit_msgs(newrole_t)
+ logging_send_syslog_msg(newrole_t)
+ 
+ miscfiles_read_localization(newrole_t)
+@@ -368,7 +377,7 @@
  allow run_init_t self:process setexec;
  allow run_init_t self:capability setuid;
  allow run_init_t self:fifo_file rw_file_perms;
 -allow run_init_t self:netlink_audit_socket { create_netlink_socket_perms nlmsg_relay };
-+logging_send_audit_msg(run_init_t)
++logging_send_audit_msgs(run_init_t)
  
  # often the administrator runs such programs from a directory that is owned
  # by a different user or has restrictive SE permissions, do not want to audit
-@@ -382,6 +397,7 @@
+@@ -382,6 +391,7 @@
  term_dontaudit_list_ptys(run_init_t)
  
  auth_domtrans_chk_passwd(run_init_t)
@@ -8164,16 +9082,16 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/selinu
  auth_dontaudit_read_shadow(run_init_t)
  
  corecmd_exec_bin(run_init_t)
-@@ -438,7 +454,7 @@
+@@ -438,7 +448,7 @@
  allow semanage_t self:capability { dac_override audit_write };
  allow semanage_t self:unix_stream_socket create_stream_socket_perms;
  allow semanage_t self:unix_dgram_socket create_socket_perms;
 -allow semanage_t self:netlink_audit_socket { create_netlink_socket_perms nlmsg_relay };
-+logging_send_audit_msg(semanage_t)
++logging_send_audit_msgs(semanage_t)
  
  allow semanage_t policy_config_t:file { read write };
  
-@@ -449,7 +465,10 @@
+@@ -449,7 +459,10 @@
  kernel_read_system_state(semanage_t)
  kernel_read_kernel_sysctls(semanage_t)
  
@@ -8184,15 +9102,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/selinu
  
  dev_read_urand(semanage_t)
  
-@@ -464,6 +483,7 @@
- mls_rangetrans_target(semanage_t)
- mls_file_read_up(semanage_t)
- 
-+selinux_get_fs_mount(semanage_t)
- selinux_validate_context(semanage_t)
- selinux_get_enforce_mode(semanage_t)
- # for setsebool:
-@@ -473,6 +493,8 @@
+@@ -473,6 +486,8 @@
  
  # Running genhomedircon requires this for finding all users
  auth_use_nsswitch(semanage_t)
@@ -8201,7 +9111,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/selinu
  
  libs_use_ld_so(semanage_t)
  libs_use_shared_libs(semanage_t)
-@@ -497,6 +519,17 @@
+@@ -497,6 +512,17 @@
  # netfilter_contexts:
  seutil_manage_default_contexts(semanage_t)
  
@@ -8219,7 +9129,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/selinu
  # cjp: need a more general way to handle this:
  ifdef(`enable_mls',`
  	# read secadm tmp files
-@@ -504,11 +537,6 @@
+@@ -504,11 +530,6 @@
  	# Handle pp files created in homedir and /tmp
  	userdom_read_sysadm_home_content_files(semanage_t)
  	userdom_read_sysadm_tmp_files(semanage_t)
@@ -8231,7 +9141,16 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/selinu
  ')
  
  ########################################
-@@ -534,12 +562,15 @@
+@@ -524,6 +545,8 @@
+ allow setfiles_t { policy_src_t policy_config_t file_context_t selinux_config_t default_context_t }:file r_file_perms;
+ allow setfiles_t { policy_src_t policy_config_t file_context_t selinux_config_t default_context_t }:lnk_file r_file_perms;
+ 
++logging_send_audit_msgs(setfiles_t)
++
+ kernel_read_system_state(setfiles_t)
+ kernel_relabelfrom_unlabeled_dirs(setfiles_t)
+ kernel_relabelfrom_unlabeled_files(setfiles_t)
+@@ -534,12 +557,15 @@
  kernel_rw_pipes(setfiles_t)
  kernel_rw_unix_dgram_sockets(setfiles_t)
  kernel_dontaudit_list_all_proc(setfiles_t)
@@ -8247,20 +9166,32 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/selinu
  fs_search_auto_mountpoints(setfiles_t)
  fs_relabelfrom_noxattr_fs(setfiles_t)
  
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/setrans.te serefpolicy-3.0.1/policy/modules/system/setrans.te
---- nsaserefpolicy/policy/modules/system/setrans.te	2007-05-29 14:10:58.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/setrans.te	2007-05-30 16:52:20.000000000 -0400
-@@ -61,6 +61,7 @@
- mls_socket_read_all_levels(setrans_t)
- mls_fd_use_all_levels(setrans_t)
+@@ -595,6 +621,10 @@
+ 
+ ifdef(`hide_broken_symptoms',`
+ 	optional_policy(`
++		ppp_dontaudit_use_fds(setfiles_t)
++	')
++
++	optional_policy(`
+ 		udev_dontaudit_rw_dgram_sockets(setfiles_t)
+ 	')
+ 
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/sysnetwork.if serefpolicy-3.0.1/policy/modules/system/sysnetwork.if
+--- nsaserefpolicy/policy/modules/system/sysnetwork.if	2007-05-29 14:10:58.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/sysnetwork.if	2007-06-22 11:38:09.000000000 -0400
+@@ -520,6 +520,8 @@
  
-+selinux_get_fs_mount(setrans_t)
- selinux_compute_access_vector(setrans_t)
+ 	files_search_etc($1)
+ 	allow $1 net_conf_t:file read_file_perms;
++	# LDAP Configuration using encrypted requires
++	dev_read_urand($1)
+ ')
  
- term_dontaudit_use_generic_ptys(setrans_t)
+ ########################################
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/sysnetwork.te serefpolicy-3.0.1/policy/modules/system/sysnetwork.te
 --- nsaserefpolicy/policy/modules/system/sysnetwork.te	2007-05-29 14:10:58.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/sysnetwork.te	2007-05-31 11:13:31.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/sysnetwork.te	2007-06-19 17:06:27.000000000 -0400
 @@ -158,6 +158,10 @@
  	dbus_connect_system_bus(dhcpc_t)
  	dbus_send_system_bus(dhcpc_t)
@@ -8272,7 +9203,15 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/sysnet
  	optional_policy(`
  		networkmanager_dbus_chat(dhcpc_t)
  	')
-@@ -215,6 +219,7 @@
+@@ -205,6 +209,7 @@
+ 	# dhclient sometimes starts ntpd
+ 	init_exec_script_files(dhcpc_t)
+ 	ntp_domtrans(dhcpc_t)
++	ntp_domtrans_ntpdate(dhcpc_t)
+ ')
+ 
+ optional_policy(`
+@@ -215,6 +220,7 @@
  optional_policy(`
  	seutil_sigchld_newrole(dhcpc_t)
  	seutil_dontaudit_search_config(dhcpc_t)
@@ -8280,7 +9219,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/sysnet
  ')
  
  optional_policy(`
-@@ -279,6 +284,8 @@
+@@ -279,6 +285,8 @@
  fs_getattr_xattr_fs(ifconfig_t)
  fs_search_auto_mountpoints(ifconfig_t)
  
@@ -8291,16 +9230,25 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/sysnet
  
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/udev.te serefpolicy-3.0.1/policy/modules/system/udev.te
 --- nsaserefpolicy/policy/modules/system/udev.te	2007-05-30 11:47:29.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/udev.te	2007-05-30 15:12:50.000000000 -0400
-@@ -83,12 +83,19 @@
++++ serefpolicy-3.0.1/policy/modules/system/udev.te	2007-06-22 11:39:51.000000000 -0400
+@@ -68,8 +68,9 @@
+ allow udev_t udev_tbl_t:file manage_file_perms;
+ dev_filetrans(udev_t,udev_tbl_t,file)
+ 
++manage_dirs_pattern(udev_t,udev_var_run_t,udev_var_run_t)
+ manage_files_pattern(udev_t,udev_var_run_t,udev_var_run_t)
+-files_pid_filetrans(udev_t,udev_var_run_t,file)
++files_pid_filetrans(udev_t,udev_var_run_t,{ file dir })
+ 
+ kernel_read_system_state(udev_t)
+ kernel_getattr_core_if(udev_t)
+@@ -83,16 +84,22 @@
  kernel_dgram_send(udev_t)
  kernel_signal(udev_t)
  
 +#https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=235182
-+kernel_read_net_sysctls(udev_t)
++kernel_rw_net_sysctls(udev_t)
 +kernel_read_network_state(udev_t)
-+sysnet_read_dhcpc_pid(udev_t)
-+sysnet_delete_dhcpc_pid(udev_t)
 +
  corecmd_exec_all_executables(udev_t)
  
@@ -8312,15 +9260,29 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/udev.t
  
  domain_read_all_domains_state(udev_t)
  domain_dontaudit_ptrace_all_domains(udev_t) #pidof triggers these 
-@@ -145,6 +152,7 @@
+ 
++files_read_usr_files(udev_t)
+ files_read_etc_runtime_files(udev_t)
+ files_read_etc_files(udev_t)
+ files_exec_etc_files(udev_t)
+@@ -142,9 +149,16 @@
+ seutil_read_file_contexts(udev_t)
+ seutil_domtrans_setfiles(udev_t)
+ 
++sysnet_read_dhcpc_pid(udev_t)
++sysnet_rw_dhcp_config(udev_t)
++sysnet_delete_dhcpc_pid(udev_t)
  sysnet_domtrans_ifconfig(udev_t)
  sysnet_domtrans_dhcpc(udev_t)
++sysnet_signal_dhcpc(udev_t)
++sysnet_etc_filetrans_config(udev_t)
++sysnet_manage_config(udev_t)
  
 +userdom_use_sysadm_ttys(udev_t)
  userdom_dontaudit_search_all_users_home_content(udev_t)
  
  ifdef(`distro_gentoo',`
-@@ -188,5 +196,24 @@
+@@ -188,5 +202,24 @@
  ')
  
  optional_policy(`
@@ -8334,7 +9296,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/udev.t
 +')
 +
 +optional_policy(`
-+	xen_append_log(udev_t)
++	xen_manage_log(udev_t)
 +	kernel_write_xen_state(udev_t)
 +	kernel_read_xen_state(udev_t)
 +	xen_read_image_files(udev_t)
@@ -8346,8 +9308,8 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/udev.t
 +
 +
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/unconfined.if serefpolicy-3.0.1/policy/modules/system/unconfined.if
---- nsaserefpolicy/policy/modules/system/unconfined.if	2007-05-29 14:10:58.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/unconfined.if	2007-05-31 07:24:57.000000000 -0400
+--- nsaserefpolicy/policy/modules/system/unconfined.if	2007-06-15 14:54:34.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/unconfined.if	2007-06-22 11:17:20.000000000 -0400
 @@ -12,14 +12,13 @@
  #
  interface(`unconfined_domain_noaudit',`
@@ -8390,7 +9352,16 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/unconf
  		nscd_unconfined($1)
  	')
  
-@@ -601,3 +604,39 @@
+@@ -558,7 +561,7 @@
+ 	')
+ 
+ 	files_search_home($1)
+-	allow $1 { unconfined_home_dir_t unconfined_home_t }:dir list_dir_perms;
++	allow $1 { unconfined_home_dir_t sysadm_home_t }:dir list_dir_perms;
+ 	read_files_pattern($1,{ unconfined_home_dir_t unconfined_home_t },unconfined_home_t)
+ 	read_lnk_files_pattern($1,{ unconfined_home_dir_t unconfined_home_t },unconfined_home_t)
+ ')
+@@ -601,3 +604,111 @@
  
  	allow $1 unconfined_tmp_t:file { getattr write append };
  ')
@@ -8430,18 +9401,163 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/unconf
 +
 +	allow $1 unconfined_t:shm rw_shm_perms;
 +')
++
++########################################
++## <summary>
++##	Read and write to unconfined execmem shared memory.
++## </summary>
++## <param name="domain">
++##	<summary>
++##	The type of the process performing this action.
++##	</summary>
++## </param>
++#
++interface(`unconfined_execmem_rw_shm',`
++	gen_require(`
++		type unconfined_execmem_t;
++	')
++
++	allow $1 unconfined_execmem_t:shm rw_shm_perms;
++')
++
++########################################
++## <summary>
++##	Transform specified type into a unconfined_terminal type.
++## </summary>
++## <param name="domain">
++##	<summary>
++##	Domain to not audit.
++##	</summary>
++## </param>
++#
++interface(`unconfined_terminal_type',`
++	gen_require(`
++		attribute unconfined_terminal;
++	')
++
++	typeattribute $1 unconfined_terminal;
++')
++
++########################################
++## <summary>
++##	Do not audit attempts to use unconfined ttys and ptys.
++## </summary>
++## <param name="domain">
++##	<summary>
++##	Domain to not audit.
++##	</summary>
++## </param>
++#
++interface(`unconfined_dontaudit_use_terminals',`
++	gen_require(`
++		attribute unconfined_terminal;
++	')
++
++	dontaudit $1 unconfined_terminal:chr_file rw_term_perms;
++')
++
++########################################
++## <summary>
++##	allow attempts to use unconfined ttys and ptys.
++## </summary>
++## <param name="domain">
++##	<summary>
++##	Domain to not audit.
++##	</summary>
++## </param>
++#
++interface(`unconfined_use_terminals',`
++	gen_require(`
++		attribute unconfined_terminal;
++	')
++
++	allow $1 unconfined_terminal:chr_file rw_term_perms;
++')
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/unconfined.te serefpolicy-3.0.1/policy/modules/system/unconfined.te
---- nsaserefpolicy/policy/modules/system/unconfined.te	2007-05-30 11:47:29.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/unconfined.te	2007-05-30 17:04:04.000000000 -0400
-@@ -10,6 +10,7 @@
+--- nsaserefpolicy/policy/modules/system/unconfined.te	2007-06-15 14:54:34.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/unconfined.te	2007-06-19 17:06:27.000000000 -0400
+@@ -5,30 +5,36 @@
+ #
+ # Declarations
+ #
++attribute unconfined_terminal; 
+ 
+-# usage in this module of types created by these
+-# calls is not correct, however we dont currently
+-# have another method to add access to these types
+-userdom_base_user_template(unconfined)
+-userdom_manage_home_template(unconfined)
+-userdom_manage_tmp_template(unconfined)
+-userdom_manage_tmpfs_template(unconfined)
++userdom_unpriv_login_user(unconfined)
++userdom_common_user_template(unconfined)
++
++unconfined_terminal_type(unconfined_devpts_t)
++unconfined_terminal_type(unconfined_tty_device_t)
+ 
  type unconfined_exec_t;
  init_system_domain(unconfined_t,unconfined_exec_t)
- role unconfined_r types unconfined_t;
++role unconfined_r types unconfined_t;
 +domain_user_exemption_target(unconfined_t)
++allow system_r unconfined_r;
++allow unconfined_r system_r;
  
  type unconfined_execmem_t;
  type unconfined_execmem_exec_t;
-@@ -77,10 +78,6 @@
+ init_system_domain(unconfined_execmem_t,unconfined_execmem_exec_t)
+ role unconfined_r types unconfined_execmem_t;
+ 
+-gen_user(unconfined_u, unconfined, unconfined_r, s0, s0 - mls_systemhigh, mcs_allcats)
++unconfined_domain(unconfined_t)
+ 
+ ########################################
+ #
+ # Local policy
+ #
+ 
++allow unconfined_t self:system syslog_read;
++dontaudit unconfined_t self:capability sys_module;
++
+ domtrans_pattern(unconfined_t,unconfined_execmem_exec_t,unconfined_execmem_t)
+ 
+ files_create_boot_flag(unconfined_t)
+@@ -37,6 +43,7 @@
+ mcs_ptrace_all(unconfined_t)
+ 
+ init_run_daemon(unconfined_t,unconfined_r,{ unconfined_devpts_t unconfined_tty_device_t })
++init_spec_domtrans_script(unconfined_t)
+ 
+ libs_run_ldconfig(unconfined_t,unconfined_r,{ unconfined_devpts_t unconfined_tty_device_t })
+ 
+@@ -44,23 +51,21 @@
+ logging_run_auditctl(unconfined_t,unconfined_r,{ unconfined_devpts_t unconfined_tty_device_t })
+ 
+ mount_run_unconfined(unconfined_t,unconfined_r,{ unconfined_devpts_t unconfined_tty_device_t })
++# Unconfined running as system_r
++mount_domtrans_unconfined(unconfined_t)
+ 
+ seutil_run_setfiles(unconfined_t,unconfined_r,{ unconfined_devpts_t unconfined_tty_device_t })
+ seutil_run_semanage(unconfined_t,unconfined_r,{ unconfined_devpts_t unconfined_tty_device_t })
+ 
+-unconfined_domain(unconfined_t)
+-
++userdom_unconfined(unconfined_t)
+ userdom_priveleged_home_dir_manager(unconfined_t)
+ 
+ optional_policy(`
+-	ada_domtrans(unconfined_t)
++	ada_run(unconfined_t,unconfined_r,{ unconfined_devpts_t unconfined_tty_device_t })
+ ')
+ 
+ optional_policy(`
+ 	apache_run_helper(unconfined_t,unconfined_r,{ unconfined_devpts_t unconfined_tty_device_t })
+-	apache_per_role_template(unconfined,unconfined_t,unconfined_r)
+-	# this is disallowed usage:
+-	unconfined_domain(httpd_unconfined_script_t)
+ ')
+ 
+ optional_policy(`
+@@ -68,16 +73,6 @@
  ')
  
  optional_policy(`
@@ -8449,13 +9565,101 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/unconf
 -')
 -
 -optional_policy(`
+-	cron_per_role_template(unconfined,unconfined_t,unconfined_r)
+-	# this is disallowed usage:
+-	unconfined_domain(unconfined_crond_t)
+-')
+-
+-optional_policy(`
  	init_dbus_chat_script(unconfined_t)
  
  	dbus_stub(unconfined_t)
+@@ -120,11 +115,7 @@
+ ')
+ 
+ optional_policy(`
+-	inn_domtrans(unconfined_t)
+-')
+-
+-optional_policy(`
+-	java_domtrans(unconfined_t)
++	java_run(unconfined_t,unconfined_r,{ unconfined_devpts_t unconfined_tty_device_t })
+ ')
+ 
+ optional_policy(`
+@@ -136,11 +127,7 @@
+ ')
+ 
+ optional_policy(`
+-	mono_domtrans(unconfined_t)
+-')
+-
+-optional_policy(`
+-	mta_per_role_template(unconfined,unconfined_t,unconfined_r)
++	mono_run(unconfined_t,unconfined_r,{ unconfined_devpts_t unconfined_tty_device_t })
+ ')
+ 
+ optional_policy(`
+@@ -157,18 +144,6 @@
+ 
+ optional_policy(`
+ 	postfix_run_map(unconfined_t,unconfined_r,{ unconfined_devpts_t unconfined_tty_device_t })
+-	# cjp: this should probably be removed:
+-	postfix_domtrans_master(unconfined_t)
+-')
+-
+-
+-optional_policy(`
+-	pyzor_per_role_template(unconfined)
+-')
+-
+-optional_policy(`
+-	# cjp: this should probably be removed:
+-	rpc_domtrans_nfsd(unconfined_t)
+ ')
+ 
+ optional_policy(`
+@@ -182,10 +157,6 @@
+ ')
+ 
+ optional_policy(`
+-	spamassassin_per_role_template(unconfined,unconfined_t,unconfined_r)
+-')
+-
+-optional_policy(`
+ 	sysnet_run_dhcpc(unconfined_t,unconfined_r,{ unconfined_devpts_t unconfined_tty_device_t })
+ 	sysnet_dbus_chat_dhcpc(unconfined_t)
+ ')
+@@ -207,7 +178,7 @@
+ ')
+ 
+ optional_policy(`
+-	wine_domtrans(unconfined_t)
++	wine_run(unconfined_t,unconfined_r,{ unconfined_devpts_t unconfined_tty_device_t })
+ ')
+ 
+ optional_policy(`
+@@ -232,3 +203,5 @@
+ 		hal_dbus_chat(unconfined_execmem_t)
+ 	')
+ ')
++
++corecmd_exec_all_executables(unconfined_t)
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/userdomain.if serefpolicy-3.0.1/policy/modules/system/userdomain.if
---- nsaserefpolicy/policy/modules/system/userdomain.if	2007-05-30 11:47:29.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/userdomain.if	2007-05-31 09:45:37.000000000 -0400
-@@ -114,6 +114,18 @@
+--- nsaserefpolicy/policy/modules/system/userdomain.if	2007-06-19 16:23:35.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/userdomain.if	2007-06-21 14:03:09.000000000 -0400
+@@ -62,6 +62,10 @@
+ 
+ 	allow $1_t $1_tty_device_t:chr_file { setattr rw_chr_file_perms };
+ 
++	application_exec_all($1_t)
++
++	auth_use_nsswitch($1_t)
++
+ 	kernel_read_kernel_sysctls($1_t)
+ 	kernel_dontaudit_list_unlabeled($1_t)
+ 	kernel_dontaudit_getattr_unlabeled_files($1_t)
+@@ -114,6 +118,10 @@
  		# Allow making the stack executable via mprotect.
  		allow $1_t self:process execstack;
  	')
@@ -8463,18 +9667,10 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/userdo
 +	optional_policy(`
 +		ssh_rw_stream_sockets($1_t)
 +	')
-+
-+	optional_policy(`
-+		consoletype_exec($1_t)
-+	')
-+
-+	optional_policy(`
-+		hostname_exec($1_t)
-+	')
  ')
  
  #######################################
-@@ -183,14 +195,6 @@
+@@ -183,14 +191,6 @@
  	read_sock_files_pattern($1_t,{ $1_home_t $1_home_dir_t },$1_home_t)
  	files_list_home($1_t)
  
@@ -8489,7 +9685,141 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/userdo
  	tunable_policy(`use_nfs_home_dirs',`
  		fs_list_nfs_dirs($1_t)
  		fs_read_nfs_files($1_t)
-@@ -772,6 +776,8 @@
+@@ -579,29 +579,26 @@
+ 		type $1_t, $1_tmpfs_t;
+ 	')
+ 
+-	optional_policy(`
+-		dev_rw_xserver_misc($1_t)
+-		dev_rw_power_management($1_t)
+-		dev_read_input($1_t)
+-		dev_read_misc($1_t)
+-		dev_write_misc($1_t)
+-		# open office is looking for the following
+-		dev_getattr_agp_dev($1_t)
+-		dev_dontaudit_rw_dri($1_t)
+-		# GNOME checks for usb and other devices:
+-		dev_rw_usbfs($1_t)
+-
+-		xserver_user_client_template($1,$1_t,$1_tmpfs_t)
+-		xserver_xsession_entry_type($1_t)
+-		xserver_dontaudit_write_log($1_t)
+-		xserver_stream_connect_xdm($1_t)
+-		# certain apps want to read xdm.pid file
+-		xserver_read_xdm_pid($1_t)
+-		# gnome-session creates socket under /tmp/.ICE-unix/
+-		xserver_create_xdm_tmp_sockets($1_t)
+-		# Needed for escd, remove if we get escd policy
+-		xserver_manage_xdm_tmp_files($1_t)
+-	')
++	dev_rw_xserver_misc($1_t)
++	dev_rw_power_management($1_t)
++	dev_read_input($1_t)
++	dev_read_misc($1_t)
++	dev_write_misc($1_t)
++	# open office is looking for the following
++	dev_getattr_agp_dev($1_t)
++	dev_dontaudit_rw_dri($1_t)
++	# GNOME checks for usb and other devices:
++	dev_rw_usbfs($1_t)
++	xserver_user_client_template($1,$1_t,$1_tmpfs_t)
++	xserver_xsession_entry_type($1_t)
++	xserver_dontaudit_write_log($1_t)
++	xserver_stream_connect_xdm($1_t)
++	# certain apps want to read xdm.pid file
++	xserver_read_xdm_pid($1_t)
++	# gnome-session creates socket under /tmp/.ICE-unix/
++	xserver_create_xdm_tmp_sockets($1_t)
++	# Needed for escd, remove if we get escd policy
++	xserver_manage_xdm_tmp_files($1_t)
+ ')
+ 
+ #######################################
+@@ -677,16 +674,6 @@
+ 		attribute unpriv_userdomain;
+ 	')
+ 
+-	userdom_base_user_template($1)
+-
+-	userdom_manage_home_template($1)
+-	userdom_exec_home_template($1)
+-
+-	userdom_manage_tmp_template($1)
+-	userdom_exec_tmp_template($1)
+-
+-	userdom_manage_tmpfs_template($1)
+-
+ 	userdom_untrusted_content_template($1)
+ 
+ 	userdom_basic_networking_template($1)
+@@ -695,49 +682,29 @@
+ 
+ 	userdom_xwindows_client_template($1)
+ 
+-	userdom_change_password_template($1)
+-
+ 	##############################
+ 	#
+ 	# User domain Local policy
+ 	#
+ 
+-	allow $1_t self:capability { setgid chown fowner };
+-	dontaudit $1_t self:capability { sys_nice fsetid };
+-	allow $1_t self:process ~{ ptrace setcurrent setexec setfscreate setrlimit execmem execstack execheap };
+-	allow $1_t self:process { ptrace setfscreate };
+-
+-	allow $1_t self:context contains;
+-
+ 	# evolution and gnome-session try to create a netlink socket
+ 	dontaudit $1_t self:netlink_socket { create ioctl read getattr write setattr append bind connect getopt setopt shutdown };
+ 	dontaudit $1_t self:netlink_route_socket { create ioctl read getattr write setattr append bind connect getopt setopt shutdown nlmsg_read nlmsg_write };
+ 
+ 	allow $1_t unpriv_userdomain:fd use;
+ 
+-	kernel_read_system_state($1_t)
+-	kernel_read_network_state($1_t)
+-	kernel_read_net_sysctls($1_t)
+ 	# Very permissive allowing every domain to see every type:
+ 	kernel_get_sysvipc_info($1_t)
+-	# Find CDROM devices:
+-	kernel_read_device_sysctls($1_t)
+ 
+ 	corenet_udp_bind_all_nodes($1_t)
+ 	corenet_udp_bind_generic_port($1_t)
+ 
+-	dev_read_sysfs($1_t)
+ 	dev_read_rand($1_t)
+-	dev_read_urand($1_t)
+ 	dev_write_sound($1_t)
+ 	dev_read_sound($1_t)
+ 	dev_read_sound_mixer($1_t)
+ 	dev_write_sound_mixer($1_t)
+ 
+-	domain_use_interactive_fds($1_t)
+-	# Command completion can fire hundreds of denials
+-	domain_dontaudit_exec_all_entry_files($1_t)
+-
+ 	files_exec_etc_files($1_t)
+ 	files_search_locks($1_t)
+ 	# Check to see if cdrom is mounted
+@@ -750,12 +717,6 @@
+ 	# Stat lost+found.
+ 	files_getattr_lost_found_dirs($1_t)
+ 
+-	fs_get_all_fs_quotas($1_t)
+-	fs_getattr_all_fs($1_t)
+-	fs_getattr_all_dirs($1_t)
+-	fs_search_auto_mountpoints($1_t)
+-	fs_list_inotifyfs($1_t)
+-
+ 	# cjp: some of this probably can be removed
+ 	selinux_get_fs_mount($1_t)
+ 	selinux_validate_context($1_t)
+@@ -768,31 +729,16 @@
+ 	storage_getattr_fixed_disk_dev($1_t)
+ 
+ 	auth_read_login_records($1_t)
+-	auth_dontaudit_write_login_records($1_t)
  	auth_search_pam_console_data($1_t)
  	auth_run_pam($1_t,$1_r,{ $1_tty_device_t $1_devpts_t })
  	auth_run_utempter($1_t,$1_r,{ $1_tty_device_t $1_devpts_t })
@@ -8497,23 +9827,276 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/userdo
 +	auth_read_key($1_t)
  
  	init_read_utmp($1_t)
- 	# The library functions always try to open read-write first,
-@@ -961,6 +967,38 @@
+-	# The library functions always try to open read-write first,
+-	# then fall back to read-only if it fails. 
+-	init_dontaudit_write_utmp($1_t)
+-	# Stop warnings about access to /dev/console
+-	init_dontaudit_use_fds($1_t)
+-	init_dontaudit_use_script_fds($1_t)
+-
+-	libs_exec_lib_files($1_t)
+-
+-	logging_dontaudit_getattr_all_logs($1_t)
+-
+-	miscfiles_read_man_pages($1_t)
+-	# for running TeX programs
+-	miscfiles_read_tetex_data($1_t)
+-	miscfiles_exec_tetex_data($1_t)
+ 
+ 	seutil_read_file_contexts($1_t)
+ 	seutil_read_default_contexts($1_t)
+-	seutil_read_config($1_t)
+ 	seutil_run_newrole($1_t,$1_r,{ $1_devpts_t $1_tty_device_t })
+ 	seutil_exec_checkpolicy($1_t)
+ 	seutil_exec_setfiles($1_t)
+@@ -807,19 +753,12 @@
+ 		files_read_default_symlinks($1_t)
+ 		files_read_default_sockets($1_t)
+ 		files_read_default_pipes($1_t)
+-	',`
+-		files_dontaudit_list_default($1_t)
+-		files_dontaudit_read_default_files($1_t)
+ 	')
+ 
+ 	tunable_policy(`user_direct_mouse',`
+ 		dev_read_mouse($1_t)
+ 	')
+ 
+-	tunable_policy(`user_ttyfile_stat',`
+-		term_getattr_all_user_ttys($1_t)
+-	')
+-
+ 	optional_policy(`
+ 		alsa_read_rw_config($1_t)
+ 	')
+@@ -834,34 +773,14 @@
+ 	')
+ 
+ 	optional_policy(`
+-		cups_stream_connect($1_t)
+-		cups_stream_connect_ptal($1_t)
+-	')
+-
+-	optional_policy(`
+ 		allow $1_t self:dbus send_msg;
+ 		dbus_system_bus_client_template($1,$1_t)
+ 
+ 		optional_policy(`
+-			bluetooth_dbus_chat($1_t)
+-		')
+-
+-		optional_policy(`
+ 			evolution_dbus_chat($1,$1_t)
+ 			evolution_alarm_dbus_chat($1,$1_t)
+ 		')
+ 
+-		optional_policy(`
+-			cups_dbus_chat_config($1_t)
+-		')
+-
+-		optional_policy(`
+-			hal_dbus_chat($1_t)
+-		')
+-
+-		optional_policy(`
+-			networkmanager_dbus_chat($1_t)
+-		')
+ 	')
+ 
+ 	optional_policy(`
+@@ -889,17 +808,19 @@
+ 	')
+ 
+ 	optional_policy(`
+-		nis_use_ypbind($1_t)
+-	')
+-
+-	optional_policy(`
+ 		tunable_policy(`allow_user_mysql_connect',`
+ 			mysql_stream_connect($1_t)
+ 		')
+ 	')
+ 
+-	optional_policy(`
+-		nscd_socket_use($1_t)
++	 optional_policy(`
++	          tunable_policy(`allow_user_postgresql_connect',`
++			postgresql_stream_connect($1_t)
++		  ')
++        ')
++
++	tunable_policy(`user_ttyfile_stat',`
++		term_getattr_all_user_ttys($1_t)
+ 	')
+ 
+ 	optional_policy(`
+@@ -913,16 +834,6 @@
+ 	')
+ 
+ 	optional_policy(`
+-		tunable_policy(`allow_user_postgresql_connect',`
+-			postgresql_stream_connect($1_t)
+-		')
+-	')
+-
+-	optional_policy(`
+-		quota_dontaudit_getattr_db($1_t)
+-	')
+-
+-	optional_policy(`
+ 		resmgr_stream_connect($1_t)
+ 	')
+ 
+@@ -932,11 +843,6 @@
+ 	')
+ 
+ 	optional_policy(`
+-		rpm_read_db($1_t)
+-		rpm_dontaudit_manage_db($1_t)
+-	')
+-
+-	optional_policy(`
+ 		samba_stream_connect_winbind($1_t)
+ 	')
+ 
+@@ -967,21 +873,122 @@
  ##	</summary>
  ## </param>
  #
+-template(`userdom_unpriv_user_template', `
+-
 +template(`userdom_privhome_user_template',`
+ 	gen_require(`
+-		attribute privhome, user_ptynode, user_home_dir_type, user_home_type, user_tmpfile, user_ttynode;
++		type $1_home_dir_t,  $1_home_t;
+ 	')
+ 
++	# privileged home directory writers
++	manage_dirs_pattern(privhome,{ $1_home_dir_t $1_home_t },$1_home_t)
++	manage_files_pattern(privhome,{ $1_home_dir_t $1_home_t },$1_home_t)
++	manage_lnk_files_pattern(privhome,{ $1_home_dir_t $1_home_t },$1_home_t)
++	manage_sock_files_pattern(privhome,{ $1_home_dir_t $1_home_t },$1_home_t)
++	manage_fifo_files_pattern(privhome,{ $1_home_dir_t $1_home_t },$1_home_t)
++	filetrans_pattern(privhome,$1_home_dir_t,$1_home_t,{ dir file lnk_file sock_file fifo_file })
++')
++
++template(`userdom_login_user_template', `
++	userdom_base_user_template($1)
++
++	userdom_manage_home_template($1)
++	userdom_exec_home_template($1)
++	userdom_manage_tmp_template($1)
++	userdom_exec_tmp_template($1)
++	userdom_manage_tmpfs_template($1)
++
++	userdom_change_password_template($1)
++
++	role $1_r types $1_t;
++	allow system_r $1_r;
++
++	allow $1_t self:capability { setgid chown fowner };
++	dontaudit $1_t self:capability { sys_nice fsetid };
++
++	allow $1_t self:process ~{ setcurrent setexec setrlimit execmem execstack execheap };
++	dontaudit $1_t self:netlink_route_socket { create ioctl read getattr write setattr append bind connect getopt setopt shutdown nlmsg_read nlmsg_write };
++
++	allow $1_t self:context contains;
++
+ 	##############################
+ 	#
+-	# Declarations
++	# User domain Local policy
+ 	#
+ 
+-	# Inherit rules for ordinary users.
+-	userdom_common_user_template($1)
++	auth_dontaudit_write_login_records($1_t)
++
++	# Find CDROM devices:
++	kernel_read_device_sysctls($1_t)
++	kernel_read_network_state($1_t)
++	kernel_read_net_sysctls($1_t)
++	kernel_read_system_state($1_t)
++
++	dev_read_sysfs($1_t)
++	dev_read_urand($1_t)
++
++	domain_use_interactive_fds($1_t)
++	# Command completion can fire hundreds of denials
++	domain_dontaudit_exec_all_entry_files($1_t)
++
++	# Stat lost+found.
++	files_getattr_lost_found_dirs($1_t)
++
++	fs_get_all_fs_quotas($1_t)
++	fs_getattr_all_fs($1_t)
++	fs_getattr_all_dirs($1_t)
++	fs_search_auto_mountpoints($1_t)
++	fs_list_inotifyfs($1_t)
++
++	# Stop warnings about access to /dev/console
++	init_dontaudit_rw_utmp($1_t)
++	init_dontaudit_use_fds($1_t)
++	init_dontaudit_use_script_fds($1_t)
++
++	libs_exec_lib_files($1_t)
++
++	logging_dontaudit_getattr_all_logs($1_t)
++
++	miscfiles_read_man_pages($1_t)
++	# for running TeX programs
++	miscfiles_read_tetex_data($1_t)
++	miscfiles_exec_tetex_data($1_t)
++
++	seutil_read_config($1_t)
++
++	files_dontaudit_list_default($1_t)
++	files_dontaudit_read_default_files($1_t)
++
++	userdom_poly_home_template($1)
++	userdom_poly_tmp_template($1)
++
++	optional_policy(`
++		cups_stream_connect($1_t)
++		cups_stream_connect_ptal($1_t)
++	')
++
++	optional_policy(`
++		kerberos_use($1_t)
++	')
++
++	optional_policy(`
++		quota_dontaudit_getattr_db($1_t)
++	')
++
++	optional_policy(`
++		rpm_read_db($1_t)
++		rpm_dontaudit_manage_db($1_t)
++	')
++')
++
++template(`userdom_unpriv_login_user', `
 +	gen_require(`
-+		type $1_home_dir_t,  $1_home_t;
++		attribute unpriv_userdomain;
++		attribute privhome, user_ptynode, user_home_dir_type, user_home_type, user_tmpfile, user_ttynode;
 +	')
++	userdom_login_user_template($1)
++	userdom_privhome_user_template($1)
+ 
+ 	typeattribute $1_t unpriv_userdomain;
 +
-+	# privileged home directory writers
-+	manage_dirs_pattern(privhome,{ $1_home_dir_t $1_home_t },$1_home_t)
-+	manage_files_pattern(privhome,{ $1_home_dir_t $1_home_t },$1_home_t)
-+	manage_lnk_files_pattern(privhome,{ $1_home_dir_t $1_home_t },$1_home_t)
-+	manage_sock_files_pattern(privhome,{ $1_home_dir_t $1_home_t },$1_home_t)
-+	manage_fifo_files_pattern(privhome,{ $1_home_dir_t $1_home_t },$1_home_t)
-+	filetrans_pattern(privhome,$1_home_dir_t,$1_home_t,{ dir file lnk_file sock_file fifo_file })
+ 	domain_interactive_fd($1_t)
+ 
+ 	typeattribute $1_devpts_t user_ptynode;
+@@ -990,15 +997,45 @@
+ 	typeattribute $1_tmp_t user_tmpfile;
+ 	typeattribute $1_tty_device_t user_ttynode;
+ 
+-	userdom_poly_home_template($1)
+-	userdom_poly_tmp_template($1)
++	optional_policy(`
++		loadkeys_run($1_t,$1_r,$1_tty_device_t)
++	')
 +')
 +
 +#######################################
@@ -8534,26 +10117,66 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/userdo
 +##	</summary>
 +## </param>
 +#
- template(`userdom_unpriv_user_template', `
- 
- 	gen_require(`
-@@ -987,12 +1025,13 @@
- 	userdom_poly_home_template($1)
- 	userdom_poly_tmp_template($1)
- 
-+	userdom_privhome_user_template($1)
++template(`userdom_unpriv_user_template', `
 +
++	userdom_unpriv_login_user($1)
+ 
  	##############################
  	#
- 	# Local policy
+-	# Local policy
++	# Declarations
  	#
--
+ 
 -	corecmd_exec_all_executables($1_t)
-+	application_exec_all($1_t)
++	# Inherit rules for ordinary users.
++	userdom_common_user_template($1)
++
++	##############################
++	#
++	# Local policy
++	#
  
  	# port access is audited even if dac would not have allowed it, so dontaudit it here
  	corenet_dontaudit_tcp_bind_all_reserved_ports($1_t)
-@@ -1126,7 +1165,7 @@
+@@ -1038,14 +1075,6 @@
+ 	')
+ 
+ 	optional_policy(`
+-		kerberos_use($1_t)
+-	')
+-
+-	optional_policy(`
+-		loadkeys_run($1_t,$1_r,$1_tty_device_t)
+-	')
+-
+-	optional_policy(`
+ 		netutils_run_ping_cond($1_t,$1_r,{ $1_tty_device_t $1_devpts_t })
+ 		netutils_run_traceroute_cond($1_t,$1_r,{ $1_tty_device_t $1_devpts_t })
+ 	')
+@@ -1059,12 +1088,8 @@
+ 		setroubleshoot_stream_connect($1_t)
+ 	')
+ 
+-	ifdef(`TODO',`
+-	ifdef(`xdm.te', `
+-		# this should cause the .xsession-errors file to be written to /tmp
+-		dontaudit xdm_t $1_home_t:file rw_file_perms;
+-	')
+ 
++	ifdef(`TODO',`
+ 	# Do not audit write denials to /etc/ld.so.cache.
+ 	dontaudit $1_t ld_so_cache_t:file write;
+ 
+@@ -1107,6 +1132,8 @@
+ 		class passwd { passwd chfn chsh rootok crontab };
+ 	')
+ 
++	userdom_login_user_template($1)
++
+ 	##############################
+ 	#
+ 	# Declarations
+@@ -1132,7 +1159,7 @@
  	# $1_t local policy
  	#
  
@@ -8562,7 +10185,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/userdo
  	allow $1_t self:process { setexec setfscreate };
  
  	# Set password information for other users.
-@@ -1138,8 +1177,6 @@
+@@ -1144,8 +1171,6 @@
  	# Manipulate other users crontab.
  	allow $1_t self:passwd crontab;
  
@@ -8571,11 +10194,46 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/userdo
  	kernel_read_software_raid_state($1_t)
  	kernel_getattr_core_if($1_t)
  	kernel_getattr_message_if($1_t)
-@@ -5563,3 +5600,104 @@
- 	allow $1 user_home_dir_t:dir manage_dir_perms;
- 	files_home_filetrans($1,user_home_dir_t,dir)
- ')
+@@ -3083,7 +3108,7 @@
+ #
+ template(`userdom_tmp_filetrans_user_tmp',`
+ 	gen_require(`
+-		type $1_home_dir_t;
++		type $1_tmp_t;
+ 	')
+ 
+ 	files_tmp_filetrans($2,$1_tmp_t,$3)
+@@ -5553,6 +5578,26 @@
+ 
+ ########################################
+ ## <summary>
++##	Send a dbus message to all user domains.
++## </summary>
++## <param name="domain">
++##	<summary>
++##	Domain allowed access.
++##	</summary>
++## </param>
++#
++interface(`userdom_dbus_chat_all_users',`
++	gen_require(`
++		attribute userdomain;
++		class dbus send_msg;
++	')
++
++	allow $1 userdomain:dbus send_msg;
++	allow userdomain $1:dbus send_msg;
++')
 +
++########################################
++## <summary>
+ ##	Unconfined access to user domains.  (Deprecated)
+ ## </summary>
+ ## <param name="domain">
+@@ -5564,3 +5609,124 @@
+ interface(`userdom_unconfined',`
+ 	refpolicywarn(`$0($*) has been deprecated.')
+ ')
 +
 +########################################
 +## <summary>
@@ -8676,10 +10334,31 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/userdo
 +	allow $1 userdomain:process ptrace;
 +')
 +
++########################################
++## <summary>
++##	unlink all unprivileged users home directory
++##	files.
++## </summary>
++## <param name="domain">
++##	<summary>
++##	Domain allowed access.
++##	</summary>
++## </param>
++#
++interface(`userdom_unlink_unpriv_users_home_content_files',`
++	gen_require(`
++		attribute user_home_dir_type, user_home_type;
++	')
++
++	files_search_home($1)
++	allow $1 user_home_dir_type:dir list_dir_perms;
++	allow $1 user_home_type:file unlink;
++')
++
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/userdomain.te serefpolicy-3.0.1/policy/modules/system/userdomain.te
---- nsaserefpolicy/policy/modules/system/userdomain.te	2007-05-30 11:47:29.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/userdomain.te	2007-05-30 15:12:50.000000000 -0400
-@@ -67,6 +67,9 @@
+--- nsaserefpolicy/policy/modules/system/userdomain.te	2007-06-19 16:23:35.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/userdomain.te	2007-06-19 17:06:27.000000000 -0400
+@@ -74,6 +74,9 @@
  # users home directory contents
  attribute home_type;
  
@@ -8689,7 +10368,72 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/userdo
  # The privhome attribute identifies every domain that can create files under
  # regular user home directories in the regular context (IE act on behalf of
  # a user in writing regular files)
-@@ -154,6 +157,11 @@
+@@ -106,8 +109,50 @@
+ # Local policy
+ #
+ 
++## <desc>
++## <p>
++## Confine sysadm web browser
++## </p>
++## </desc>
++gen_tunable(browser_confine_sysadm,false)
++
++## <desc>
++## <p>
++## Allow browser to write sysadm data
++## </p>
++## </desc>
++gen_tunable(browser_write_sysadm_data,false)
++
+ userdom_admin_user_template(sysadm)
++
++## <desc>
++## <p>
++## Confine staff web browser
++## </p>
++## </desc>
++gen_tunable(browser_confine_staff,false)
++
++## <desc>
++## <p>
++## Allow browser to write staff data
++## </p>
++## </desc>
++gen_tunable(browser_write_staff_data,false)
+ userdom_unpriv_user_template(staff)
++
++## <desc>
++## <p>
++## Confine user web browser
++## </p>
++## </desc>
++gen_tunable(browser_confine_user,false)
++
++## <desc>
++## <p>
++## Allow browser to write user data
++## </p>
++## </desc>
++gen_tunable(browser_write_user_data,false)
+ userdom_unpriv_user_template(user)
+ 
+ # user role change rules:
+@@ -136,13 +181,6 @@
+ 	userdom_role_change_template(secadm,sysadm)
+ ')
+ 
+-# this should be tunable_policy, but
+-# currently type_change and RBAC allow
+-# do not work in conditionals
+-ifdef(`user_canbe_sysadm',`
+-	userdom_role_change_template(user,sysadm)
+-')
+-
+ ########################################
+ #
+ # Sysadm local policy
+@@ -161,6 +199,11 @@
  
  init_exec(sysadm_t)
  
@@ -8701,7 +10445,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/userdo
  # Following for sending reboot and wall messages
  userdom_use_unpriv_users_ptys(sysadm_t)
  userdom_use_unpriv_users_ttys(sysadm_t)
-@@ -224,6 +232,10 @@
+@@ -231,6 +274,10 @@
  ')
  
  optional_policy(`
@@ -8712,7 +10456,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/userdo
  	apache_run_helper(sysadm_t,sysadm_r,admin_terminal)
  	#apache_run_all_scripts(sysadm_t,sysadm_r)
  	#apache_domtrans_sys_script(sysadm_t)
-@@ -283,14 +295,6 @@
+@@ -290,14 +337,6 @@
  ')
  
  optional_policy(`
@@ -8727,7 +10471,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/userdo
  	cron_admin_template(sysadm,sysadm_t,sysadm_r)
  ')
  
-@@ -391,6 +395,10 @@
+@@ -398,6 +437,10 @@
  ')
  
  optional_policy(`
@@ -8738,7 +10482,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/userdo
  	netutils_run(sysadm_t,sysadm_r,admin_terminal)
  	netutils_run_ping(sysadm_t,sysadm_r,admin_terminal)
  	netutils_run_traceroute(sysadm_t,sysadm_r,admin_terminal)
-@@ -449,6 +457,9 @@
+@@ -456,6 +499,9 @@
  
  	ifdef(`enable_mls',`
  		userdom_security_admin_template(secadm_t,secadm_r,{ secadm_tty_device_t sysadm_devpts_t })
@@ -8748,7 +10492,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/userdo
  	', `
  		userdom_security_admin_template(sysadm_t,sysadm_r,admin_terminal)
  	')
-@@ -491,3 +502,7 @@
+@@ -498,3 +544,7 @@
  optional_policy(`
  	yam_run(sysadm_t,sysadm_r,admin_terminal)
  ')
@@ -8758,8 +10502,8 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/userdo
 +')
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/xen.if serefpolicy-3.0.1/policy/modules/system/xen.if
 --- nsaserefpolicy/policy/modules/system/xen.if	2007-05-29 14:10:58.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/xen.if	2007-05-30 15:12:50.000000000 -0400
-@@ -72,12 +72,35 @@
++++ serefpolicy-3.0.1/policy/modules/system/xen.if	2007-06-19 17:06:27.000000000 -0400
+@@ -72,12 +72,34 @@
  	')
  
  	logging_search_logs($1)
@@ -8785,9 +10529,8 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/xen.if
 +	')
 +
 +	logging_search_logs($1)
-+	allow $1 xend_var_log_t:dir create_dir_perms;
-+	allow $1 xend_var_log_t:file create_file_perms;
-+	dontaudit $1 xend_var_log_t:file write;
++	manage_dirs_pattern($1,xend_var_log_t,xend_var_log_t)
++	manage_files_pattern($1,xend_var_log_t,xend_var_log_t)
 +')
 +
 +########################################
@@ -8795,7 +10538,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/xen.if
  ##	Do not audit attempts to read and write
  ##	Xen unix domain stream sockets.  These
  ##	are leaked file descriptors.
-@@ -151,3 +174,25 @@
+@@ -151,3 +173,25 @@
  
  	domtrans_pattern($1,xm_exec_t,xm_t)
  ')
@@ -8823,7 +10566,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/xen.if
 +
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/xen.te serefpolicy-3.0.1/policy/modules/system/xen.te
 --- nsaserefpolicy/policy/modules/system/xen.te	2007-05-29 14:10:58.000000000 -0400
-+++ serefpolicy-3.0.1/policy/modules/system/xen.te	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/policy/modules/system/xen.te	2007-06-19 17:06:27.000000000 -0400
 @@ -25,6 +25,10 @@
  domain_type(xend_t)
  init_daemon_domain(xend_t, xend_exec_t)
@@ -8890,6 +10633,15 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/xen.te
  netutils_domtrans(xend_t)
  
  optional_policy(`
+@@ -241,7 +260,7 @@
+ 
+ miscfiles_read_localization(xenconsoled_t)
+ 
+-xen_append_log(xenconsoled_t)
++xen_manage_log(xenconsoled_t)
+ xen_stream_connect_xenstore(xenconsoled_t)
+ 
+ ########################################
 @@ -275,6 +294,12 @@
  
  files_read_usr_files(xenstored_t)
@@ -8915,7 +10667,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/xen.te
  
  kernel_read_system_state(xm_t)
  kernel_read_kernel_sysctls(xm_t)
-@@ -343,3 +373,11 @@
+@@ -343,3 +373,13 @@
  xen_append_log(xm_t)
  xen_stream_connect(xm_t)
  xen_stream_connect_xenstore(xm_t)
@@ -8923,37 +10675,304 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/xen.te
 +#Should have a boolean wrapping these
 +fs_list_auto_mountpoints(xend_t)
 +files_search_mnt(xend_t)
-+fs_write_nfs_files(xend_t)
-+fs_read_nfs_files(xend_t)
 +fs_getattr_all_fs(xend_t)
 +fs_read_dos_files(xend_t)
-diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/support/misc_patterns.spt serefpolicy-3.0.1/policy/support/misc_patterns.spt
---- nsaserefpolicy/policy/support/misc_patterns.spt	2007-05-29 14:10:59.000000000 -0400
-+++ serefpolicy-3.0.1/policy/support/misc_patterns.spt	2007-05-30 15:12:50.000000000 -0400
-@@ -41,11 +41,6 @@
- #
- # Other process permissions
- #
--define(`send_audit_msgs_pattern',`
--	allow $1 self:capability audit_write;
--	allow $1 self:netlink_audit_socket { create_netlink_socket_perms nlmsg_relay };
--')
--
- define(`ps_process_pattern',`
- 	allow $1 $2:dir { search getattr read };
- 	allow $1 $2:{ file lnk_file } { read getattr };
++
++fs_write_nfs_files(xend_t)
++fs_read_nfs_files(xend_t)
++fs_read_nfs_symlinks(xend_t)
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/users/guest.fc serefpolicy-3.0.1/policy/modules/users/guest.fc
+--- nsaserefpolicy/policy/modules/users/guest.fc	1969-12-31 19:00:00.000000000 -0500
++++ serefpolicy-3.0.1/policy/modules/users/guest.fc	2007-06-19 17:06:27.000000000 -0400
+@@ -0,0 +1 @@
++# No guest file contexts.
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/users/guest.if serefpolicy-3.0.1/policy/modules/users/guest.if
+--- nsaserefpolicy/policy/modules/users/guest.if	1969-12-31 19:00:00.000000000 -0500
++++ serefpolicy-3.0.1/policy/modules/users/guest.if	2007-06-19 17:06:27.000000000 -0400
+@@ -0,0 +1 @@
++## <summary>Policy for guest user</summary>
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/users/guest.te serefpolicy-3.0.1/policy/modules/users/guest.te
+--- nsaserefpolicy/policy/modules/users/guest.te	1969-12-31 19:00:00.000000000 -0500
++++ serefpolicy-3.0.1/policy/modules/users/guest.te	2007-06-19 17:06:27.000000000 -0400
+@@ -0,0 +1,127 @@
++policy_module(guest,1.0.0)
++
++define(`userdom_login_user', `
++	userdom_base_user_template($1)
++
++	userdom_manage_home_template($1)
++	userdom_exec_home_template($1)
++	userdom_manage_tmp_template($1)
++	userdom_exec_tmp_template($1)
++	userdom_manage_tmpfs_template($1)
++
++	userdom_change_password_template($1)
++
++	role $1_r types $1_t;
++	allow system_r $1_r;
++
++	application_exec_all($1_t)
++
++	allow $1_t self:capability { setgid chown fowner };
++	dontaudit $1_t self:capability { sys_nice fsetid };
++	allow $1_t self:process ~{ setcurrent setexec setrlimit execmem execstack execheap };
++	
++	dontaudit $1_t self:netlink_route_socket { create ioctl read getattr write setattr append bind connect getopt setopt shutdown nlmsg_read nlmsg_write };
++
++	##############################
++	#
++	# User domain Local policy
++	#
++
++	kernel_read_system_state($1_t)
++
++	dev_read_sysfs($1_t)
++	dev_read_urand($1_t)
++
++	domain_use_interactive_fds($1_t)
++	# Command completion can fire hundreds of denials
++	domain_dontaudit_exec_all_entry_files($1_t)
++
++	# Stat lost+found.
++	files_getattr_lost_found_dirs($1_t)
++
++	fs_get_all_fs_quotas($1_t)
++	fs_getattr_all_fs($1_t)
++	fs_getattr_all_dirs($1_t)
++	fs_search_auto_mountpoints($1_t)
++	fs_list_inotifyfs($1_t)
++
++	# Stop warnings about access to /dev/console
++	init_dontaudit_rw_utmp($1_t)
++	init_dontaudit_use_fds($1_t)
++	init_dontaudit_use_script_fds($1_t)
++
++	libs_exec_lib_files($1_t)
++
++	logging_dontaudit_getattr_all_logs($1_t)
++
++	miscfiles_read_man_pages($1_t)
++	# for running TeX programs
++	miscfiles_read_tetex_data($1_t)
++	miscfiles_exec_tetex_data($1_t)
++
++	seutil_read_config($1_t)
++
++	files_dontaudit_list_default($1_t)
++	files_dontaudit_read_default_files($1_t)
++
++	tunable_policy(`user_ttyfile_stat',`
++		term_getattr_all_user_ttys($1_t)
++	')
++
++	# for running depmod as part of the kernel packaging process
++	optional_policy(`
++		modutils_read_module_config($1_t)
++	')
++
++	optional_policy(`
++		mta_rw_spool($1_t)
++	')
++
++	optional_policy(`
++		nis_use_ypbind($1_t)
++	')
++
++	optional_policy(`
++		nscd_socket_use($1_t)
++	')
++
++	optional_policy(`
++		quota_dontaudit_getattr_db($1_t)
++	')
++
++	optional_policy(`
++		rpm_read_db($1_t)
++		rpm_dontaudit_manage_db($1_t)
++	')
++')
++
++define(`userdom_unpriv_login_user', `
++	gen_require(`
++		attribute unpriv_userdomain;
++		attribute privhome, user_ptynode, user_home_dir_type, user_home_type, user_tmpfile, user_ttynode;
++	')
++	userdom_login_user($1)
++	userdom_privhome_user_template($1)
++
++	typeattribute $1_t unpriv_userdomain;
++	
++	typeattribute $1_t unpriv_userdomain;
++	domain_interactive_fd($1_t)
++
++	typeattribute $1_devpts_t user_ptynode;
++	typeattribute $1_home_dir_t user_home_dir_type;
++	typeattribute $1_home_t user_home_type;
++	typeattribute $1_tmp_t user_tmpfile;
++	typeattribute $1_tty_device_t user_ttynode;
++
++')
++userdom_unpriv_login_user(guest)
++userdom_unpriv_login_user(gadmin)
++#userdom_basic_networking_template(guest)
++#kernel_read_network_state($1_t)
++#kernel_read_net_sysctls($1_t)
++#corenet_udp_bind_all_nodes($1_t)
++#corenet_udp_bind_generic_port($1_t)
++
++
++
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/users/logadm.fc serefpolicy-3.0.1/policy/modules/users/logadm.fc
+--- nsaserefpolicy/policy/modules/users/logadm.fc	1969-12-31 19:00:00.000000000 -0500
++++ serefpolicy-3.0.1/policy/modules/users/logadm.fc	2007-06-19 17:06:27.000000000 -0400
+@@ -0,0 +1 @@
++/etc/syslog.conf		gen_context(system_u:object_r:syslog_conf_t,s0)
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/users/logadm.if serefpolicy-3.0.1/policy/modules/users/logadm.if
+--- nsaserefpolicy/policy/modules/users/logadm.if	1969-12-31 19:00:00.000000000 -0500
++++ serefpolicy-3.0.1/policy/modules/users/logadm.if	2007-06-19 17:06:27.000000000 -0400
+@@ -0,0 +1 @@
++## <summary>Policy for logadm user</summary>
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/users/logadm.te serefpolicy-3.0.1/policy/modules/users/logadm.te
+--- nsaserefpolicy/policy/modules/users/logadm.te	1969-12-31 19:00:00.000000000 -0500
++++ serefpolicy-3.0.1/policy/modules/users/logadm.te	2007-06-19 17:06:27.000000000 -0400
+@@ -0,0 +1,35 @@
++policy_module(logadm,1.0.0)
++
++########################################
++#
++# logadmin local policy
++#
++
++type syslog_conf_t;
++files_type(syslog_conf_t)
++
++userdom_base_user_template(logadm)
++allow logadm_t syslog_conf_t:file manage_file_perms;
++files_etc_filetrans(logadm_t, syslog_conf_t, file)
++
++allow logadm_t self:capability { dac_override dac_read_search kill sys_ptrace sys_nice };
++
++logging_manage_all_logs(logadm_t)
++seutil_run_runinit(logadm_t, logadm_r, { logadm_tty_device_t logadm_devpts_t })
++domain_kill_all_domains(logadm_t)
++seutil_read_bin_policy(logadm_t)
++corecmd_exec_shell(logadm_t)
++logging_send_syslog_msg(logadm_t)
++logging_read_generic_logs(logadm_t)
++logging_manage_audit_log(logadm_t)
++logging_manage_audit_config(logadm_t)
++logging_run_auditctl(logadm_t,logadm_r,{ logadm_tty_device_t logadm_devpts_t })
++logging_run_auditd(logadm_t, logadm_r, { logadm_tty_device_t logadm_devpts_t })
++userdom_dontaudit_read_sysadm_home_content_files(logadm_t)
++consoletype_exec(logadm_t)
++
++kernel_read_ring_buffer(logadm_t)
++dmesg_exec(logadm_t)
++
++files_dontaudit_search_all_dirs(logadm_t)
++files_dontaudit_getattr_all_files(logadm_t)
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/users/metadata.xml serefpolicy-3.0.1/policy/modules/users/metadata.xml
+--- nsaserefpolicy/policy/modules/users/metadata.xml	1969-12-31 19:00:00.000000000 -0500
++++ serefpolicy-3.0.1/policy/modules/users/metadata.xml	2007-06-19 17:06:27.000000000 -0400
+@@ -0,0 +1 @@
++<summary>Policy modules for users</summary>
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/users/webadm.fc serefpolicy-3.0.1/policy/modules/users/webadm.fc
+--- nsaserefpolicy/policy/modules/users/webadm.fc	1969-12-31 19:00:00.000000000 -0500
++++ serefpolicy-3.0.1/policy/modules/users/webadm.fc	2007-06-19 17:06:27.000000000 -0400
+@@ -0,0 +1 @@
++# No webadm file contexts.
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/users/webadm.if serefpolicy-3.0.1/policy/modules/users/webadm.if
+--- nsaserefpolicy/policy/modules/users/webadm.if	1969-12-31 19:00:00.000000000 -0500
++++ serefpolicy-3.0.1/policy/modules/users/webadm.if	2007-06-19 17:06:27.000000000 -0400
+@@ -0,0 +1 @@
++## <summary>Policy for webadm user</summary>
+diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/users/webadm.te serefpolicy-3.0.1/policy/modules/users/webadm.te
+--- nsaserefpolicy/policy/modules/users/webadm.te	1969-12-31 19:00:00.000000000 -0500
++++ serefpolicy-3.0.1/policy/modules/users/webadm.te	2007-06-19 17:06:27.000000000 -0400
+@@ -0,0 +1,70 @@
++policy_module(webadm,1.0.0)
++
++########################################
++#
++# webadmin local policy
++#
++
++userdom_login_user_template(webadm)
++allow webadm_t self:capability { dac_override dac_read_search kill sys_ptrace sys_nice };
++
++# Allow webadm_t to restart the apache service
++domain_dontaudit_search_all_domains_state(webadm_t)
++apache_domtrans(webadm_t)
++init_exec_script_files(webadm_t)
++domain_role_change_exemption(webadm_t)
++domain_obj_id_change_exemption(webadm_t)
++role_transition webadm_r httpd_exec_t system_r;
++allow webadm_r system_r;
++
++apache_manage_all_content(webadm_t)
++apache_manage_config(webadm_t)
++apache_manage_log(webadm_t)
++apache_manage_modules(webadm_t)
++apache_manage_lock(webadm_t)
++apache_manage_pid(webadm_t)
++apache_read_state(webadm_t)
++apache_signal(webadm_t)
++apache_getattr(webadm_t)
++apache_relabel(webadm_t)
++
++seutil_domtrans_restorecon(webadm_t)
++
++files_dontaudit_search_all_dirs(webadm_t)
++files_dontaudit_getattr_all_files(webadm_t)
++files_manage_generic_locks(webadm_t)
++files_list_var(webadm_t)
++selinux_get_enforce_mode(webadm_t)
++
++
++logging_send_syslog_msg(webadm_t)
++
++ifdef(`targeted_policy',`
++	term_use_generic_ptys(webadm_t)
++	term_use_unallocated_ttys(webadm_t)
++')
++
++userdom_dontaudit_search_sysadm_home_dirs(webadm_t)
++userdom_dontaudit_search_generic_user_home_dirs(webadm_t)
++
++bool webadm_read_user_files false;
++bool webadm_manage_user_files false;
++
++if (webadm_read_user_files) {
++	userdom_read_unpriv_users_home_content_files(webadm_t)
++	userdom_read_unpriv_users_tmp_files(webadm_t)
++}
++
++if (webadm_manage_user_files) {
++	userdom_manage_unpriv_users_home_content_dirs(webadm_t)
++	userdom_read_unpriv_users_tmp_files(webadm_t)
++	userdom_write_unpriv_users_tmp_files(webadm_t)
++}
++
++gen_require(`
++	type gadmin_t;
++')
++allow gadmin_t webadm_t:process transition;
++allow webadm_t gadmin_t:dir getattr;
++
++
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/support/obj_perm_sets.spt serefpolicy-3.0.1/policy/support/obj_perm_sets.spt
 --- nsaserefpolicy/policy/support/obj_perm_sets.spt	2007-05-29 14:10:59.000000000 -0400
-+++ serefpolicy-3.0.1/policy/support/obj_perm_sets.spt	2007-05-30 15:12:50.000000000 -0400
-@@ -203,7 +203,6 @@
++++ serefpolicy-3.0.1/policy/support/obj_perm_sets.spt	2007-06-21 13:44:03.000000000 -0400
+@@ -201,7 +201,7 @@
+ define(`search_dir_perms',`{ getattr search }')
+ define(`list_dir_perms',`{ getattr search read lock ioctl }')
  define(`add_entry_dir_perms',`{ getattr search lock ioctl write add_name }')
- define(`del_entry_dir_perms',`{ getattr search lock ioctl write remove_name }')
+-define(`del_entry_dir_perms',`{ getattr search lock ioctl write remove_name }')
++define(`del_entry_dir_perms',`{ getattr search lock ioctl read write remove_name }')
  define(`create_dir_perms',`{ getattr create }')
--define(`rename_dir_perms',`{ getattr rename }')
+ define(`rename_dir_perms',`{ getattr rename }')
  define(`delete_dir_perms',`{ getattr rmdir }')
- define(`manage_dir_perms',`{ create getattr setattr read write link unlink rename search add_name remove_name reparent rmdir lock ioctl }')
- define(`relabelfrom_dir_perms',`{ getattr relabelfrom }')
-@@ -216,7 +215,7 @@
+@@ -216,7 +216,7 @@
  define(`getattr_file_perms',`{ getattr }')
  define(`setattr_file_perms',`{ setattr }')
  define(`read_file_perms',`{ getattr read lock ioctl }')
@@ -8962,7 +10981,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/support/obj_perm_sets
  define(`exec_file_perms',`{ getattr read execute execute_no_trans }')
  define(`append_file_perms',`{ getattr append lock ioctl }')
  define(`write_file_perms',`{ getattr write append lock ioctl }')
-@@ -325,3 +324,13 @@
+@@ -325,3 +325,13 @@
  #
  define(`client_stream_socket_perms', `{ create ioctl read getattr write setattr append bind getopt setopt shutdown }')
  define(`server_stream_socket_perms', `{ client_stream_socket_perms listen accept }')
@@ -8977,27 +10996,29 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/support/obj_perm_sets
 +
 +
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/users serefpolicy-3.0.1/policy/users
---- nsaserefpolicy/policy/users	2007-05-29 14:10:59.000000000 -0400
-+++ serefpolicy-3.0.1/policy/users	2007-05-30 15:12:50.000000000 -0400
-@@ -36,8 +36,12 @@
- # role should use the staff_r role instead of the user_r role when
- # not in the sysadm_r.
+--- nsaserefpolicy/policy/users	2007-05-31 15:36:08.000000000 -0400
++++ serefpolicy-3.0.1/policy/users	2007-06-19 17:06:27.000000000 -0400
+@@ -16,7 +16,7 @@
+ # and a user process should never be assigned the system user
+ # identity.
  #
--ifdef(`direct_sysadm_daemon',`
--	gen_user(root, sysadm, sysadm_r staff_r ifdef(`enable_mls',`secadm_r auditadm_r') system_r, s0, s0 - mls_systemhigh, mcs_allcats)
-+ifdef(`targeted_policy',`
-+	gen_user(root, user, user_r sysadm_r system_r, s0, s0 - mls_systemhigh, mcs_allcats)
- ',`
--	gen_user(root, sysadm, sysadm_r staff_r ifdef(`enable_mls',`secadm_r auditadm_r'), s0, s0 - mls_systemhigh, mcs_allcats)
-+	ifdef(`direct_sysadm_daemon',`
-+		gen_user(root, sysadm, sysadm_r staff_r ifdef(`enable_mls',`secadm_r auditadm_r') system_r, s0, s0 - mls_systemhigh, mcs_allcats)
-+	',`
-+		gen_user(root, sysadm, sysadm_r staff_r ifdef(`enable_mls',`secadm_r auditadm_r'), s0, s0 - mls_systemhigh, mcs_allcats)
-+	')
- ')
+-gen_user(system_u,, system_r, s0, s0 - mls_systemhigh, mcs_allcats)
++gen_user(system_u, user, system_r, s0, s0 - mls_systemhigh, mcs_allcats)
+ 
+ #
+ # user_u is a generic user identity for Linux users who have no
+@@ -25,7 +25,7 @@
+ # SELinux user identity for a Linux user.  If you do not want to
+ # permit any access to such users, then remove this entry.
+ #
+-gen_user(user_u, user, user_r, s0, s0)
++gen_user(user_u, user, user_r system_r, s0, s0)
+ gen_user(staff_u, staff, staff_r sysadm_r ifdef(`enable_mls',`secadm_r auditadm_r'), s0, s0 - mls_systemhigh, mcs_allcats)
+ gen_user(sysadm_u, sysadm, sysadm_r, s0, s0 - mls_systemhigh, mcs_allcats)
+ 
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/Rules.modular serefpolicy-3.0.1/Rules.modular
 --- nsaserefpolicy/Rules.modular	2007-05-25 09:09:10.000000000 -0400
-+++ serefpolicy-3.0.1/Rules.modular	2007-05-30 15:12:50.000000000 -0400
++++ serefpolicy-3.0.1/Rules.modular	2007-06-19 17:06:27.000000000 -0400
 @@ -167,7 +167,7 @@
  # these have to run individually because order matters:
  	$(verbose) $(GREP) '^sid ' $(tmpdir)/all_te_files.conf >> $(tmpdir)/all_post.conf || true
@@ -9026,7 +11047,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/Rules.modular serefpolicy-3.
  clean:
 diff --exclude-from=exclude -N -u -r nsaserefpolicy/support/Makefile.devel serefpolicy-3.0.1/support/Makefile.devel
 --- nsaserefpolicy/support/Makefile.devel	2007-05-29 13:53:56.000000000 -0400
-+++ serefpolicy-3.0.1/support/Makefile.devel	2007-05-31 06:38:16.000000000 -0400
++++ serefpolicy-3.0.1/support/Makefile.devel	2007-06-19 17:06:27.000000000 -0400
 @@ -24,7 +24,7 @@
  XMLLINT := $(BINDIR)/xmllint
  
diff --git a/securetty_types-targeted b/securetty_types-targeted
index e69de29..fe7ce17 100644
--- a/securetty_types-targeted
+++ b/securetty_types-targeted
@@ -0,0 +1,3 @@
+sysadm_tty_device_t
+user_tty_device_t
+staff_tty_device_t
diff --git a/selinux-policy.spec b/selinux-policy.spec
index ce99ad9..b4ede7e 100644
--- a/selinux-policy.spec
+++ b/selinux-policy.spec
@@ -4,13 +4,16 @@
 %if %{?BUILD_TARGETED:0}%{!?BUILD_TARGETED:1}
 %define BUILD_TARGETED 1
 %endif
+%if %{?BUILD_OLPC:0}%{!?BUILD_OLPC:1}
+%define BUILD_OLPC 0
+%endif
 %if %{?BUILD_MLS:0}%{!?BUILD_MLS:1}
 %define BUILD_MLS 1
 %endif
 %define POLICYVER 21
-%define libsepolver 2.0.1-2
-%define POLICYCOREUTILSVER 2.0.7-5
-%define CHECKPOLICYVER 2.0.1-2
+%define libsepolver 2.0.3-2
+%define POLICYCOREUTILSVER 2.0.21-1
+%define CHECKPOLICYVER 2.0.3-1
 Summary: SELinux policy configuration
 Name: selinux-policy
 Version: 3.0.1
@@ -26,6 +29,10 @@ Source4: setrans-targeted.conf
 Source5: modules-mls.conf
 Source6: booleans-mls.conf	
 Source8: setrans-mls.conf
+Source9: modules-olpc.conf
+Source10: booleans-olpc.conf	
+Source11: setrans-olpc.conf
+Source12: securetty_types-olpc
 Source13: policygentool
 Source14: securetty_types-targeted
 Source15: securetty_types-mls
@@ -68,6 +75,7 @@ SELinux Policy development package
 
 %post devel
 [ -x /usr/sbin/sepolgen-ifgen ] && /usr/sbin/sepolgen-ifgen  > /dev/null
+exit 0
 
 %define setupCmds() \
 make NAME=%1 TYPE=%2 DISTRO=%{distro} DIRECT_INITRC=%3 MONOLITHIC=%{monolithic} POLY=%4 MLS_CATS=1024 MCS_CATS=1024 bare \
@@ -132,7 +140,10 @@ install -m0644 ${RPM_SOURCE_DIR}/setrans-%1.conf %{buildroot}%{_sysconfdir}/seli
 %ghost %{_sysconfdir}/selinux/%1/contexts/files/file_contexts.homedirs \
 %config %{_sysconfdir}/selinux/%1/contexts/files/media \
 %dir %{_sysconfdir}/selinux/%1/contexts/users \
-%config(noreplace) %{_sysconfdir}/selinux/%1/contexts/users/root
+%config(noreplace) %{_sysconfdir}/selinux/%1/contexts/users/root \
+%config(noreplace) %{_sysconfdir}/selinux/%1/contexts/users/guest_u \
+%config(noreplace) %{_sysconfdir}/selinux/%1/contexts/users/user_u \
+%config(noreplace) %{_sysconfdir}/selinux/%1/contexts/users/staff_u 
 
 %define saveFileContext() \
 if [ -s /etc/selinux/config ]; then \
@@ -143,7 +154,7 @@ if [ -s /etc/selinux/config ]; then \
 	fi \
 fi
 
-%define rebuildpolicy() \
+%define loadpolicy() \
 ( cd /usr/share/selinux/%1; \
 semodule -b base.pp %{expand:%%moduleList %1} -s %1; \
 );\
@@ -161,7 +172,7 @@ fi;
 
 %description
 SELinux Reference Policy - modular.
-Based off of reference policy: Checked out revision 2312.
+Based off of reference policy: Checked out revision 2336.
 
 %prep 
 %setup -q -n serefpolicy-%{version}
@@ -185,17 +196,24 @@ make clean
 %if %{BUILD_TARGETED}
 # Build targeted policy
 # Commented out because only targeted ref policy currently builds
-%setupCmds targeted targeted-mcs y y
-%installCmds targeted targeted-mcs y y
+%setupCmds targeted targeted-mcs n y
+%installCmds targeted targeted-mcs n y
 %endif
 
 %if %{BUILD_MLS}
 # Build mls policy
-%setupCmds mls strict-mls y y
-%installCmds mls strict-mls y y 
+%setupCmds mls strict-mls n y
+%installCmds mls strict-mls n y 
+%endif
+
+%if %{BUILD_OLPC}
+# Build targeted policy
+# Commented out because only targeted ref policy currently builds
+%setupCmds olpc targeted-mcs n y
+%installCmds olpc targeted-mcs n y
 %endif
 
-make NAME=targeted TYPE=targeted-mcs DISTRO=%{distro} DIRECT_INITRC=y MONOLITHIC=%{monolithic} DESTDIR=%{buildroot} PKGNAME=%{name}-%{version} POLY=y MLS_CATS=1024 MCS_CATS=1024 install-headers install-docs
+make NAME=targeted TYPE=targeted-mcs DISTRO=%{distro} DIRECT_INITRC=n MONOLITHIC=%{monolithic} DESTDIR=%{buildroot} PKGNAME=%{name}-%{version} POLY=y MLS_CATS=1024 MCS_CATS=1024 install-headers install-docs
 mkdir %{buildroot}%{_usr}/share/selinux/devel/
 mv %{buildroot}%{_usr}/share/selinux/targeted/include %{buildroot}%{_usr}/share/selinux/devel/include
 install -m 755 ${RPM_SOURCE_DIR}/policygentool %{buildroot}%{_usr}/share/selinux/devel/
@@ -251,6 +269,7 @@ if [ $1 = 0 ]; then
 		sed -i 's/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config
 	fi
 fi
+exit 0
 
 %if %{BUILD_TARGETED}
 %package targeted
@@ -269,14 +288,42 @@ SELinux Reference policy targeted base module.
 %saveFileContext targeted
 
 %post targeted
-%rebuildpolicy targeted
+%loadpolicy targeted
 %relabel targeted
+exit 0
 
-%triggerpostun targeted -- selinux-policy-targeted <= 2.0.7
-%rebuildpolicy targeted
+%triggerpostun targeted -- selinux-policy-targeted < 3.0.1
+semanage login -m -s "system_u" __default__ 2> /dev/null
+semanage user -a -P unconfined -R "unconfined_r system_r" unconfined_u 2> /dev/null
+restorecon -R /root 2> /dev/null
+exit 0
 
 %files targeted
 %fileList targeted
+%endif
+
+%if %{BUILD_OLPC}
+%package olpc 
+Summary: SELinux olpc base policy
+Group: System Environment/Base
+Provides: selinux-policy-base
+Prereq: policycoreutils >= %{POLICYCOREUTILSVER}
+Prereq: coreutils
+Prereq: selinux-policy = %{version}-%{release}
+
+%description olpc 
+SELinux Reference policy olpc base module.
+
+%pre olpc 
+%saveFileContext olpc
+
+%post olpc 
+%loadpolicy olpc
+%relabel olpc
+exit 0
+
+%files olpc
+%fileList olpc
 
 %endif
 
@@ -298,8 +345,9 @@ SELinux Reference policy mls base module.
 %saveFileContext mls
 
 %post mls 
-%rebuildpolicy mls
+%loadpolicy mls
 %relabel mls
+exit 0
 
 %files mls
 %fileList mls