++##
++## Allow racoon to read shadow
++##
++##
++gen_tunable(racoon_read_shadow, false)
++
+ type ipsec_t;
+ type ipsec_exec_t;
+ init_daemon_domain(ipsec_t, ipsec_exec_t)
+@@ -15,6 +22,9 @@
type ipsec_conf_file_t;
files_type(ipsec_conf_file_t)
@@ -20985,7 +21263,7 @@ diff -b -B --ignore-all-space --exclude-from=exclude -N -u -r nsaserefpolicy/pol
# type for file(s) containing ipsec keys - RSA or preshared
type ipsec_key_file_t;
files_type(ipsec_key_file_t)
-@@ -53,21 +56,23 @@
+@@ -53,21 +63,23 @@
# ipsec Local policy
#
@@ -21012,7 +21290,7 @@ diff -b -B --ignore-all-space --exclude-from=exclude -N -u -r nsaserefpolicy/pol
read_lnk_files_pattern(ipsec_t, ipsec_key_file_t, ipsec_key_file_t)
manage_files_pattern(ipsec_t, ipsec_var_run_t, ipsec_var_run_t)
-@@ -76,7 +81,7 @@
+@@ -76,7 +88,7 @@
can_exec(ipsec_t, ipsec_mgmt_exec_t)
@@ -21021,7 +21299,7 @@ diff -b -B --ignore-all-space --exclude-from=exclude -N -u -r nsaserefpolicy/pol
# a shell script, we need to find a way to make things work without
# letting all sorts of stuff possibly be run...
# so try flipping back into the ipsec_mgmt_t domain
-@@ -95,9 +100,6 @@
+@@ -95,9 +107,6 @@
kernel_getattr_core_if(ipsec_t)
kernel_getattr_message_if(ipsec_t)
@@ -21031,7 +21309,7 @@ diff -b -B --ignore-all-space --exclude-from=exclude -N -u -r nsaserefpolicy/pol
# Pluto needs network access
corenet_all_recvfrom_unlabeled(ipsec_t)
corenet_tcp_sendrecv_all_if(ipsec_t)
-@@ -118,21 +120,26 @@
+@@ -118,21 +127,26 @@
dev_read_rand(ipsec_t)
dev_read_urand(ipsec_t)
@@ -21063,7 +21341,7 @@ diff -b -B --ignore-all-space --exclude-from=exclude -N -u -r nsaserefpolicy/pol
logging_send_syslog_msg(ipsec_t)
miscfiles_read_localization(ipsec_t)
-@@ -154,12 +161,12 @@
+@@ -154,12 +168,12 @@
#
allow ipsec_mgmt_t self:capability { net_admin sys_tty_config dac_override dac_read_search };
@@ -21078,7 +21356,7 @@ diff -b -B --ignore-all-space --exclude-from=exclude -N -u -r nsaserefpolicy/pol
allow ipsec_mgmt_t ipsec_mgmt_lock_t:file manage_file_perms;
files_lock_filetrans(ipsec_mgmt_t, ipsec_mgmt_lock_t, file)
-@@ -209,15 +216,21 @@
+@@ -209,15 +223,21 @@
files_read_kernel_symbol_table(ipsec_mgmt_t)
files_getattr_kernel_modules(ipsec_mgmt_t)
@@ -21103,7 +21381,7 @@ diff -b -B --ignore-all-space --exclude-from=exclude -N -u -r nsaserefpolicy/pol
domain_use_interactive_fds(ipsec_mgmt_t)
# denials when ps tries to search /proc. Do not audit these denials.
domain_dontaudit_list_all_domains_state(ipsec_mgmt_t)
-@@ -232,12 +245,6 @@
+@@ -232,12 +252,6 @@
files_dontaudit_getattr_default_dirs(ipsec_mgmt_t)
files_dontaudit_getattr_default_files(ipsec_mgmt_t)
@@ -21116,15 +21394,17 @@ diff -b -B --ignore-all-space --exclude-from=exclude -N -u -r nsaserefpolicy/pol
init_use_script_ptys(ipsec_mgmt_t)
init_exec_script_files(ipsec_mgmt_t)
init_use_fds(ipsec_mgmt_t)
-@@ -280,6 +287,7 @@
+@@ -280,6 +294,9 @@
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_socket_perms;
+allow racoon_t self:fifo_file rw_fifo_file_perms;
++
++can_exec(racoon_t, setkey_exec_t)
# manage pid file
manage_files_pattern(racoon_t, ipsec_var_run_t, ipsec_var_run_t)
-@@ -297,6 +305,13 @@
+@@ -297,6 +314,13 @@
kernel_read_system_state(racoon_t)
kernel_read_network_state(racoon_t)
@@ -21138,7 +21418,12 @@ diff -b -B --ignore-all-space --exclude-from=exclude -N -u -r nsaserefpolicy/pol
corenet_all_recvfrom_unlabeled(racoon_t)
corenet_tcp_sendrecv_all_if(racoon_t)
corenet_udp_sendrecv_all_if(racoon_t)
-@@ -317,10 +332,10 @@
+@@ -314,13 +338,15 @@
+
+ files_read_etc_files(racoon_t)
+
++fs_dontaudit_getattr_xattr_fs(racoon_t)
++
# allow racoon to use avc_has_perm to check context on proposed SA
selinux_compute_access_vector(racoon_t)
@@ -21151,7 +21436,19 @@ diff -b -B --ignore-all-space --exclude-from=exclude -N -u -r nsaserefpolicy/pol
locallogin_use_fds(racoon_t)
logging_send_syslog_msg(racoon_t)
-@@ -347,6 +362,7 @@
+@@ -328,6 +354,11 @@
+
+ miscfiles_read_localization(racoon_t)
+
++auth_can_read_shadow_passwords(racoon_t)
++tunable_policy(`racoon_read_shadow',`
++ auth_tunable_read_shadow(racoon_t)
++')
++
+ ########################################
+ #
+ # Setkey local policy
+@@ -347,6 +378,7 @@
files_read_etc_files(setkey_t)
init_dontaudit_use_fds(setkey_t)
@@ -21159,9 +21456,9 @@ diff -b -B --ignore-all-space --exclude-from=exclude -N -u -r nsaserefpolicy/pol
# allow setkey to set the context for ipsec SAs and policy.
ipsec_setcontext_default_spd(setkey_t)
-diff -b -B --ignore-all-space --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/iptables.fc serefpolicy-3.6.27/policy/modules/system/iptables.fc
+diff -b -B --ignore-all-space --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/iptables.fc serefpolicy-3.6.28/policy/modules/system/iptables.fc
--- nsaserefpolicy/policy/modules/system/iptables.fc 2009-07-14 14:19:57.000000000 -0400
-+++ serefpolicy-3.6.27/policy/modules/system/iptables.fc 2009-08-14 16:51:06.000000000 -0400
++++ serefpolicy-3.6.28/policy/modules/system/iptables.fc 2009-08-18 13:23:29.000000000 -0400
@@ -1,9 +1,10 @@
-/sbin/ip6tables.* -- gen_context(system_u:object_r:iptables_exec_t,s0)
/sbin/ipchains.* -- gen_context(system_u:object_r:iptables_exec_t,s0)
@@ -21178,9 +21475,9 @@ diff -b -B --ignore-all-space --exclude-from=exclude -N -u -r nsaserefpolicy/pol
+/usr/sbin/iptables-multi -- gen_context(system_u:object_r:iptables_exec_t,s0)
-/var/lib/shorewall(/.*)? -- gen_context(system_u:object_r:iptables_var_run_t,s0)
-diff -b -B --ignore-all-space --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/iptables.te serefpolicy-3.6.27/policy/modules/system/iptables.te
+diff -b -B --ignore-all-space --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/iptables.te serefpolicy-3.6.28/policy/modules/system/iptables.te
--- nsaserefpolicy/policy/modules/system/iptables.te 2009-08-14 16:14:31.000000000 -0400
-+++ serefpolicy-3.6.27/policy/modules/system/iptables.te 2009-08-14 16:51:06.000000000 -0400
++++ serefpolicy-3.6.28/policy/modules/system/iptables.te 2009-08-18 13:23:29.000000000 -0400
@@ -53,6 +53,7 @@
mls_file_read_all_levels(iptables_t)
@@ -21200,9 +21497,9 @@ diff -b -B --ignore-all-space --exclude-from=exclude -N -u -r nsaserefpolicy/pol
rhgb_dontaudit_use_ptys(iptables_t)
')
-diff -b -B --ignore-all-space --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/iscsi.if serefpolicy-3.6.27/policy/modules/system/iscsi.if
+diff -b -B --ignore-all-space --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/iscsi.if serefpolicy-3.6.28/policy/modules/system/iscsi.if
--- nsaserefpolicy/policy/modules/system/iscsi.if 2009-07-14 14:19:57.000000000 -0400
-+++ serefpolicy-3.6.27/policy/modules/system/iscsi.if 2009-08-14 16:51:06.000000000 -0400
++++ serefpolicy-3.6.28/policy/modules/system/iscsi.if 2009-08-18 13:23:29.000000000 -0400
@@ -17,3 +17,43 @@
domtrans_pattern($1, iscsid_exec_t, iscsid_t)
@@ -21247,9 +21544,9 @@ diff -b -B --ignore-all-space --exclude-from=exclude -N -u -r nsaserefpolicy/pol
+ stream_connect_pattern($1,iscsi_var_lib_t,iscsi_var_lib_t,iscsid_t)
+')
+
-diff -b -B --ignore-all-space --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/iscsi.te serefpolicy-3.6.27/policy/modules/system/iscsi.te
+diff -b -B --ignore-all-space --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/iscsi.te serefpolicy-3.6.28/policy/modules/system/iscsi.te
--- nsaserefpolicy/policy/modules/system/iscsi.te 2009-08-14 16:14:31.000000000 -0400
-+++ serefpolicy-3.6.27/policy/modules/system/iscsi.te 2009-08-14 16:51:06.000000000 -0400
++++ serefpolicy-3.6.28/policy/modules/system/iscsi.te 2009-08-18 13:23:29.000000000 -0400
@@ -55,6 +55,7 @@
files_pid_filetrans(iscsid_t, iscsi_var_run_t, file)
@@ -21273,9 +21570,9 @@ diff -b -B --ignore-all-space --exclude-from=exclude -N -u -r nsaserefpolicy/pol
-sysnet_dns_name_resolve(iscsid_t)
+miscfiles_read_localization(iscsid_t)
-diff -b -B --ignore-all-space --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/kdump.fc serefpolicy-3.6.27/policy/modules/system/kdump.fc
+diff -b -B --ignore-all-space --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/kdump.fc serefpolicy-3.6.28/policy/modules/system/kdump.fc
--- nsaserefpolicy/policy/modules/system/kdump.fc 1969-12-31 19:00:00.000000000 -0500
-+++ serefpolicy-3.6.27/policy/modules/system/kdump.fc 2009-08-14 16:51:06.000000000 -0400
++++ serefpolicy-3.6.28/policy/modules/system/kdump.fc 2009-08-18 13:23:29.000000000 -0400
@@ -0,0 +1,8 @@
+
+/etc/rc\.d/init\.d/kdump -- gen_context(system_u:object_r:kdump_initrc_exec_t,s0)
@@ -21285,9 +21582,9 @@ diff -b -B --ignore-all-space --exclude-from=exclude -N -u -r nsaserefpolicy/pol
+
+/etc/kdump\.conf -- gen_context(system_u:object_r:kdump_etc_t,s0)
+
-diff -b -B --ignore-all-space --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/kdump.if serefpolicy-3.6.27/policy/modules/system/kdump.if
+diff -b -B --ignore-all-space --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/kdump.if serefpolicy-3.6.28/policy/modules/system/kdump.if
--- nsaserefpolicy/policy/modules/system/kdump.if 1969-12-31 19:00:00.000000000 -0500
-+++ serefpolicy-3.6.27/policy/modules/system/kdump.if 2009-08-14 16:51:06.000000000 -0400
++++ serefpolicy-3.6.28/policy/modules/system/kdump.if 2009-08-18 13:23:29.000000000 -0400
@@ -0,0 +1,111 @@
+##