+@@ -962,11 +1017,58 @@
+ ##
+ ##
+ #
+-template(`userdom_unpriv_user_template', `
+-
++template(`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_template($1)
++ userdom_privhome_user_template($1)
++
++ 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;
+
++ auth_exec_pam($1_t)
++
++ optional_policy(`
++ loadkeys_run($1_t,$1_r,$1_tty_device_t)
++ ')
++')
+
+#######################################
+##
@@ -10929,44 +11014,19 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/userdo
+##
+##
+#
-+template(`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_template($1)
-+ userdom_privhome_user_template($1)
-+
-+ typeattribute $1_t unpriv_userdomain;
++template(`userdom_unpriv_user_template', `
+
-+ 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;
-+
-+ auth_exec_pam($1_t)
-
- optional_policy(`
-- usernetctl_run($1_t,$1_r,{ $1_devpts_t $1_tty_device_t })
-+ loadkeys_run($1_t,$1_r,$1_tty_device_t)
- ')
- ')
-
-@@ -964,9 +1057,7 @@
- #
- template(`userdom_unpriv_user_template', `
-
-- gen_require(`
-- attribute privhome, user_ptynode, user_home_dir_type, user_home_type, user_tmpfile, user_ttynode;
-- ')
+ userdom_unpriv_login_user($1)
++
++ # 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)
##############################
#
-@@ -976,25 +1067,11 @@
+@@ -976,25 +1078,11 @@
# Inherit rules for ordinary users.
userdom_common_user_template($1)
@@ -10992,7 +11052,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/userdo
# 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)
# Need the following rule to allow users to run vpnc
-@@ -1033,14 +1110,6 @@
+@@ -1033,14 +1121,6 @@
')
optional_policy(`
@@ -11007,7 +11067,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/userdo
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 })
')
-@@ -1054,17 +1123,6 @@
+@@ -1054,17 +1134,6 @@
setroubleshoot_stream_connect($1_t)
')
@@ -11025,7 +11085,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/userdo
')
#######################################
-@@ -1102,6 +1160,8 @@
+@@ -1102,6 +1171,8 @@
class passwd { passwd chfn chsh rootok crontab };
')
@@ -11034,7 +11094,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/userdo
##############################
#
# Declarations
-@@ -1127,7 +1187,7 @@
+@@ -1127,7 +1198,7 @@
# $1_t local policy
#
@@ -11043,16 +11103,20 @@ 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.
-@@ -1139,8 +1199,6 @@
+@@ -1139,7 +1210,11 @@
# Manipulate other users crontab.
allow $1_t self:passwd crontab;
- allow $1_t self:netlink_audit_socket nlmsg_readpriv;
--
++ # 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)
+
kernel_read_software_raid_state($1_t)
kernel_getattr_core_if($1_t)
- kernel_getattr_message_if($1_t)
-@@ -1902,6 +1960,41 @@
+@@ -1902,6 +1977,41 @@
########################################
##