[selinux-policy: 2223/3172] Fix infrastructure to expand macros in initrc_context when installing.
Daniel J Walsh
dwalsh at fedoraproject.org
Thu Oct 7 22:17:22 UTC 2010
commit 90286f4292bcb47596a8fe9f4a25822f6b883417
Author: Chris PeBenito <cpebenito at tresys.com>
Date: Mon Aug 10 13:59:29 2009 -0400
Fix infrastructure to expand macros in initrc_context when installing.
The initrc_context file uses the mls_systemhigh macro and needs to be properly
expanded based on the build.conf settings. Add makefile support to do this.
Changelog | 1 +
Makefile | 7 +++++--
support/divert.m4 | 1 +
support/undivert.m4 | 1 +
4 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/Changelog b/Changelog
index ffc191a..9e97eab 100644
--- a/Changelog
+++ b/Changelog
@@ -1,3 +1,4 @@
+- Fix infrastructure to expand macros in initrc_context when installing.
- Handle unix_chkpwd usage by useradd and groupadd.
- Add missing compatibility aliases for xdm_xserver*_t types.
diff --git a/Makefile b/Makefile
index 8beede9..57b3b10 100644
--- a/Makefile
+++ b/Makefile
@@ -102,6 +102,8 @@ get_type_attr_decl := $(SED) -r -f $(support)/get_type_attr_decl.sed
comment_move_decl := $(SED) -r -f $(support)/comment_move_decl.sed
gennetfilter := $(PYTHON) -E $(support)/gennetfilter.py
m4iferror := $(support)/iferror.m4
+m4divert := $(support)/divert.m4
+m4undivert := $(support)/undivert.m4
# use our own genhomedircon to make sure we have a known usable one,
# so policycoreutils updates are not required (RHEL4)
genhomedircon := $(PYTHON) -E $(support)/genhomedircon
@@ -231,10 +233,11 @@ endif
CTAGS ?= ctags
-m4support := $(wildcard $(poldir)/support/*.spt)
+m4support := $(m4divert) $(wildcard $(poldir)/support/*.spt)
ifdef LOCAL_ROOT
m4support += $(wildcard $(local_poldir)/support/*.spt)
endif
+m4support += $(m4undivert)
appconf := config/appconfig-$(TYPE)
seusers := $(appconf)/seusers
@@ -529,7 +532,7 @@ $(contextpath)/users/%: $(appconf)/%_default_contexts
$(appdir)/%: $(appconf)/%
@mkdir -p $(appdir)
- $(verbose) $(INSTALL) -m 644 $< $@
+ $(verbose) $(M4) $(M4PARAM) $(m4support) $< > $@
########################################
#
diff --git a/support/divert.m4 b/support/divert.m4
new file mode 100644
index 0000000..7ce2db3
--- /dev/null
+++ b/support/divert.m4
@@ -0,0 +1 @@
+divert(`-1')
\ No newline at end of file
diff --git a/support/undivert.m4 b/support/undivert.m4
new file mode 100644
index 0000000..8545e47
--- /dev/null
+++ b/support/undivert.m4
@@ -0,0 +1 @@
+divert
\ No newline at end of file
More information about the scm-commits
mailing list