-@@ -962,21 +1020,16 @@
- ##
- ##
- #
--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;
- ')
--
-- ##############################
-- #
-- # Declarations
-- #
--
-- # Inherit rules for ordinary users.
-- userdom_common_user_template($1)
-+ 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;
-@@ -985,36 +1038,68 @@
- typeattribute $1_tmp_t user_tmpfile;
- typeattribute $1_tty_device_t user_ttynode;
-
-- userdom_poly_home_template($1)
-- userdom_poly_tmp_template($1)
-+ auth_exec_pam($1_t)
++ quota_dontaudit_getattr_db($1_t)
++ ')
+
+ optional_policy(`
-+ loadkeys_run($1_t,$1_r,$1_tty_device_t)
-+ ')
++ rpm_read_db($1_t)
++ rpm_dontaudit_manage_db($1_t)
+ ')
+')
+
++
+#######################################
+##
@@ -11416,78 +10929,85 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/userdo
+##
+##
+#
-+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(`
+- 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)
##############################
#
-- # Local policy
-+ # Declarations
+@@ -976,25 +1067,11 @@
+ # Inherit rules for ordinary users.
+ userdom_common_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;
+-
+- userdom_poly_home_template($1)
+- userdom_poly_tmp_template($1)
+-
+ ##############################
+ #
+ # Local policy
#
- corecmd_exec_all_executables($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)
-+ corenet_dontaudit_tcp_bind_all_reserved_ports($1_usertype)
+ corenet_dontaudit_tcp_bind_all_reserved_ports($1_t)
# Need the following rule to allow users to run vpnc
-- corenet_tcp_bind_xserver_port($1_t)
-+ corenet_tcp_bind_xserver_port($1_usertype)
-
-- files_exec_usr_files($1_t)
-+ files_exec_usr_files($1_usertype)
- # cjp: why?
-- files_read_kernel_symbol_table($1_t)
-+ files_read_kernel_symbol_table($1_usertype)
-
- ifndef(`enable_mls',`
-- fs_exec_noxattr($1_t)
-+ fs_exec_noxattr($1_usertype)
-
- tunable_policy(`user_rw_noexattrfile',`
-- fs_manage_noxattr_fs_files($1_t)
-- fs_manage_noxattr_fs_dirs($1_t)
-+ fs_manage_noxattr_fs_files($1_usertype)
-+ fs_manage_noxattr_fs_dirs($1_usertype)
- # Write floppies
-- storage_raw_read_removable_device($1_t)
-- storage_raw_write_removable_device($1_t)
-+ storage_raw_read_removable_device($1_usertype)
-+ storage_raw_write_removable_device($1_usertype)
- ',`
-- storage_raw_read_removable_device($1_t)
-+ storage_raw_read_removable_device($1_usertype)
- ')
+@@ -1033,14 +1110,6 @@
')
-@@ -1028,16 +1113,8 @@
- # the same domain and outside users) disabling this forces FTP passive mode
- # and may change other protocols
- tunable_policy(`user_tcp_server',`
-- corenet_tcp_bind_all_nodes($1_t)
-- corenet_tcp_bind_generic_port($1_t)
+ optional_policy(`
+- kerberos_use($1_t)
- ')
-
- optional_policy(`
-- kerberos_use($1_t)
+- loadkeys_run($1_t,$1_r,$1_tty_device_t)
- ')
-
- optional_policy(`
-- loadkeys_run($1_t,$1_r,$1_tty_device_t)
-+ corenet_tcp_bind_all_nodes($1_usertype)
-+ corenet_tcp_bind_generic_port($1_usertype)
+ 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 })
')
-
- optional_policy(`
-@@ -1054,17 +1131,6 @@
+@@ -1054,17 +1123,6 @@
setroubleshoot_stream_connect($1_t)
')
@@ -11505,7 +11025,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/userdo
')
#######################################
-@@ -1102,6 +1168,8 @@
+@@ -1102,6 +1160,8 @@
class passwd { passwd chfn chsh rootok crontab };
')
@@ -11514,7 +11034,7 @@ diff --exclude-from=exclude -N -u -r nsaserefpolicy/policy/modules/system/userdo
##############################
#
# Declarations
-@@ -1127,7 +1195,7 @@
+@@ -1127,7 +1187,7 @@
# $1_t local policy
#
@@ -11523,7 +11043,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.
-@@ -1139,8 +1207,6 @@
+@@ -1139,8 +1199,6 @@
# Manipulate other users crontab.
allow $1_t self:passwd crontab;
@@ -11532,7 +11052,7 @@ 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)
-@@ -1902,6 +1968,41 @@
+@@ -1902,6 +1960,41 @@
########################################
##