|
Chris PeBenito |
88d14a |
#
|
|
Chris PeBenito |
88d14a |
# Makefile for the security policy.
|
|
Chris PeBenito |
88d14a |
#
|
|
Chris PeBenito |
88d14a |
# Targets:
|
|
Chris PeBenito |
88d14a |
#
|
|
Chris PeBenito |
88d14a |
# install - compile and install the policy configuration, and context files.
|
|
Chris PeBenito |
88d14a |
# load - compile, install, and load the policy configuration.
|
|
Chris PeBenito |
88d14a |
# reload - compile, install, and load/reload the policy configuration.
|
|
Chris PeBenito |
88d14a |
# relabel - relabel filesystems based on the file contexts configuration.
|
|
Chris PeBenito |
88d14a |
# checklabels - check filesystems against the file context configuration
|
|
Chris PeBenito |
88d14a |
# restorelabels - check filesystems against the file context configuration
|
|
Chris PeBenito |
88d14a |
# and restore the label of files with incorrect labels
|
|
Chris PeBenito |
88d14a |
# policy - compile the policy configuration locally for testing/development.
|
|
Chris PeBenito |
88d14a |
#
|
|
Chris PeBenito |
88d14a |
# The default target is 'policy'.
|
|
Chris PeBenito |
88d14a |
#
|
|
Chris PeBenito |
b4cd15 |
#
|
|
Chris PeBenito |
8e0ef1 |
# Please see build.conf for policy build options.
|
|
Chris PeBenito |
b4cd15 |
#
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
b4cd15 |
########################################
|
|
Chris PeBenito |
b4cd15 |
#
|
|
Chris PeBenito |
b67488 |
# NO OPTIONS BELOW HERE
|
|
Chris PeBenito |
b4cd15 |
#
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
8e0ef1 |
include build.conf
|
|
Chris PeBenito |
8e0ef1 |
|
|
Chris PeBenito |
b4cd15 |
# executable paths
|
|
Chris PeBenito |
b4cd15 |
PREFIX := /usr
|
|
Chris PeBenito |
b4cd15 |
BINDIR := $(PREFIX)/bin
|
|
Chris PeBenito |
b4cd15 |
SBINDIR := $(PREFIX)/sbin
|
|
Chris PeBenito |
40a1f3 |
CHECKPOLICY := $(BINDIR)/checkpolicy
|
|
Chris PeBenito |
fb0a3a |
CHECKMODULE := $(BINDIR)/checkmodule
|
|
Chris PeBenito |
c767b1 |
SEMODULE := $(SBINDIR)/semodule
|
|
Chris PeBenito |
fb0a3a |
SEMOD_PKG := $(BINDIR)/semodule_package
|
|
Chris PeBenito |
547283 |
LOADPOLICY := $(SBINDIR)/load_policy
|
|
Chris PeBenito |
b4cd15 |
SETFILES := $(SBINDIR)/setfiles
|
|
Chris PeBenito |
1beba1 |
GENHOMEDIRCON := $(SBINDIR)/genhomedircon
|
|
Chris PeBenito |
fb0a3a |
XMLLINT := $(BINDIR)/xmllint
|
|
Chris PeBenito |
8df65f |
SECHECK := $(BINDIR)/sechecker
|
|
Chris PeBenito |
044735 |
|
|
Chris PeBenito |
c7b41e |
CFLAGS := -Wall
|
|
Chris PeBenito |
c7b41e |
|
|
Chris PeBenito |
fb0a3a |
# policy source layout
|
|
Chris PeBenito |
c04f2a |
POLDIR := policy
|
|
Chris PeBenito |
c04f2a |
MODDIR := $(POLDIR)/modules
|
|
Chris PeBenito |
c04f2a |
FLASKDIR := $(POLDIR)/flask
|
|
Chris PeBenito |
c04f2a |
SECCLASS := $(FLASKDIR)/security_classes
|
|
Chris PeBenito |
c04f2a |
ISIDS := $(FLASKDIR)/initial_sids
|
|
Chris PeBenito |
c04f2a |
AVS := $(FLASKDIR)/access_vectors
|
|
Chris PeBenito |
fb0a3a |
|
|
Chris PeBenito |
fb0a3a |
# policy building support tools
|
|
Chris PeBenito |
3a80ec |
SUPPORT := support
|
|
Chris PeBenito |
95db42 |
GENXML := $(SUPPORT)/segenxml.py
|
|
Chris PeBenito |
3a80ec |
GENDOC := $(SUPPORT)/sedoctool.py
|
|
Chris PeBenito |
c04f2a |
GENPERM := $(SUPPORT)/genclassperms.py
|
|
Chris PeBenito |
254bbc |
FCSORT := $(SUPPORT)/fc_sort
|
|
Chris PeBenito |
84eb35 |
SETTUN := $(SUPPORT)/set_tunables
|
|
Chris PeBenito |
3a80ec |
|
|
Chris PeBenito |
fb0a3a |
# documentation paths
|
|
Chris PeBenito |
fb0a3a |
DOCS = doc
|
|
Chris PeBenito |
fb0a3a |
POLXML = $(DOCS)/policy.xml
|
|
Chris PeBenito |
fb0a3a |
XMLDTD = $(DOCS)/policy.dtd
|
|
Chris PeBenito |
fb0a3a |
LAYERXML = metadata.xml
|
|
Chris PeBenito |
fb0a3a |
HTMLDIR = $(DOCS)/html
|
|
Chris PeBenito |
fb0a3a |
DOCTEMPLATE = $(DOCS)/templates
|
|
Chris PeBenito |
fb0a3a |
|
|
Chris PeBenito |
fb0a3a |
# config file paths
|
|
Chris PeBenito |
fb0a3a |
GLOBALTUN := $(POLDIR)/global_tunables
|
|
Chris PeBenito |
4f9f30 |
GLOBALBOOL := $(POLDIR)/global_booleans
|
|
Chris PeBenito |
fb0a3a |
MOD_CONF := $(POLDIR)/modules.conf
|
|
Chris PeBenito |
fb0a3a |
TUNABLES := $(POLDIR)/tunables.conf
|
|
Chris PeBenito |
4f9f30 |
BOOLEANS := $(POLDIR)/booleans.conf
|
|
Chris PeBenito |
fb0a3a |
|
|
Chris PeBenito |
fb0a3a |
# install paths
|
|
Chris PeBenito |
fb0a3a |
TOPDIR = $(DESTDIR)/etc/selinux
|
|
Chris PeBenito |
fb0a3a |
INSTALLDIR = $(TOPDIR)/$(NAME)
|
|
Chris PeBenito |
fb0a3a |
SRCPATH = $(INSTALLDIR)/src
|
|
Chris PeBenito |
fb0a3a |
USERPATH = $(INSTALLDIR)/users
|
|
Chris PeBenito |
fb0a3a |
CONTEXTPATH = $(INSTALLDIR)/contexts
|
|
Chris PeBenito |
c767b1 |
MODPKGDIR = $(DESTDIR)/usr/share/selinux/$(NAME)
|
|
Chris PeBenito |
c767b1 |
|
|
Chris PeBenito |
c767b1 |
# compile strict policy if requested.
|
|
Chris PeBenito |
c767b1 |
ifneq ($(findstring strict,$(TYPE)),)
|
|
Chris PeBenito |
c767b1 |
override M4PARAM += -D strict_policy
|
|
Chris PeBenito |
c767b1 |
endif
|
|
Chris PeBenito |
c767b1 |
|
|
Chris PeBenito |
c767b1 |
# compile targeted policy if requested.
|
|
Chris PeBenito |
c767b1 |
ifneq ($(findstring targeted,$(TYPE)),)
|
|
Chris PeBenito |
c767b1 |
override M4PARAM += -D targeted_policy
|
|
Chris PeBenito |
c767b1 |
endif
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
134191 |
# enable MLS if requested.
|
|
Chris PeBenito |
a08248 |
ifneq ($(findstring -mls,$(TYPE)),)
|
|
Chris PeBenito |
134191 |
override M4PARAM += -D enable_mls
|
|
Chris PeBenito |
c767b1 |
override CHECKPOLICY += -M
|
|
Chris PeBenito |
c767b1 |
override CHECKMODULE += -M
|
|
Chris PeBenito |
134191 |
endif
|
|
Chris PeBenito |
134191 |
|
|
Chris PeBenito |
a08248 |
# enable MLS if MCS requested.
|
|
Chris PeBenito |
a08248 |
ifneq ($(findstring -mcs,$(TYPE)),)
|
|
Chris PeBenito |
a08248 |
override M4PARAM += -D enable_mcs
|
|
Chris PeBenito |
c767b1 |
override CHECKPOLICY += -M
|
|
Chris PeBenito |
c767b1 |
override CHECKMODULE += -M
|
|
Chris PeBenito |
b67488 |
endif
|
|
Chris PeBenito |
b67488 |
|
|
Chris PeBenito |
25a0c6 |
# enable distribution-specific policy
|
|
Chris PeBenito |
25a0c6 |
ifneq ($(DISTRO),)
|
|
Chris PeBenito |
25a0c6 |
override M4PARAM += -D distro_$(DISTRO)
|
|
Chris PeBenito |
25a0c6 |
endif
|
|
Chris PeBenito |
25a0c6 |
|
|
Chris PeBenito |
b67488 |
ifneq ($(OUTPUT_POLICY),)
|
|
Chris PeBenito |
c767b1 |
override CHECKPOLICY += -c $(OUTPUT_POLICY)
|
|
Chris PeBenito |
b67488 |
endif
|
|
Chris PeBenito |
b67488 |
|
|
Chris PeBenito |
b67488 |
ifeq ($(NAME),)
|
|
Chris PeBenito |
b67488 |
NAME := $(TYPE)
|
|
Chris PeBenito |
134191 |
endif
|
|
Chris PeBenito |
134191 |
|
|
Chris PeBenito |
142e9f |
ifeq ($(DIRECT_INITRC),y)
|
|
Chris PeBenito |
142e9f |
override M4PARAM += -D direct_sysadm_daemon
|
|
Chris PeBenito |
142e9f |
endif
|
|
Chris PeBenito |
142e9f |
|
|
Chris PeBenito |
ee7f66 |
override M4PARAM += -D hide_broken_symptoms
|
|
Chris PeBenito |
ee7f66 |
|
|
Chris PeBenito |
b4cd15 |
# determine the policy version and current kernel version if possible
|
|
Chris PeBenito |
134191 |
PV := $(shell $(CHECKPOLICY) -V |cut -f 1 -d ' ')
|
|
Chris PeBenito |
b4cd15 |
KV := $(shell cat /selinux/policyvers)
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
b4cd15 |
# dont print version warnings if we are unable to determine
|
|
Chris PeBenito |
b4cd15 |
# the currently running kernel's policy version
|
|
Chris PeBenito |
b4cd15 |
ifeq ($(KV),)
|
|
Chris PeBenito |
134191 |
KV := $(PV)
|
|
Chris PeBenito |
b4cd15 |
endif
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
fb0a3a |
M4SUPPORT = $(wildcard $(POLDIR)/support/*.spt)
|
|
Chris PeBenito |
0fbe15 |
|
|
Chris PeBenito |
c0e4fe |
APPCONF := config/appconfig-$(TYPE)
|
|
Chris PeBenito |
c9a26b |
APPDIR := $(CONTEXTPATH)
|
|
Chris PeBenito |
c767b1 |
APPFILES := $(addprefix $(APPDIR)/,default_contexts default_type initrc_context failsafe_context userhelper_context removable_context dbus_contexts) $(CONTEXTPATH)/files/media
|
|
Chris PeBenito |
2926f9 |
CONTEXTFILES += $(wildcard $(APPCONF)/*_context*) $(APPCONF)/media
|
|
Chris PeBenito |
712566 |
USER_FILES := $(POLDIR)/systemuser $(POLDIR)/users
|
|
Chris PeBenito |
c9a26b |
|
|
Chris PeBenito |
57869a |
ALL_LAYERS := $(filter-out $(MODDIR)/CVS,$(shell find $(wildcard $(MODDIR)/*) -maxdepth 0 -type d))
|
|
Chris PeBenito |
e12e57 |
|
|
Chris PeBenito |
e12e57 |
GENERATED_TE := $(basename $(foreach dir,$(ALL_LAYERS),$(wildcard $(dir)/*.te.in)))
|
|
Chris PeBenito |
e12e57 |
GENERATED_IF := $(basename $(foreach dir,$(ALL_LAYERS),$(wildcard $(dir)/*.if.in)))
|
|
Chris PeBenito |
e12e57 |
GENERATED_FC := $(basename $(foreach dir,$(ALL_LAYERS),$(wildcard $(dir)/*.fc.in)))
|
|
Chris PeBenito |
e12e57 |
|
|
Chris PeBenito |
8ae194 |
# sort here since it removes duplicates, which can happen
|
|
Chris PeBenito |
8ae194 |
# when a generated file is already generated
|
|
Chris PeBenito |
8ae194 |
DETECTED_MODS := $(sort $(foreach dir,$(ALL_LAYERS),$(wildcard $(dir)/*.te)) $(GENERATED_TE))
|
|
Chris PeBenito |
19db6b |
|
|
Chris PeBenito |
fb0a3a |
# modules.conf setting for base module
|
|
Chris PeBenito |
e8b3e3 |
MODBASE := base
|
|
Chris PeBenito |
fb0a3a |
|
|
Chris PeBenito |
fb0a3a |
# modules.conf setting for module
|
|
Chris PeBenito |
e8b3e3 |
MODMOD := module
|
|
Chris PeBenito |
fb0a3a |
|
|
Chris PeBenito |
fb0a3a |
# extract settings from modules.conf
|
|
Chris PeBenito |
c767b1 |
BASE_MODS := $(addsuffix .te,$(shell awk '/^[[:blank:]]*[[:alpha:]]/{ if ($$3 == "$(MODBASE)") print $$1 }' $(MOD_CONF) 2> /dev/null))
|
|
Chris PeBenito |
c767b1 |
MOD_MODS := $(addsuffix .te,$(shell awk '/^[[:blank:]]*[[:alpha:]]/{ if ($$3 == "$(MODMOD)") print $$1 }' $(MOD_CONF) 2> /dev/null))
|
|
Chris PeBenito |
712566 |
|
|
Chris PeBenito |
b4cd15 |
########################################
|
|
Chris PeBenito |
b4cd15 |
#
|
|
Chris PeBenito |
fb0a3a |
# Load appropriate rules
|
|
Chris PeBenito |
b4cd15 |
#
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
fb0a3a |
ifeq ($(MONOLITHIC),y)
|
|
Chris PeBenito |
fb0a3a |
include Rules.monolithic
|
|
Chris PeBenito |
fb0a3a |
else
|
|
Chris PeBenito |
fb0a3a |
include Rules.modular
|
|
Chris PeBenito |
b4cd15 |
endif
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
b4cd15 |
########################################
|
|
Chris PeBenito |
b4cd15 |
#
|
|
Chris PeBenito |
fb0a3a |
# Generated files
|
|
Chris PeBenito |
88d14a |
#
|
|
Chris PeBenito |
f2e4ab |
$(MODDIR)/kernel/corenetwork.if: $(MODDIR)/kernel/corenetwork.if.m4 $(MODDIR)/kernel/corenetwork.if.in
|
|
Chris PeBenito |
61bbe5 |
@echo "#" > $@
|
|
Chris PeBenito |
61bbe5 |
@echo "# This is a generated file! Instead of modifying this file, the" >> $@
|
|
Chris PeBenito |
61bbe5 |
@echo "# $(notdir $@).in or $(notdir $@).m4 file should be modified." >> $@
|
|
Chris PeBenito |
61bbe5 |
@echo "#" >> $@
|
|
Chris PeBenito |
61bbe5 |
$(QUIET) cat $(MODDIR)/kernel/corenetwork.if.in >> $@
|
|
Chris PeBenito |
f2e4ab |
$(QUIET) egrep "^[[:blank:]]*network_(interface|node|port)\(.*\)" $(@:.if=.te).in \
|
|
Chris PeBenito |
cf6141 |
| m4 -D self_contained_policy $(M4PARAM) $(MODDIR)/kernel/corenetwork.if.m4 - \
|
|
Chris PeBenito |
f2e4ab |
| sed -e 's/dollarsone/\$$1/g' -e 's/dollarszero/\$$0/g' >> $@
|
|
Chris PeBenito |
f2e4ab |
|
|
Chris PeBenito |
f2e4ab |
$(MODDIR)/kernel/corenetwork.te: $(MODDIR)/kernel/corenetwork.te.m4 $(MODDIR)/kernel/corenetwork.te.in
|
|
Chris PeBenito |
61bbe5 |
@echo "#" > $@
|
|
Chris PeBenito |
61bbe5 |
@echo "# This is a generated file! Instead of modifying this file, the" >> $@
|
|
Chris PeBenito |
61bbe5 |
@echo "# $(notdir $@).in or $(notdir $@).m4 file should be modified." >> $@
|
|
Chris PeBenito |
61bbe5 |
@echo "#" >> $@
|
|
Chris PeBenito |
cf6141 |
$(QUIET) m4 -D self_contained_policy $(M4PARAM) $^ \
|
|
Chris PeBenito |
61bbe5 |
| sed -e 's/dollarsone/\$$1/g' -e 's/dollarszero/\$$0/g' >> $@
|
|
Chris PeBenito |
f2e4ab |
|
|
Chris PeBenito |
b4cd15 |
########################################
|
|
Chris PeBenito |
b4cd15 |
#
|
|
Chris PeBenito |
84eb35 |
# Create config files
|
|
Chris PeBenito |
84eb35 |
#
|
|
Chris PeBenito |
4f9f30 |
conf: $(MOD_CONF) $(BOOLEANS) $(GENERATED_TE) $(GENERATED_IF) $(GENERATED_FC)
|
|
Chris PeBenito |
d2d6c8 |
|
|
Chris PeBenito |
4f9f30 |
$(MOD_CONF) $(BOOLEANS): $(POLXML)
|
|
Chris PeBenito |
4f9f30 |
@echo "Updating $(MOD_CONF) and $(BOOLEANS)"
|
|
Chris PeBenito |
4f9f30 |
$(QUIET) cd $(DOCS) && ../$(GENDOC) -t ../$(BOOLEANS) -m ../$(MOD_CONF) -x ../$(POLXML)
|
|
Chris PeBenito |
84eb35 |
|
|
Chris PeBenito |
84eb35 |
########################################
|
|
Chris PeBenito |
84eb35 |
#
|
|
Chris PeBenito |
6d314f |
# Documentation generation
|
|
Chris PeBenito |
6d314f |
#
|
|
Chris PeBenito |
6d314f |
|
|
Chris PeBenito |
d2d6c8 |
# minimal dependencies here, because we don't want to rebuild
|
|
Chris PeBenito |
84eb35 |
# this and its dependents every time the dependencies
|
|
Chris PeBenito |
19db6b |
# change. Also use all .if files here, rather then just the
|
|
Chris PeBenito |
19db6b |
# enabled modules.
|
|
Chris PeBenito |
d233bf |
$(POLXML): $(DETECTED_MODS:.te=.if) $(foreach dir,$(ALL_LAYERS),$(dir)/$(LAYERXML))
|
|
Chris PeBenito |
88c72f |
@echo "Creating $@"
|
|
Chris PeBenito |
84eb35 |
@mkdir -p tmp
|
|
Chris PeBenito |
004db9 |
$(QUIET) echo '' > $@
|
|
Chris PeBenito |
95db42 |
$(QUIET) echo '' >> $@
|
|
Chris PeBenito |
4f9f30 |
$(QUIET) $(GENXML) -w -m $(LAYERXML) -t $(GLOBALTUN) -b $(GLOBALBOOL) $(ALL_LAYERS) >> $@
|
|
Chris PeBenito |
044735 |
$(QUIET) if test -x $(XMLLINT) && test -f $(XMLDTD); then \
|
|
Chris PeBenito |
044735 |
$(XMLLINT) --noout --dtdvalid $(XMLDTD) $@ ;\
|
|
Chris PeBenito |
004db9 |
fi
|
|
Chris PeBenito |
6d314f |
|
|
Chris PeBenito |
12b559 |
html: $(POLXML)
|
|
Chris PeBenito |
20030e |
@mkdir -p $(HTMLDIR)
|
|
Chris PeBenito |
12b559 |
$(QUIET) cd $(DOCS) && ../$(GENDOC) -d ../$(HTMLDIR) -T ../$(DOCTEMPLATE) -x ../$(POLXML)
|
|
Chris PeBenito |
20030e |
$(QUIET) cp $(DOCTEMPLATE)/*.css $(HTMLDIR)
|
|
Chris PeBenito |
20030e |
|
|
Chris PeBenito |
c9a26b |
########################################
|
|
Chris PeBenito |
c9a26b |
#
|
|
Chris PeBenito |
c9a26b |
# Runtime binary policy patching of users
|
|
Chris PeBenito |
c9a26b |
#
|
|
Chris PeBenito |
1fb83a |
$(USERPATH)/system.users: $(M4SUPPORT) tmp/generated_definitions.conf $(USER_FILES)
|
|
Chris PeBenito |
c9a26b |
@mkdir -p $(USERPATH)
|
|
Chris PeBenito |
c9a26b |
@echo "Installing system.users"
|
|
Chris PeBenito |
c9a26b |
@echo "# " > tmp/system.users
|
|
Chris PeBenito |
c9a26b |
@echo "# Do not edit this file. " >> tmp/system.users
|
|
Chris PeBenito |
c9a26b |
@echo "# This file is replaced on reinstalls of this policy." >> tmp/system.users
|
|
Chris PeBenito |
c9a26b |
@echo "# Please edit local.users to make local changes." >> tmp/system.users
|
|
Chris PeBenito |
c9a26b |
@echo "#" >> tmp/system.users
|
|
Chris PeBenito |
1fb83a |
$(QUIET) m4 -D self_contained_policy $(M4PARAM) $^ | \
|
|
Chris PeBenito |
fb2817 |
egrep -v "^[[:blank:]]*($$|#)" | \
|
|
Chris PeBenito |
fb2817 |
sed -r -e 's/^[[:blank:]]+//' >> tmp/system.users
|
|
Chris PeBenito |
c9a26b |
$(QUIET) install -m 644 tmp/system.users $@
|
|
Chris PeBenito |
c9a26b |
|
|
Chris PeBenito |
1beba1 |
$(USERPATH)/local.users: config/local.users
|
|
Chris PeBenito |
c9a26b |
@mkdir -p $(USERPATH)
|
|
Chris PeBenito |
c9a26b |
@echo "Installing local.users"
|
|
Chris PeBenito |
c7b41e |
$(QUIET) install -b -m 644 $< $@
|
|
Chris PeBenito |
c9a26b |
|
|
Chris PeBenito |
c9a26b |
########################################
|
|
Chris PeBenito |
c9a26b |
#
|
|
Chris PeBenito |
c9a26b |
# Appconfig files
|
|
Chris PeBenito |
c9a26b |
#
|
|
Chris PeBenito |
c9a26b |
install-appconfig: $(APPFILES)
|
|
Chris PeBenito |
c9a26b |
|
|
Chris PeBenito |
4f9f30 |
$(INSTALLDIR)/booleans: $(BOOLEANS)
|
|
Chris PeBenito |
1beba1 |
@mkdir -p $(INSTALLDIR)
|
|
Chris PeBenito |
4f9f30 |
$(QUIET) egrep '^[[:blank:]]*[[:alpha:]]' $(BOOLEANS) \
|
|
Chris PeBenito |
1beba1 |
| sed -e 's/false/0/g' -e 's/true/1/g' > tmp/booleans
|
|
Chris PeBenito |
1beba1 |
$(QUIET) install -m 644 tmp/booleans $@
|
|
Chris PeBenito |
1beba1 |
|
|
Chris PeBenito |
2926f9 |
$(CONTEXTPATH)/files/media: $(APPCONF)/media
|
|
Chris PeBenito |
1beba1 |
@mkdir -p $(CONTEXTPATH)/files/
|
|
Chris PeBenito |
1beba1 |
$(QUIET) install -m 644 $< $@
|
|
Chris PeBenito |
c9a26b |
|
|
Chris PeBenito |
2926f9 |
$(APPDIR)/default_contexts: $(APPCONF)/default_contexts
|
|
Chris PeBenito |
1beba1 |
@mkdir -p $(APPDIR)
|
|
Chris PeBenito |
1beba1 |
$(QUIET) install -m 644 $< $@
|
|
Chris PeBenito |
c9a26b |
|
|
Chris PeBenito |
2926f9 |
$(APPDIR)/removable_context: $(APPCONF)/removable_context
|
|
Chris PeBenito |
1beba1 |
@mkdir -p $(APPDIR)
|
|
Chris PeBenito |
1beba1 |
$(QUIET) install -m 644 $< $@
|
|
Chris PeBenito |
c9a26b |
|
|
Chris PeBenito |
c9a26b |
$(APPDIR)/customizable_types: policy.conf
|
|
Chris PeBenito |
1beba1 |
@mkdir -p $(APPDIR)
|
|
Chris PeBenito |
1beba1 |
$(QUIET) grep "^type .*customizable" $< | cut -d',' -f1 | cut -d' ' -f2 > tmp/customizable_types
|
|
Chris PeBenito |
1beba1 |
$(QUIET) install -m 644 tmp/customizable_types $@
|
|
Chris PeBenito |
c9a26b |
|
|
Chris PeBenito |
2926f9 |
$(APPDIR)/default_type: $(APPCONF)/default_type
|
|
Chris PeBenito |
1beba1 |
@mkdir -p $(APPDIR)
|
|
Chris PeBenito |
1beba1 |
$(QUIET) install -m 644 $< $@
|
|
Chris PeBenito |
c9a26b |
|
|
Chris PeBenito |
2926f9 |
$(APPDIR)/userhelper_context: $(APPCONF)/userhelper_context
|
|
Chris PeBenito |
1beba1 |
@mkdir -p $(APPDIR)
|
|
Chris PeBenito |
1beba1 |
$(QUIET) install -m 644 $< $@
|
|
Chris PeBenito |
c9a26b |
|
|
Chris PeBenito |
2926f9 |
$(APPDIR)/initrc_context: $(APPCONF)/initrc_context
|
|
Chris PeBenito |
1beba1 |
@mkdir -p $(APPDIR)
|
|
Chris PeBenito |
1beba1 |
$(QUIET) install -m 644 $< $@
|
|
Chris PeBenito |
c9a26b |
|
|
Chris PeBenito |
2926f9 |
$(APPDIR)/failsafe_context: $(APPCONF)/failsafe_context
|
|
Chris PeBenito |
1beba1 |
@mkdir -p $(APPDIR)
|
|
Chris PeBenito |
1beba1 |
$(QUIET) install -m 644 $< $@
|
|
Chris PeBenito |
c9a26b |
|
|
Chris PeBenito |
2926f9 |
$(APPDIR)/dbus_contexts: $(APPCONF)/dbus_contexts
|
|
Chris PeBenito |
1beba1 |
@mkdir -p $(APPDIR)
|
|
Chris PeBenito |
1beba1 |
$(QUIET) install -m 644 $< $@
|
|
Chris PeBenito |
c9a26b |
|
|
Chris PeBenito |
2926f9 |
$(APPDIR)/users/root: $(APPCONF)/root_default_contexts
|
|
Chris PeBenito |
1beba1 |
@mkdir -p $(APPDIR)/users
|
|
Chris PeBenito |
1beba1 |
$(QUIET) install -m 644 $< $@
|
|
Chris PeBenito |
c9a26b |
|
|
Chris PeBenito |
c592e5 |
########################################
|
|
Chris PeBenito |
c592e5 |
#
|
|
Chris PeBenito |
c592e5 |
# Install policy sources
|
|
Chris PeBenito |
c592e5 |
#
|
|
Chris PeBenito |
c592e5 |
install-src:
|
|
Chris PeBenito |
c592e5 |
rm -rf $(SRCPATH)/policy.old
|
|
Chris PeBenito |
c592e5 |
-mv $(SRCPATH)/policy $(SRCPATH)/policy.old
|
|
Chris PeBenito |
c592e5 |
mkdir -p $(SRCPATH)/policy
|
|
Chris PeBenito |
c592e5 |
cp -R . $(SRCPATH)/policy
|
|
Chris PeBenito |
c592e5 |
|
|
Chris PeBenito |
102a59 |
########################################
|
|
Chris PeBenito |
102a59 |
#
|
|
Chris PeBenito |
102a59 |
# Clean everything
|
|
Chris PeBenito |
102a59 |
#
|
|
Chris PeBenito |
0fbe15 |
bare: clean
|
|
Chris PeBenito |
12b559 |
rm -f $(POLXML)
|
|
Chris PeBenito |
254bbc |
rm -f $(SUPPORT)/*.pyc
|
|
Chris PeBenito |
254bbc |
rm -f $(FCSORT)
|
|
Chris PeBenito |
19db6b |
rm -f $(MOD_CONF)
|
|
Chris PeBenito |
4f9f30 |
rm -f $(BOOLEANS)
|
|
Chris PeBenito |
20030e |
rm -fR $(HTMLDIR)
|
|
Chris PeBenito |
c767b1 |
ifneq ($(GENERATED_TE),)
|
|
Chris PeBenito |
c767b1 |
rm -f $(GENERATED_TE)
|
|
Chris PeBenito |
c767b1 |
endif
|
|
Chris PeBenito |
c767b1 |
ifneq ($(GENERATED_IF),)
|
|
Chris PeBenito |
c767b1 |
rm -f $(GENERATED_IF)
|
|
Chris PeBenito |
c767b1 |
endif
|
|
Chris PeBenito |
c767b1 |
ifneq ($(GENERATED_FC),)
|
|
Chris PeBenito |
c767b1 |
rm -f $(GENERATED_FC)
|
|
Chris PeBenito |
c767b1 |
endif
|
|
Chris PeBenito |
0fbe15 |
|
|
Chris PeBenito |
fb0a3a |
.PHONY: install-src install-appconfig conf html bare
|