]> git.ipfire.org Git - people/stevee/selinux-policy.git/blame - refpolicy/Makefile
put user line in col 1, since genhomedircon breaks otherwise
[people/stevee/selinux-policy.git] / refpolicy / Makefile
CommitLineData
88d14a22
CP
1#
2# Makefile for the security policy.
3#
4# Targets:
5#
6# install - compile and install the policy configuration, and context files.
7# load - compile, install, and load the policy configuration.
8# reload - compile, install, and load/reload the policy configuration.
9# relabel - relabel filesystems based on the file contexts configuration.
10# checklabels - check filesystems against the file context configuration
11# restorelabels - check filesystems against the file context configuration
12# and restore the label of files with incorrect labels
13# policy - compile the policy configuration locally for testing/development.
14#
15# The default target is 'policy'.
16#
17
b4cd1533
CP
18########################################
19#
20# Configurable portions of the Makefile
21#
22
b67488e3
CP
23# Override default policy version
24OUTPUT_POLICY = 18
134191be 25
b67488e3
CP
26# Policy Type
27# strict, targeted, strict-mls, targeted-mls
28# strict and strict-mls are currently supported.
29TYPE = strict
b4cd1533 30
b67488e3
CP
31# If set, this will be used as the policy
32# name. Otherwise the policy type will be
33# used for the name.
34NAME =
35
36# Build monolithic policy. Putting n here
37# will build a loadable module policy.
38# Only monolithic policies are currently supported.
39MONOLITHIC=y
b4cd1533
CP
40
41# Uncomment this to disable command echoing
42#QUIET:=@
43
44########################################
45#
b67488e3 46# NO OPTIONS BELOW HERE
b4cd1533
CP
47#
48
49# executable paths
50PREFIX := /usr
51BINDIR := $(PREFIX)/bin
52SBINDIR := $(PREFIX)/sbin
53CHECKPOLICY := $(BINDIR)/checkpolicy
547283e2 54LOADPOLICY := $(SBINDIR)/load_policy
b4cd1533 55SETFILES := $(SBINDIR)/setfiles
1beba1c6 56GENHOMEDIRCON := $(SBINDIR)/genhomedircon
0447352a 57
3a80ec29
CP
58SUPPORT := support
59GENDOC := $(SUPPORT)/sedoctool.py
254bbc7b 60FCSORT := $(SUPPORT)/fc_sort
84eb353c 61SETTUN := $(SUPPORT)/set_tunables
3a80ec29 62
004db90d 63XMLLINT := $(BINDIR)/xmllint
b4cd1533 64
134191be 65# enable MLS if requested.
b67488e3 66ifneq ($(findstring mls,$(TYPE)),)
134191be
CP
67 override M4PARAM += -D enable_mls
68 CHECKPOLICY += -M
69endif
70
b67488e3
CP
71# compile targeted policy if requested.
72ifneq ($(findstring targeted,$(TYPE)),)
73 override M4PARAM += -D targeted_policy
74endif
75
76ifeq ($(MONOLITHIC),y)
77 override M4PARAM += -D monolithic_policy
78endif
79
80ifneq ($(OUTPUT_POLICY),)
81 CHECKPOLICY += -c $(OUTPUT_POLICY)
82endif
83
84ifeq ($(NAME),)
85 NAME := $(TYPE)
134191be
CP
86endif
87
b4cd1533 88# determine the policy version and current kernel version if possible
134191be 89PV := $(shell $(CHECKPOLICY) -V |cut -f 1 -d ' ')
b4cd1533
CP
90KV := $(shell cat /selinux/policyvers)
91
92# dont print version warnings if we are unable to determine
93# the currently running kernel's policy version
94ifeq ($(KV),)
134191be 95 KV := $(PV)
b4cd1533
CP
96endif
97
98FC := file_contexts
99POLVER := policy.$(PV)
b4cd1533
CP
100
101# install paths
102TOPDIR = $(DESTDIR)/etc/selinux
b67488e3 103INSTALLDIR = $(TOPDIR)/$(NAME)
b4cd1533
CP
104POLICYPATH = $(INSTALLDIR)/policy
105SRCPATH = $(INSTALLDIR)/src
106USERPATH = $(INSTALLDIR)/users
107CONTEXTPATH = $(INSTALLDIR)/contexts
108LOADPATH = $(POLICYPATH)/$(POLVER)
109FCPATH = $(CONTEXTPATH)/files/file_contexts
110HOMEDIRPATH = $(CONTEXTPATH)/files/homedir_template
111
b67488e3
CP
112POLDIR = policy
113MODDIR = $(POLDIR)/modules
114
115BASE_MODULE = $(MODDIR)/kernel
116FLASKDIR = $(POLDIR)/flask
09693356 117APPCONF = config/appconfig
0350b1dc 118M4SUPPORT = $(wildcard $(POLDIR)/support/*.spt)
b4cd1533 119
84eb353c 120GLOBALTUN := $(POLDIR)/global_tunables
0350b1dc 121MOD_DISABLE := $(POLDIR)/modules.conf
84eb353c 122TUNABLES := $(POLDIR)/tunables.conf
0fbe15dc 123
c9a26b3e 124APPDIR := $(CONTEXTPATH)
1beba1c6 125APPFILES := $(addprefix $(APPDIR)/,default_contexts default_type initrc_context failsafe_context userhelper_context removable_context dbus_contexts customizable_types) $(CONTEXTPATH)/files/media $(INSTALLDIR)/booleans
2926f9c7 126CONTEXTFILES += $(wildcard $(APPCONF)/*_context*) $(APPCONF)/media
b67488e3 127USER_FILES := $(POLDIR)/users
c9a26b3e 128
e12e5738
CP
129DISABLEMOD := $(foreach mod,$(shell egrep -v '^[[:blank:]]*\#' $(MOD_DISABLE)),$(subst ./,,$(shell find -iname $(mod).te)))
130ALL_LAYERS := $(shell find $(wildcard policy/modules/*) -maxdepth 0 -type d)
131
132GENERATED_TE := $(basename $(foreach dir,$(ALL_LAYERS),$(wildcard $(dir)/*.te.in)))
133GENERATED_IF := $(basename $(foreach dir,$(ALL_LAYERS),$(wildcard $(dir)/*.if.in)))
134GENERATED_FC := $(basename $(foreach dir,$(ALL_LAYERS),$(wildcard $(dir)/*.fc.in)))
135
8ae194f6
CP
136# sort here since it removes duplicates, which can happen
137# when a generated file is already generated
138DETECTED_MODS := $(sort $(foreach dir,$(ALL_LAYERS),$(wildcard $(dir)/*.te)) $(GENERATED_TE))
0fbe15dc 139ALL_MODULES := $(filter-out $(DISABLEMOD),$(DETECTED_MODS))
b4cd1533 140
b67488e3 141PRE_TE_FILES := $(addprefix $(FLASKDIR)/,security_classes initial_sids access_vectors) $(M4SUPPORT) $(POLDIR)/mls
0fbe15dc
CP
142ALL_INTERFACES := $(ALL_MODULES:.te=.if)
143ALL_TE_FILES := $(ALL_MODULES)
b67488e3 144POST_TE_FILES := $(POLDIR)/users $(POLDIR)/constraints
b4cd1533 145
0fbe15dc 146ALL_FC_FILES := $(ALL_MODULES:.te=.fc)
92e928e1 147HOMEDIR_TEMPLATE = tmp/homedir_template
b4cd1533 148
84eb353c 149POLICY_SECTIONS := tmp/pre_te_files.conf tmp/generated_definitions.conf tmp/all_interfaces.conf tmp/all_attrs_types.conf $(GLOBALTUN) tmp/only_te_rules.conf tmp/all_post.conf
b4cd1533 150
20030ef5 151DOCS = doc
12b559a4 152POLXML = $(DOCS)/policy.xml
20030ef5
CP
153XMLDTD = $(DOCS)/policy.dtd
154HTMLDIR = $(DOCS)/html
155DOCTEMPLATE = $(DOCS)/templates
36e54b81 156
b4cd1533
CP
157########################################
158#
159# default action: build policy locally
160#
161default: policy
162
163policy: $(POLVER)
164
44cda51b 165install: $(LOADPATH) $(FCPATH) $(APPFILES) $(USERPATH)/local.users
c9a26b3e
CP
166
167load: tmp/load
b4cd1533
CP
168
169########################################
170#
171# Build a binary policy locally
172#
173$(POLVER): policy.conf
b67488e3 174 @echo "Compiling $(NAME) $(POLVER)"
b4cd1533
CP
175ifneq ($(PV),$(KV))
176 @echo
b67488e3 177 @echo "WARNING: Policy version mismatch! Is your OUTPUT_POLICY set correctly?"
b4cd1533
CP
178 @echo
179endif
134191be 180 $(QUIET) $(CHECKPOLICY) $^ -o $@
b4cd1533
CP
181
182########################################
183#
184# Install a binary policy
185#
186$(LOADPATH): policy.conf
187 @mkdir -p $(POLICYPATH)
b67488e3 188 @echo "Compiling and installing $(NAME) $(LOADPATH)"
b4cd1533
CP
189ifneq ($(PV),$(KV))
190 @echo
b67488e3 191 @echo "WARNING: Policy version mismatch! Is your OUTPUT_POLICY set correctly?"
b4cd1533
CP
192 @echo
193endif
134191be 194 $(QUIET) $(CHECKPOLICY) $^ -o $@
b4cd1533 195
88d14a22
CP
196########################################
197#
198# Load the binary policy
199#
200reload tmp/load: $(LOADPATH) $(FCPATH)
b67488e3 201 @echo "Loading $(NAME) $(LOADPATH)"
88d14a22
CP
202 $(QUIET) $(LOADPOLICY) -q $(LOADPATH)
203 @touch tmp/load
204
b4cd1533
CP
205########################################
206#
207# Construct a monolithic policy.conf
208#
209policy.conf: $(POLICY_SECTIONS)
b67488e3 210 @echo "Creating $(NAME) policy.conf"
d2d6c8ce 211# checkpolicy can use the #line directives provided by -s for error reporting:
b67488e3 212 $(QUIET) m4 $(M4PARAM) -s $^ > tmp/$@.tmp
b4cd1533 213 $(QUIET) sed -e /^portcon/d -e /^nodecon/d -e /^netifcon/d < tmp/$@.tmp > $@
d2d6c8ce 214# the ordering of these ocontexts matters:
b4cd1533
CP
215 $(QUIET) grep ^portcon tmp/$@.tmp >> $@ || true
216 $(QUIET) grep ^netifcon tmp/$@.tmp >> $@ || true
217 $(QUIET) grep ^nodecon tmp/$@.tmp >> $@ || true
218
219tmp/pre_te_files.conf: $(PRE_TE_FILES)
220 @test -d tmp || mkdir -p tmp
221 $(QUIET) cat $^ > $@
222
d2d6c8ce
CP
223tmp/generated_definitions.conf: $(ALL_LAYERS) $(ALL_TE_FILES)
224# per-userdomain templates:
b4cd1533
CP
225 @test -d tmp || mkdir -p tmp
226 $(QUIET) echo "define(\`per_userdomain_templates',\`" > $@
0fbe15dc 227 $(QUIET) for i in $(patsubst %.te,%,$(notdir $(ALL_MODULES))); do \
b4cd1533
CP
228 echo "ifdef(\`""$$i""_per_userdomain_template',\`""$$i""_per_userdomain_template("'$$1'")')" \
229 >> $@ ;\
230 done
231 $(QUIET) echo "')" >> $@
d2d6c8ce 232# define foo.te
0fbe15dc 233 $(QUIET) for i in $(notdir $(ALL_MODULES)); do \
b4cd1533
CP
234 echo "define(\`$$i')" >> $@ ;\
235 done
84eb353c 236 $(QUIET) $(SETTUN) $(TUNABLES) >> $@
b4cd1533 237
3a80ec29 238tmp/all_interfaces.conf: $(ALL_INTERFACES)
b4cd1533 239 @test -d tmp || mkdir -p tmp
3a80ec29 240 $(QUIET) cat $^ > $@
b4cd1533 241
3a80ec29 242tmp/all_te_files.conf: $(ALL_TE_FILES)
b4cd1533 243 @test -d tmp || mkdir -p tmp
3a80ec29 244 $(QUIET) cat $^ > $@
b4cd1533
CP
245
246tmp/post_te_files.conf: $(POST_TE_FILES)
247 @test -d tmp || mkdir -p tmp
248 $(QUIET) cat $^ > $@
249
250# extract attributes and put them first. extract post te stuff
251# like genfscon and put last. portcon, nodecon, and netifcon
252# is delayed since they are generated by m4
f66a1af9
CP
253tmp/all_attrs_types.conf tmp/only_te_rules.conf tmp/all_post.conf: tmp/all_te_files.conf tmp/post_te_files.conf
254 $(QUIET) grep ^attribute tmp/all_te_files.conf > tmp/all_attrs_types.conf || true
255 $(QUIET) grep '^type ' tmp/all_te_files.conf >> tmp/all_attrs_types.conf
b4cd1533 256 $(QUIET) cat tmp/post_te_files.conf > tmp/all_post.conf
cabfa520
CP
257 $(QUIET) grep '^sid ' tmp/all_te_files.conf >> tmp/all_post.conf || true
258 $(QUIET) egrep '^fs_use_(xattr|task|trans)' tmp/all_te_files.conf >> tmp/all_post.conf || true
b4cd1533 259 $(QUIET) grep ^genfscon tmp/all_te_files.conf >> tmp/all_post.conf || true
cabfa520
CP
260 $(QUIET) sed -r -e /^attribute/d -e '/^type /d' -e /^genfscon/d \
261 -e '/^sid /d' -e '/^fs_use_(xattr|task|trans)/d' \
262 < tmp/all_te_files.conf > tmp/only_te_rules.conf
b4cd1533 263
f2e4ab3a 264$(MODDIR)/kernel/corenetwork.if: $(MODDIR)/kernel/corenetwork.if.m4 $(MODDIR)/kernel/corenetwork.if.in
61bbe531
CP
265 @echo "#" > $@
266 @echo "# This is a generated file! Instead of modifying this file, the" >> $@
267 @echo "# $(notdir $@).in or $(notdir $@).m4 file should be modified." >> $@
268 @echo "#" >> $@
269 $(QUIET) cat $(MODDIR)/kernel/corenetwork.if.in >> $@
f2e4ab3a 270 $(QUIET) egrep "^[[:blank:]]*network_(interface|node|port)\(.*\)" $(@:.if=.te).in \
d2d6c8ce 271 | m4 $(M4PARAM) $(M4SUPPORT) $(MODDIR)/kernel/corenetwork.if.m4 - \
f2e4ab3a
CP
272 | sed -e 's/dollarsone/\$$1/g' -e 's/dollarszero/\$$0/g' >> $@
273 $(QUIET) echo "## </module>" >> $@
274
275$(MODDIR)/kernel/corenetwork.te: $(MODDIR)/kernel/corenetwork.te.m4 $(MODDIR)/kernel/corenetwork.te.in
61bbe531
CP
276 @echo "#" > $@
277 @echo "# This is a generated file! Instead of modifying this file, the" >> $@
278 @echo "# $(notdir $@).in or $(notdir $@).m4 file should be modified." >> $@
279 @echo "#" >> $@
d2d6c8ce 280 $(QUIET) m4 $(M4PARAM) $(M4SUPPORT) $^ \
61bbe531 281 | sed -e 's/dollarsone/\$$1/g' -e 's/dollarszero/\$$0/g' >> $@
f2e4ab3a 282
88d14a22
CP
283########################################
284#
285# Remove the dontaudit rules from the policy.conf
286#
287enableaudit: policy.conf
288 @test -d tmp || mkdir -p tmp
289 @echo "Removing dontaudit rules from policy.conf"
290 $(QUIET) grep -v dontaudit policy.conf > tmp/policy.audit
291 $(QUIET) mv tmp/policy.audit policy.conf
292
6d314fd3
CP
293########################################
294#
295# Construct file_contexts
296#
92e928e1 297$(FC): $(M4SUPPORT) tmp/generated_definitions.conf $(ALL_FC_FILES) $(FCSORT)
6d314fd3 298 @test -d tmp || mkdir -p tmp
92e928e1
CP
299 $(QUIET) m4 $(M4PARAM) $(M4SUPPORT) tmp/generated_definitions.conf $(ALL_FC_FILES) > tmp/$@.tmp
300 $(QUIET) grep -e HOME -e ROLE tmp/$@.tmp > $(HOMEDIR_TEMPLATE)
301 $(QUIET) sed -i -e /HOME/d -e /ROLE/d tmp/$@.tmp
302 $(QUIET) $(FCSORT) tmp/$@.tmp $@
6d314fd3 303
547283e2
CP
304########################################
305#
306# Install file_contexts
307#
3a80ec29 308$(FCPATH): $(FC) $(USERPATH)/system.users
547283e2
CP
309 @mkdir -p $(CONTEXTPATH)/files
310 $(QUIET) install -m 644 $(FC) $(FCPATH)
92e928e1
CP
311 $(QUIET) install -m 644 $(HOMEDIR_TEMPLATE) $(HOMEDIRPATH)
312 $(QUIET) $(GENHOMEDIRCON) -d $(TOPDIR) -t $(NAME) $(USEPWD)
547283e2 313
b4cd1533
CP
314########################################
315#
316# Filesystem labeling
317#
88d14a22 318FILESYSTEMS := `mount | grep -v "context=" | egrep -v '\((|.*,)bind(,.*|)\)' | awk '/(ext[23]| xfs| jfs).*rw/{print $$3}';`
b4cd1533 319
88d14a22
CP
320checklabels: $(FC) $(SETFILES)
321 @if test -z "$(FILESYSTEMS)"; then \
322 echo "No filesystems with extended attributes found!" ;\
323 false ;\
324 fi
b4cd1533
CP
325 $(QUIET) $(SETFILES) -v -n $(FC) $(FILESYSTEMS)
326
88d14a22
CP
327restorelabels: $(FC) $(SETFILES)
328 @if test -z "$(FILESYSTEMS)"; then \
329 echo "No filesystems with extended attributes found!" ;\
330 false ;\
331 fi
b4cd1533
CP
332 $(QUIET) $(SETFILES) -v $(FC) $(FILESYSTEMS)
333
334relabel: $(FC) $(SETFILES)
88d14a22
CP
335 @if test -z "$(FILESYSTEMS)"; then \
336 echo "No filesystems with extended attributes found!" ;\
337 false ;\
338 fi
b4cd1533
CP
339 $(QUIET) $(SETFILES) $(FC) $(FILESYSTEMS)
340
84eb353c
CP
341########################################
342#
343# Create config files
344#
d2d6c8ce
CP
345conf: $(MOD_DISABLE) $(TUNABLES) $(GENERATED_TE) $(GENERATED_IF) $(GENERATED_FC)
346
347$(MOD_DISABLE) $(TUNABLES): $(POLXML)
84eb353c 348 @echo "Creating $(MOD_DISABLE) and $(TUNABLES)"
12b559a4 349 $(QUIET) cd $(DOCS) && ../$(GENDOC) -t ../$(TUNABLES) -m ../$(MOD_DISABLE) -x ../$(POLXML)
84eb353c 350
6d314fd3
CP
351########################################
352#
353# Documentation generation
354#
355
d2d6c8ce 356# minimal dependencies here, because we don't want to rebuild
84eb353c
CP
357# this and its dependents every time the dependencies
358# change
d2d6c8ce 359$(POLXML): $(ALL_INTERFACES)
88c72f44 360 @echo "Creating $@"
84eb353c 361 @mkdir -p tmp
004db90d
CP
362 $(QUIET) echo '<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>' > $@
363 $(QUIET) echo '<!DOCTYPE policy SYSTEM "policy.dtd">' >> $@
364 $(QUIET) echo "<policy>" >> $@
44cda51b 365# process this through m4 to eliminate the generated definitions templates.
3c62aa31 366# currently these are only in corenetwork.if
84eb353c 367 $(QUIET) m4 $(ALL_INTERFACES) $(GLOBALTUN) | egrep -h "^##[[:blank:]]" | sed -e 's/^##[[:blank:]]//g' >> $@
88c72f44 368 $(QUIET) echo "</policy>" >> $@
0447352a
CP
369 $(QUIET) if test -x $(XMLLINT) && test -f $(XMLDTD); then \
370 $(XMLLINT) --noout --dtdvalid $(XMLDTD) $@ ;\
004db90d 371 fi
6d314fd3 372
12b559a4 373html: $(POLXML)
20030ef5 374 @mkdir -p $(HTMLDIR)
12b559a4 375 $(QUIET) cd $(DOCS) && ../$(GENDOC) -d ../$(HTMLDIR) -T ../$(DOCTEMPLATE) -x ../$(POLXML)
20030ef5
CP
376 $(QUIET) cp $(DOCTEMPLATE)/*.css $(HTMLDIR)
377
c9a26b3e
CP
378########################################
379#
380# Runtime binary policy patching of users
381#
382$(USERPATH)/system.users: $(USER_FILES) tmp/generated_definitions.conf
383 @mkdir -p $(USERPATH)
384 @echo "Installing system.users"
385 @echo "# " > tmp/system.users
386 @echo "# Do not edit this file. " >> tmp/system.users
387 @echo "# This file is replaced on reinstalls of this policy." >> tmp/system.users
388 @echo "# Please edit local.users to make local changes." >> tmp/system.users
389 @echo "#" >> tmp/system.users
390 $(QUIET) m4 $(M4PARAM) tmp/generated_definitions.conf $(USER_FILES) | \
391 egrep -v "^[[:space:]]*($$|#)" >> tmp/system.users
392 $(QUIET) install -m 644 tmp/system.users $@
393
1beba1c6 394$(USERPATH)/local.users: config/local.users
c9a26b3e
CP
395 @mkdir -p $(USERPATH)
396 @echo "Installing local.users"
397 $(QUIET) install -C -b -m 644 $< $@
398
399########################################
400#
401# Appconfig files
402#
403install-appconfig: $(APPFILES)
404
1beba1c6
CP
405$(INSTALLDIR)/booleans: $(TUNABLES)
406 @mkdir -p $(INSTALLDIR)
407 $(QUIET) egrep '^[[:blank:]]*[[:alpha:]]' $(TUNABLES) \
408 | sed -e 's/false/0/g' -e 's/true/1/g' > tmp/booleans
409 $(QUIET) install -m 644 tmp/booleans $@
410
2926f9c7 411$(CONTEXTPATH)/files/media: $(APPCONF)/media
1beba1c6
CP
412 @mkdir -p $(CONTEXTPATH)/files/
413 $(QUIET) install -m 644 $< $@
c9a26b3e 414
2926f9c7 415$(APPDIR)/default_contexts: $(APPCONF)/default_contexts
1beba1c6
CP
416 @mkdir -p $(APPDIR)
417 $(QUIET) install -m 644 $< $@
c9a26b3e 418
2926f9c7 419$(APPDIR)/removable_context: $(APPCONF)/removable_context
1beba1c6
CP
420 @mkdir -p $(APPDIR)
421 $(QUIET) install -m 644 $< $@
c9a26b3e
CP
422
423$(APPDIR)/customizable_types: policy.conf
1beba1c6
CP
424 @mkdir -p $(APPDIR)
425 $(QUIET) grep "^type .*customizable" $< | cut -d',' -f1 | cut -d' ' -f2 > tmp/customizable_types
426 $(QUIET) install -m 644 tmp/customizable_types $@
c9a26b3e 427
2926f9c7 428$(APPDIR)/default_type: $(APPCONF)/default_type
1beba1c6
CP
429 @mkdir -p $(APPDIR)
430 $(QUIET) install -m 644 $< $@
c9a26b3e 431
2926f9c7 432$(APPDIR)/userhelper_context: $(APPCONF)/userhelper_context
1beba1c6
CP
433 @mkdir -p $(APPDIR)
434 $(QUIET) install -m 644 $< $@
c9a26b3e 435
2926f9c7 436$(APPDIR)/initrc_context: $(APPCONF)/initrc_context
1beba1c6
CP
437 @mkdir -p $(APPDIR)
438 $(QUIET) install -m 644 $< $@
c9a26b3e 439
2926f9c7 440$(APPDIR)/failsafe_context: $(APPCONF)/failsafe_context
1beba1c6
CP
441 @mkdir -p $(APPDIR)
442 $(QUIET) install -m 644 $< $@
c9a26b3e 443
2926f9c7 444$(APPDIR)/dbus_contexts: $(APPCONF)/dbus_contexts
1beba1c6
CP
445 @mkdir -p $(APPDIR)
446 $(QUIET) install -m 644 $< $@
c9a26b3e 447
2926f9c7 448$(APPDIR)/users/root: $(APPCONF)/root_default_contexts
1beba1c6
CP
449 @mkdir -p $(APPDIR)/users
450 $(QUIET) install -m 644 $< $@
c9a26b3e 451
b4cd1533
CP
452clean:
453 rm -fR tmp
454 rm -f policy.conf
455 rm -f policy.$(PV)
456 rm -f $(FC)
457
0fbe15dc 458bare: clean
12b559a4 459 rm -f $(POLXML)
254bbc7b
CP
460 rm -f $(SUPPORT)/*.pyc
461 rm -f $(FCSORT)
0fbe15dc
CP
462 rm -f $(MOD_DISABLE)
463 rm -f $(TUNABLES)
20030ef5 464 rm -fR $(HTMLDIR)
e12e5738
CP
465ifneq ($(GENERATED_TE),)
466 rm -f $(GENERATED_TE)
467endif
468ifneq ($(GENERATED_IF),)
469 rm -f $(GENERATED_IF)
470endif
471ifneq ($(GENERATED_FC),)
472 rm -f $(GENERATED_FC)
473endif
0fbe15dc
CP
474
475.PHONY: default policy install reload enableaudit checklabels restorelabels relabel conf clean bare