[selinux-policy: 1340/3172] try 3 on rhel4 fixes

Daniel J Walsh dwalsh at fedoraproject.org
Thu Oct 7 21:01:19 UTC 2010


commit 5d92a2089a79bf1a465ff01b59af8f2830d16e0f
Author: Chris PeBenito <cpebenito at tresys.com>
Date:   Fri Apr 7 15:16:49 2006 +0000

    try 3 on rhel4 fixes

 refpolicy/Rules.monolithic |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/refpolicy/Rules.monolithic b/refpolicy/Rules.monolithic
index aaec089..c86fcf0 100644
--- a/refpolicy/Rules.monolithic
+++ b/refpolicy/Rules.monolithic
@@ -170,18 +170,19 @@ enableaudit: $(POLICY_CONF)
 # Construct file_contexts
 #
 $(FC): $(TMPDIR)/$(notdir $(FC)).tmp $(FCSORT)
-	$(verbose) $(FCSORT) $< $@
 ifeq "$(DISTRO)" "rhel4"
 # the old genhomedircon used in RHEL4 makes assumptions on
 # the directory strucure of the policy.  need to set up a mini
 # environment with this structure for correct functioning.
 	@ mkdir -p $(TMPDIR)/rhel4
-	@ cp $@ $(TMPDIR)/rhel4
-	@ $(M4) $(M4PARAM) $(M4SUPPORT) $(USER_FILES) > $(TMPDIR)/rhel4/users
-	$(verbose) $(GREP) -v "^/root" $< > $(TMPDIR)/rhel4/$(@F).root
-	$(verbose) ( cd $(TMPDIR)/rhel4/users ; $(GENHOMEDIRCON) . $(@F).root > $@ )
-	$(verbose) $(GREP) "^/root" $< >> $@
+	$(verbose) $(FCSORT) $< > $(TMPDIR)/rhel4/$(@F).tmp
+	$(verbose) $(M4) $(M4PARAM) $(M4SUPPORT) $(USER_FILES) > $(TMPDIR)/rhel4/users
+	$(verbose) $(GREP) -v "^/root" $(TMPDIR)/rhel4/$(@F).tmp > $(TMPDIR)/rhel4/$(@F).root
+	$(verbose) ( cd $(TMPDIR)/rhel4 ; $(GENHOMEDIRCON) . $(@F).root > $(@F) )
+	$(verbose) $(GREP) "^/root" $(TMPDIR)/rhel4/$(@F).tmp >> $(TMPDIR)/rhel4/file_contexts
+	$(verpose) cp $(TMPDIR)/rhel4/file_contexts $@
 else
+	$(verbose) $(FCSORT) $< $@
 	$(verbose) $(GREP) -e HOME -e ROLE $@ > $(HOMEDIR_TEMPLATE)
 	$(verbose) $(SED) -i -e /HOME/d -e /ROLE/d $@
 endif
@@ -204,7 +205,7 @@ $(FCPATH): $(FC) $(LOADPATH) $(USERPATH)/system.users
 	@echo "Installing file_contexts."
 	@mkdir -p $(CONTEXTPATH)/files
 ifeq "$(DISTRO)" "rhel4"
-	$(verbose) install -m $(FC) $@
+	$(verbose) install -m 644 $(FC) $@
 else
 	$(verbose) install -m 644 $(FC) $(FCPATH)
 	$(verbose) install -m 644 $(HOMEDIR_TEMPLATE) $(HOMEDIRPATH)


More information about the scm-commits mailing list