37b75a0
diff -up serefpolicy-3.10.0/policy/modules/admin/mcelog.te.passwd serefpolicy-3.10.0/policy/modules/admin/mcelog.te
37b75a0
--- serefpolicy-3.10.0/policy/modules/admin/mcelog.te.passwd	2011-10-21 09:57:41.024059743 -0400
37b75a0
+++ serefpolicy-3.10.0/policy/modules/admin/mcelog.te	2011-10-21 09:57:41.523059314 -0400
a004ca8
@@ -45,6 +45,8 @@ files_read_etc_files(mcelog_t)
a004ca8
 # for /dev/mem access
a004ca8
 mls_file_read_all_levels(mcelog_t)
a004ca8
 
a004ca8
+auth_read_passwd(mcelog_t)
a004ca8
+
a004ca8
 logging_send_syslog_msg(mcelog_t)
a004ca8
 
a004ca8
 miscfiles_read_localization(mcelog_t)
37b75a0
diff -up serefpolicy-3.10.0/policy/modules/admin/usermanage.te.passwd serefpolicy-3.10.0/policy/modules/admin/usermanage.te
37b75a0
--- serefpolicy-3.10.0/policy/modules/admin/usermanage.te.passwd	2011-10-21 09:57:41.053059719 -0400
37b75a0
+++ serefpolicy-3.10.0/policy/modules/admin/usermanage.te	2011-10-21 09:58:51.127999915 -0400
37b75a0
@@ -91,6 +91,7 @@ fs_search_auto_mountpoints(chfn_t)
859ba0c
 dev_read_urand(chfn_t)
859ba0c
 dev_dontaudit_getattr_all(chfn_t)
859ba0c
 
859ba0c
+auth_manage_passwd(chfn_t)
859ba0c
 auth_use_pam(chfn_t)
859ba0c
 
859ba0c
 # allow checking if a shell is executable
37b75a0
@@ -98,7 +99,6 @@ corecmd_check_exec_shell(chfn_t)
a004ca8
 
a004ca8
 domain_use_interactive_fds(chfn_t)
a004ca8
 
a004ca8
-files_manage_etc_files(chfn_t)
a004ca8
 files_read_etc_runtime_files(chfn_t)
a004ca8
 files_dontaudit_search_var(chfn_t)
a004ca8
 files_dontaudit_search_home(chfn_t)
37b75a0
@@ -209,8 +209,8 @@ init_dontaudit_write_utmp(groupadd_t)
859ba0c
 
859ba0c
 domain_use_interactive_fds(groupadd_t)
859ba0c
 
859ba0c
-files_manage_etc_files(groupadd_t)
859ba0c
 files_relabel_etc_files(groupadd_t)
859ba0c
+files_read_etc_files(groupadd_t)
859ba0c
 files_read_etc_runtime_files(groupadd_t)
859ba0c
 files_read_usr_symlinks(groupadd_t)
859ba0c
 
37b75a0
@@ -225,9 +225,10 @@ miscfiles_read_localization(groupadd_t)
859ba0c
 auth_domtrans_chk_passwd(groupadd_t)
859ba0c
 auth_rw_lastlog(groupadd_t)
859ba0c
 auth_use_nsswitch(groupadd_t)
859ba0c
+auth_manage_passwd(groupadd_t)
859ba0c
+auth_manage_shadow(groupadd_t)
859ba0c
 # these may be unnecessary due to the above
859ba0c
 # domtrans_chk_passwd() call.
859ba0c
-auth_manage_shadow(groupadd_t)
859ba0c
 auth_relabel_shadow(groupadd_t)
859ba0c
 auth_etc_filetrans_shadow(groupadd_t)
a004ca8
 
37b75a0
@@ -301,6 +302,7 @@ selinux_compute_user_contexts(passwd_t)
859ba0c
 term_use_all_inherited_terms(passwd_t)
37b75a0
 term_getattr_all_ptys(passwd_t)
859ba0c
 
859ba0c
+auth_manage_passwd(passwd_t)
859ba0c
 auth_manage_shadow(passwd_t)
859ba0c
 auth_relabel_shadow(passwd_t)
859ba0c
 auth_etc_filetrans_shadow(passwd_t)
37b75a0
@@ -315,7 +317,6 @@ corenet_tcp_connect_kerberos_password_po
a004ca8
 domain_use_interactive_fds(passwd_t)
a004ca8
 
a004ca8
 files_read_etc_runtime_files(passwd_t)
a004ca8
-files_manage_etc_files(passwd_t)
a004ca8
 files_search_var(passwd_t)
a004ca8
 files_dontaudit_search_pids(passwd_t)
a004ca8
 files_relabel_etc_files(passwd_t)
37b75a0
@@ -396,6 +397,7 @@ fs_search_auto_mountpoints(sysadm_passwd
859ba0c
 term_use_all_inherited_terms(sysadm_passwd_t)
37b75a0
 term_getattr_all_ptys(sysadm_passwd_t)
a004ca8
 
859ba0c
+auth_manage_passwd(sysadm_passwd_t)
859ba0c
 auth_manage_shadow(sysadm_passwd_t)
859ba0c
 auth_relabel_shadow(sysadm_passwd_t)
859ba0c
 auth_etc_filetrans_shadow(sysadm_passwd_t)
37b75a0
@@ -408,7 +410,6 @@ files_read_usr_files(sysadm_passwd_t)
a004ca8
 
a004ca8
 domain_use_interactive_fds(sysadm_passwd_t)
a004ca8
 
a004ca8
-files_manage_etc_files(sysadm_passwd_t)
a004ca8
 files_relabel_etc_files(sysadm_passwd_t)
a004ca8
 files_read_etc_runtime_files(sysadm_passwd_t)
a004ca8
 # for nscd lookups
37b75a0
@@ -467,7 +468,6 @@ domain_use_interactive_fds(useradd_t)
a004ca8
 domain_read_all_domains_state(useradd_t)
a004ca8
 domain_dontaudit_read_all_domains_state(useradd_t)
a004ca8
 
a004ca8
-files_manage_etc_files(useradd_t)
a004ca8
 files_search_var_lib(useradd_t)
a004ca8
 files_relabel_etc_files(useradd_t)
a004ca8
 files_read_etc_runtime_files(useradd_t)
37b75a0
@@ -495,6 +495,7 @@ auth_rw_faillog(useradd_t)
a004ca8
 auth_use_nsswitch(useradd_t)
a004ca8
 # these may be unnecessary due to the above
a004ca8
 # domtrans_chk_passwd() call.
a004ca8
+auth_manage_passwd(useradd_t)
a004ca8
 auth_manage_shadow(useradd_t)
a004ca8
 auth_relabel_shadow(useradd_t)
a004ca8
 auth_etc_filetrans_shadow(useradd_t)
37b75a0
diff -up serefpolicy-3.10.0/policy/modules/apps/loadkeys.te.passwd serefpolicy-3.10.0/policy/modules/apps/loadkeys.te
37b75a0
--- serefpolicy-3.10.0/policy/modules/apps/loadkeys.te.passwd	2011-10-21 09:57:41.074059700 -0400
37b75a0
+++ serefpolicy-3.10.0/policy/modules/apps/loadkeys.te	2011-10-21 09:57:41.525059314 -0400
a004ca8
@@ -31,6 +31,8 @@ files_read_etc_runtime_files(loadkeys_t)
a004ca8
 term_dontaudit_use_console(loadkeys_t)
a004ca8
 term_use_unallocated_ttys(loadkeys_t)
a004ca8
 
a004ca8
+auth_read_passwd(loadkeys_t)
a004ca8
+
a004ca8
 init_dontaudit_use_fds(loadkeys_t)
a004ca8
 init_dontaudit_use_script_ptys(loadkeys_t)
a004ca8
 
37b75a0
diff -up serefpolicy-3.10.0/policy/modules/services/abrt.te.passwd serefpolicy-3.10.0/policy/modules/services/abrt.te
37b75a0
--- serefpolicy-3.10.0/policy/modules/services/abrt.te.passwd	2011-10-21 09:57:41.146059638 -0400
37b75a0
+++ serefpolicy-3.10.0/policy/modules/services/abrt.te	2011-10-21 09:57:41.527059312 -0400
37b75a0
@@ -105,7 +105,6 @@ allow abrt_t self:fifo_file rw_fifo_file
a004ca8
 allow abrt_t self:tcp_socket create_stream_socket_perms;
a004ca8
 allow abrt_t self:udp_socket create_socket_perms;
a004ca8
 allow abrt_t self:unix_dgram_socket create_socket_perms;
a004ca8
-allow abrt_t self:netlink_route_socket r_netlink_socket_perms;
a004ca8
 
a004ca8
 # abrt etc files
a004ca8
 list_dirs_pattern(abrt_t, abrt_etc_t, abrt_etc_t)
a004ca8
@@ -186,10 +185,10 @@ fs_read_nfs_files(abrt_t)
a004ca8
 fs_read_nfs_symlinks(abrt_t)
a004ca8
 fs_search_all(abrt_t)
a004ca8
 
a004ca8
-sysnet_dns_name_resolve(abrt_t)
a004ca8
-
a004ca8
 logging_read_generic_logs(abrt_t)
a004ca8
 
a004ca8
+auth_use_nsswitch(abrt_t)
a004ca8
+
a004ca8
 miscfiles_read_generic_certs(abrt_t)
a004ca8
 
a004ca8
 userdom_dontaudit_read_user_home_content_files(abrt_t)
a004ca8
@@ -209,10 +208,6 @@ optional_policy(`
a004ca8
 ')
a004ca8
 
a004ca8
 optional_policy(`
a004ca8
-	nis_use_ypbind(abrt_t)
a004ca8
-')
a004ca8
-
a004ca8
-optional_policy(`
a004ca8
 	nsplugin_read_rw_files(abrt_t)
a004ca8
 	nsplugin_read_home(abrt_t)
a004ca8
 ')
37b75a0
diff -up serefpolicy-3.10.0/policy/modules/services/audioentropy.te.passwd serefpolicy-3.10.0/policy/modules/services/audioentropy.te
37b75a0
--- serefpolicy-3.10.0/policy/modules/services/audioentropy.te.passwd	2011-06-27 14:18:04.000000000 -0400
37b75a0
+++ serefpolicy-3.10.0/policy/modules/services/audioentropy.te	2011-10-21 09:57:41.528059311 -0400
a004ca8
@@ -47,6 +47,8 @@ fs_search_auto_mountpoints(entropyd_t)
a004ca8
 
a004ca8
 domain_use_interactive_fds(entropyd_t)
a004ca8
 
a004ca8
+auth_read_passwd(entropyd_t)
a004ca8
+
a004ca8
 logging_send_syslog_msg(entropyd_t)
a004ca8
 
a004ca8
 miscfiles_read_localization(entropyd_t)
37b75a0
diff -up serefpolicy-3.10.0/policy/modules/services/plymouthd.te.passwd serefpolicy-3.10.0/policy/modules/services/plymouthd.te
37b75a0
--- serefpolicy-3.10.0/policy/modules/services/plymouthd.te.passwd	2011-10-21 09:57:41.332059479 -0400
37b75a0
+++ serefpolicy-3.10.0/policy/modules/services/plymouthd.te	2011-10-21 09:57:41.530059309 -0400
e15ae4f
@@ -75,6 +75,8 @@ init_signal(plymouthd_t)
e15ae4f
 logging_link_generic_logs(plymouthd_t)
e15ae4f
 logging_delete_generic_logs(plymouthd_t)
e15ae4f
 
e15ae4f
+auth_read_passwd(plymouthd_t)
e15ae4f
+
e15ae4f
 miscfiles_read_localization(plymouthd_t)
e15ae4f
 miscfiles_read_fonts(plymouthd_t)
e15ae4f
 miscfiles_manage_fonts_cache(plymouthd_t)
37b75a0
diff -up serefpolicy-3.10.0/policy/modules/services/virt.te.passwd serefpolicy-3.10.0/policy/modules/services/virt.te
37b75a0
--- serefpolicy-3.10.0/policy/modules/services/virt.te.passwd	2011-10-21 09:57:41.435059390 -0400
37b75a0
+++ serefpolicy-3.10.0/policy/modules/services/virt.te	2011-10-21 09:57:41.533059306 -0400
9bf3aa2
@@ -888,6 +888,7 @@ fs_getattr_xattr_fs(svirt_lxc_domain)
e15ae4f
 fs_list_inotifyfs(svirt_lxc_domain)
e15ae4f
 fs_dontaudit_getattr_xattr_fs(svirt_lxc_domain)
e15ae4f
 
e15ae4f
+auth_dontaudit_read_passwd(svirt_lxc_domain)
e15ae4f
 auth_dontaudit_read_login_records(svirt_lxc_domain)
e15ae4f
 auth_dontaudit_write_login_records(svirt_lxc_domain)
e15ae4f
 auth_search_pam_console_data(svirt_lxc_domain)
37b75a0
diff -up serefpolicy-3.10.0/policy/modules/system/authlogin.fc.passwd serefpolicy-3.10.0/policy/modules/system/authlogin.fc
37b75a0
--- serefpolicy-3.10.0/policy/modules/system/authlogin.fc.passwd	2011-10-21 09:57:41.451059376 -0400
37b75a0
+++ serefpolicy-3.10.0/policy/modules/system/authlogin.fc	2011-10-21 09:57:41.534059305 -0400
9bf3aa2
@@ -7,6 +7,9 @@
4d24861
 /etc/passwd\.lock	--	gen_context(system_u:object_r:shadow_t,s0)
4d24861
 /etc/passwd\.adjunct.*	--	gen_context(system_u:object_r:shadow_t,s0)
4d24861
 /etc/shadow.*		--	gen_context(system_u:object_r:shadow_t,s0)
859ba0c
+/etc/passwd-?		--	gen_context(system_u:object_r:passwd_file_t,s0)
9bf3aa2
+/etc/ptmptmp		--	gen_context(system_u:object_r:passwd_file_t,s0)
859ba0c
+/etc/group-?		--	gen_context(system_u:object_r:passwd_file_t,s0)
4d24861
 
4d24861
 /sbin/pam_console_apply	 --	gen_context(system_u:object_r:pam_console_exec_t,s0)
4d24861
 /sbin/pam_timestamp_check --	gen_context(system_u:object_r:pam_exec_t,s0)
37b75a0
diff -up serefpolicy-3.10.0/policy/modules/system/authlogin.if.passwd serefpolicy-3.10.0/policy/modules/system/authlogin.if
37b75a0
--- serefpolicy-3.10.0/policy/modules/system/authlogin.if.passwd	2011-10-21 09:57:41.452059376 -0400
37b75a0
+++ serefpolicy-3.10.0/policy/modules/system/authlogin.if	2011-10-21 09:57:41.535059304 -0400
37b75a0
@@ -561,7 +561,6 @@ interface(`auth_domtrans_upd_passwd',`
4d24861
 
4d24861
 	domtrans_pattern($1, updpwd_exec_t, updpwd_t)
4d24861
 	auth_dontaudit_read_shadow($1)
4d24861
-
4d24861
 ')
4d24861
 
4d24861
 ########################################
37b75a0
@@ -758,6 +757,10 @@ interface(`auth_manage_shadow',`
4d24861
 
4d24861
 	allow $1 shadow_t:file manage_file_perms;
4d24861
 	typeattribute $1 can_read_shadow_passwords, can_write_shadow_passwords;
4d24861
+	files_var_filetrans($1, shadow_t, file, "shadow")
4d24861
+	files_var_filetrans($1, shadow_t, file, "shadow-")
4d24861
+	files_etc_filetrans($1, shadow_t, file, ".pwd.lock")
4d24861
+	files_etc_filetrans($1, shadow_t, file, "gshadow")
4d24861
 ')
4d24861
 
4d24861
 #######################################
37b75a0
@@ -898,6 +901,9 @@ interface(`auth_manage_faillog',`
4d24861
 	files_search_pids($1)
4d24861
 	allow $1 faillog_t:dir manage_dir_perms;
4d24861
 	allow $1 faillog_t:file manage_file_perms;
4d24861
+	logging_log_named_filetrans($1, faillog_t, file, "tallylog")
4d24861
+	logging_log_named_filetrans($1, faillog_t, file, "faillog")
4d24861
+	logging_log_named_filetrans($1, faillog_t, file, "btmp")
4d24861
 ')
4d24861
 
4d24861
 #######################################
37b75a0
@@ -1738,6 +1744,7 @@ interface(`auth_manage_login_records',`
4d24861
 
4d24861
 	logging_rw_generic_log_dirs($1)
4d24861
 	allow $1 wtmp_t:file manage_file_perms;
4d24861
+	logging_log_named_filetrans($1, wtmp_t, file, "wtmp")
4d24861
 ')
4d24861
 
4d24861
 ########################################
37b75a0
@@ -1813,19 +1820,123 @@ interface(`auth_unconfined',`
4d24861
 interface(`authlogin_filetrans_named_content',`
4d24861
 	gen_require(`
4d24861
 		type shadow_t;
4d24861
+		type passwd_file_t;
4d24861
 		type faillog_t;
4d24861
 		type wtmp_t;
4d24861
 	')
4d24861
 
9bf3aa2
+	files_etc_filetrans($1, passwd_file_t, file, "group")
9bf3aa2
+	files_etc_filetrans($1, passwd_file_t, file, "group-")
4d24861
+	files_etc_filetrans($1, passwd_file_t, file, "passwd")
9bf3aa2
+	files_etc_filetrans($1, passwd_file_t, file, "passwd-")
9bf3aa2
+	files_etc_filetrans($1, passwd_file_t, file, "ptmptmp")
4d24861
 	files_etc_filetrans($1, shadow_t, file, "shadow")
4d24861
 	files_etc_filetrans($1, shadow_t, file, "shadow-")
4d24861
 	files_etc_filetrans($1, shadow_t, file, ".pwd.lock")
4d24861
 	files_etc_filetrans($1, shadow_t, file, "gshadow")
4d24861
-	files_var_filetrans($1, shadow_t, file, "shadow")
4d24861
-	files_var_filetrans($1, shadow_t, file, "shadow-")
4d24861
 	logging_log_named_filetrans($1, faillog_t, file, "tallylog")
4d24861
 	logging_log_named_filetrans($1, faillog_t, file, "faillog")
4d24861
 	logging_log_named_filetrans($1, faillog_t, file, "btmp")
4d24861
 	files_pid_filetrans($1, faillog_t, file, "faillog")
4d24861
 	logging_log_named_filetrans($1, wtmp_t, file, "wtmp")
4d24861
 ')
4d24861
+
4d24861
+########################################
4d24861
+## <summary>
4d24861
+##	Get the attributes of the passwd passwords file.
4d24861
+## </summary>
4d24861
+## <param name="domain">
4d24861
+##	<summary>
4d24861
+##	Domain allowed access.
4d24861
+##	</summary>
4d24861
+## </param>
4d24861
+#
4d24861
+interface(`auth_getattr_passwd',`
4d24861
+	gen_require(`
4d24861
+		type passwd_file_t;
4d24861
+	')
4d24861
+
4d24861
+	files_search_etc($1)
4d24861
+	allow $1 passwd_file_t:file getattr;
4d24861
+')
4d24861
+
4d24861
+########################################
4d24861
+## <summary>
4d24861
+##	Do not audit attempts to get the attributes
4d24861
+##	of the passwd passwords file.
4d24861
+## </summary>
4d24861
+## <param name="domain">
4d24861
+##	<summary>
4d24861
+##	Domain to not audit.
4d24861
+##	</summary>
4d24861
+## </param>
4d24861
+#
4d24861
+interface(`auth_dontaudit_getattr_passwd',`
4d24861
+	gen_require(`
4d24861
+		type passwd_file_t;
4d24861
+	')
4d24861
+
4d24861
+	dontaudit $1 passwd_file_t:file getattr;
4d24861
+')
4d24861
+
4d24861
+########################################
4d24861
+## <summary>
4d24861
+##	Read the passwd passwords file (/etc/passwd)
4d24861
+## </summary>
4d24861
+## <param name="domain">
4d24861
+##	<summary>
4d24861
+##	Domain allowed access.
4d24861
+##	</summary>
4d24861
+## </param>
4d24861
+#
4d24861
+interface(`auth_read_passwd',`
4d24861
+	gen_require(`
4d24861
+		type passwd_file_t;
4d24861
+	')
4d24861
+
4d24861
+	allow $1 passwd_file_t:file read_file_perms;
4d24861
+')
4d24861
+
4d24861
+########################################
4d24861
+## <summary>
4d24861
+##	Do not audit attempts to read the passwd
4d24861
+##	password file (/etc/passwd).
4d24861
+## </summary>
4d24861
+## <param name="domain">
4d24861
+##	<summary>
4d24861
+##	Domain to not audit.
4d24861
+##	</summary>
4d24861
+## </param>
4d24861
+#
4d24861
+interface(`auth_dontaudit_read_passwd',`
4d24861
+	gen_require(`
4d24861
+		type passwd_file_t;
4d24861
+	')
4d24861
+
4d24861
+	dontaudit $1 passwd_file_t:file read_file_perms;
4d24861
+')
4d24861
+
4d24861
+########################################
4d24861
+## <summary>
4d24861
+##	Create, read, write, and delete the passwd
4d24861
+##	password file.
4d24861
+## </summary>
4d24861
+## <param name="domain">
4d24861
+##	<summary>
4d24861
+##	Domain allowed access.
4d24861
+##	</summary>
4d24861
+## </param>
4d24861
+#
4d24861
+interface(`auth_manage_passwd',`
4d24861
+	gen_require(`
4d24861
+		type passwd_file_t;
4d24861
+	')
4d24861
+
4d24861
+	files_rw_etc_dirs($1)
4d24861
+	allow $1 passwd_file_t:file manage_file_perms;
4d24861
+	files_etc_filetrans($1, passwd_file_t, file, "passwd")
859ba0c
+	files_etc_filetrans($1, passwd_file_t, file, "passwd-")
9bf3aa2
+	files_etc_filetrans($1, passwd_file_t, file, "ptmptmp")
859ba0c
+	files_etc_filetrans($1, passwd_file_t, file, "group")
859ba0c
+	files_etc_filetrans($1, passwd_file_t, file, "group-")
4d24861
+')
37b75a0
diff -up serefpolicy-3.10.0/policy/modules/system/authlogin.te.passwd serefpolicy-3.10.0/policy/modules/system/authlogin.te
37b75a0
--- serefpolicy-3.10.0/policy/modules/system/authlogin.te.passwd	2011-10-21 09:57:41.453059375 -0400
37b75a0
+++ serefpolicy-3.10.0/policy/modules/system/authlogin.te	2011-10-21 09:57:41.536059303 -0400
37b75a0
@@ -71,6 +71,9 @@ neverallow ~can_read_shadow_passwords sh
4d24861
 neverallow ~can_write_shadow_passwords shadow_t:file { create write };
4d24861
 neverallow ~can_relabelto_shadow_passwords shadow_t:file relabelto;
4d24861
 
4d24861
+type passwd_file_t;
4d24861
+files_type(passwd_file_t)
4d24861
+
4d24861
 type updpwd_t;
4d24861
 type updpwd_exec_t;
4d24861
 domain_type(updpwd_t)
4d24861
@@ -350,6 +353,7 @@ kernel_read_system_state(updpwd_t)
4d24861
 dev_read_urand(updpwd_t)
4d24861
 
4d24861
 files_manage_etc_files(updpwd_t)
4d24861
+auth_manage_passwd(updpwd_t)
4d24861
 
4d24861
 term_dontaudit_use_console(updpwd_t)
4d24861
 term_dontaudit_use_unallocated_ttys(updpwd_t)
4d24861
@@ -422,6 +426,9 @@ optional_policy(`
4d24861
 	')
4d24861
 ')
4d24861
 
4d24861
+
4d24861
+auth_read_passwd(nsswitch_domain)
4d24861
+
4d24861
 # read /etc/nsswitch.conf
4d24861
 files_read_etc_files(nsswitch_domain)
4d24861