[master 1/1] Relabel the password and group files in %post (#1228489)

dashea installerbot-noreply at redhat.com
Fri Jun 5 16:59:49 UTC 2015


From: David Shea <dshea at redhat.com>

Packages that create new users and groups tend to do so in their rpm
%pre scripts, and these might be run before the selinux-policy packages
are installed.
---
 data/post-scripts/80-setfilecons.ks | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/data/post-scripts/80-setfilecons.ks b/data/post-scripts/80-setfilecons.ks
index 5adae44..25c6e9a 100644
--- a/data/post-scripts/80-setfilecons.ks
+++ b/data/post-scripts/80-setfilecons.ks
@@ -14,6 +14,10 @@ restorecon -i /etc/rpm/macros /etc/dasd.conf /etc/zfcp.conf /lib64 /usr/lib64 \
               /etc/*shadow* /etc/dhcp/dhclient-*.conf /etc/localtime \
               /etc/hostname /root/install.log*
 
+# Users and groups may have been created in package %pre scripts before
+# the selinux policy was installed
+restorecon -i /etc/passwd* /etc/group* /etc/shadow* /etc/gshadow*
+
 if [ -e /etc/zipl.conf ]; then
     restorecon -i /etc/zipl.conf
 fi


-- 
To view this commit on github, visit https://github.com/rhinstaller/anaconda/commit/31bd6a0c584b7bc8d31dcc66f7d4d90d17f59154


More information about the anaconda-patches mailing list