Chris PeBenito fedd3c
1) Reference Policy make targets:
Chris PeBenito fedd3c
Chris PeBenito fedd3c
General Make targets:
Chris PeBenito fedd3c
Chris PeBenito fedd3c
install-src		Install the policy sources into
Chris PeBenito fedd3c
			/etc/selinux/NAME/src/policy, where NAME is defined in
Chris PeBenito fedd3c
			the Makefile.  If not defined, the TYPE, as defined in
Chris PeBenito fedd3c
			the Makefile, is used.  The default NAME is refpolicy.
Chris PeBenito fedd3c
			A pre-existing source policy will be moved to
Chris PeBenito fedd3c
			/etc/selinux/NAME/src/policy.bak.
Chris PeBenito fedd3c
Chris PeBenito fedd3c
conf			Regenerate policy.xml, and update/create modules.conf
Chris PeBenito fedd3c
			and booleans.conf.  This should be done after adding
Chris PeBenito fedd3c
			or removing modules, or after running the bare target.
Chris PeBenito fedd3c
			If the configuration files exist, their settings will
Chris PeBenito fedd3c
			be preserved.  This must be ran on policy sources that
Chris PeBenito fedd3c
			are checked out from the CVS repository before they can
Chris PeBenito fedd3c
			be used.
Chris PeBenito fedd3c
Chris PeBenito fedd3c
clean			Delete all temporary files, compiled policies,
Chris PeBenito fedd3c
			and file_contexts.  Configuration files are left intact.
Chris PeBenito fedd3c
Chris PeBenito fedd3c
bare			Do the clean make target and also delete configuration
Chris PeBenito fedd3c
			files, web page documentation, and policy.xml.
Chris PeBenito fedd3c
Chris PeBenito fedd3c
html			Regenerate policy.xml and create web page documentation
Chris PeBenito fedd3c
			in the doc/html directory.
Chris PeBenito fedd3c
Chris PeBenito fedd3c
Make targets specific to modular (loadable modules) policies:
Chris PeBenito fedd3c
Chris PeBenito fedd3c
base			Compile and package the base module.  This is the
Chris PeBenito fedd3c
			default target for modular policies.
Chris PeBenito fedd3c
Chris PeBenito fedd3c
modules			Compile and package all Reference Policy modules
Chris PeBenito fedd3c
			configured to be built as loadable modules.
Chris PeBenito fedd3c
Chris PeBenito fedd3c
MODULENAME.pp		Compile and package the MODULENAME Reference Policy
Chris PeBenito fedd3c
			module.
Chris PeBenito fedd3c
Chris PeBenito c767b1
all			Compile and package the base module and all Reference
Chris PeBenito c767b1
			Policy modules configured to be built as loadable
Chris PeBenito c767b1
			modules.
Chris PeBenito c767b1
Chris PeBenito c767b1
install			Compile, package, and install the base module and
Chris PeBenito c767b1
			Reference Policy modules configured to be built as
Chris PeBenito c767b1
			loadable modules.
Chris PeBenito c767b1
Chris PeBenito c767b1
load			Compile, package, and install the base module and
Chris PeBenito c767b1
			Reference Policy modules configured to be built as
Chris PeBenito c767b1
			loadable modules, then insert them into the module
Chris PeBenito c767b1
			store.
Chris PeBenito c767b1
Chris PeBenito fedd3c
Make targets specific to monolithic policies:
Chris PeBenito fedd3c
Chris PeBenito fedd3c
policy			Compile a policy locally for development and testing.
Chris PeBenito fedd3c
			This is the default target for monolithic policies.
Chris PeBenito fedd3c
Chris PeBenito fedd3c
install			Compile and install the policy and file contexts.
Chris PeBenito fedd3c
Chris PeBenito fedd3c
load			Compile and install the policy and file contexts, then
Chris PeBenito fedd3c
			load the policy.
Chris PeBenito fedd3c
Chris PeBenito fedd3c
enableaudit		Remove all dontaudit rules from policy.conf.
Chris PeBenito fedd3c
Chris PeBenito fedd3c
relabel			Relabel the filesystem.
Chris PeBenito fedd3c
Chris PeBenito fedd3c
checklabels		Check the labels on the filesystem, and report when
Chris PeBenito fedd3c
			a file would be relabeled, but do not change its label.
Chris PeBenito fedd3c
Chris PeBenito fedd3c
restorelabels		Relabel the filesystem and report each file that is
Chris PeBenito fedd3c
			relabeled.
Chris PeBenito 97749e
Chris PeBenito 8e0ef1
2) Reference Policy Files and Directories
Chris PeBenito 97749e
All directories relative to the root of the Reference Policy sources directory.
Chris PeBenito 97749e
Chris PeBenito 8e0ef1
Makefile		General rules for building the policy.
Chris PeBenito 8e0ef1
Chris PeBenito 35bb02
Rules.modular		Makefile rules specific to building loadable module
Chris PeBenito 35bb02
			policies.
Chris PeBenito 8e0ef1
Chris PeBenito 35bb02
Rules.monolithic	Makefile rules specific to building monolithic policies.
Chris PeBenito 8e0ef1
Chris PeBenito 8e0ef1
build.conf		Options which influence the building of the policy,
Chris PeBenito 8e0ef1
			such as the policy type (strict, targeted, etc.)
Chris PeBenito 8e0ef1
			and distribution.
Chris PeBenito 8e0ef1
Chris PeBenito 97749e
config/appconfig-*	Application configuration files for all configurations
Chris PeBenito 97749e
			of the Reference Policy (targeted/strict with or without
Chris PeBenito 97749e
			MLS or MCS).  These are used by SELinux-aware programs.
Chris PeBenito 97749e
Chris PeBenito 97749e
config/local.users	The file read by load policy for adding SELinux users
Chris PeBenito 97749e
			to the policy on the fly.
Chris PeBenito 97749e
Chris PeBenito 97749e
doc/html/*		This contains the contents of the in-policy XML
Chris PeBenito 97749e
			documentation, presented in web page form.
Chris PeBenito 97749e
Chris PeBenito 97749e
doc/policy.dtd		The doc/policy.xml file is validated against this DTD.
Chris PeBenito 97749e
Chris PeBenito 97749e
doc/policy.xml		This file is generated/updated by the conf and html make
Chris PeBenito 97749e
			targets.  It contains the complete XML documentation
Chris PeBenito 97749e
			included in the policy.
Chris PeBenito 97749e
Chris PeBenito 97749e
doc/templates/*		Templates used for documentation web pages.
Chris PeBenito 97749e
Chris PeBenito 97749e
policy/booleans.conf	This file is generated/updated by the conf make target.
Chris PeBenito 97749e
			It contains the booleans in the policy, and their
Chris PeBenito 97749e
			default values.  If tunables are implemented as
Chris PeBenito 97749e
			booleans, tunables will also be included.  This file
Chris PeBenito 97749e
			will be installed as the /etc/selinux/NAME/booleans
Chris PeBenito 97749e
			file.
Chris PeBenito 97749e
Chris PeBenito 97749e
policy/constraints	This file defines additional constraints on permissions
Chris PeBenito 97749e
			in the form of boolean expressions that must be
Chris PeBenito 97749e
			satisfied in order for specified permissions to be
Chris PeBenito 97749e
			granted.  These constraints are used to further refine
Chris PeBenito 97749e
			the type enforcement rules and the role allow rules.
Chris PeBenito 97749e
			Typically, these constraints are used to restrict
Chris PeBenito 97749e
			changes in user identity or role to certain domains.
Chris PeBenito 97749e
Chris PeBenito 97749e
policy/global_booleans	This file defines all booleans that have a global scope,
Chris PeBenito 97749e
			their default value, and documentation.
Chris PeBenito 97749e
Chris PeBenito 97749e
policy/global_tunables	This file defines all tunables that have a global scope,
Chris PeBenito 97749e
			their default value, and documentation.
Chris PeBenito 97749e
Chris PeBenito 97749e
policy/flask/initial_sids  This file has declarations for each initial SID.
Chris PeBenito 97749e
Chris PeBenito 97749e
policy/flask/security_classes  This file has declarations for each security class.
Chris PeBenito 97749e
Chris PeBenito 97749e
policy/flask/access_vectors  This file defines the access vectors.  Common
Chris PeBenito 97749e
			prefixes for access vectors may be defined at the
Chris PeBenito 97749e
			beginning of the file.  After the common prefixes are
Chris PeBenito 97749e
			defined, an access vector may be defined for each
Chris PeBenito 97749e
			security class.
Chris PeBenito 97749e
Chris PeBenito 35bb02
policy/mcs		The multi-category security (MCS) configuration.
Chris PeBenito 35bb02
Chris PeBenito 35bb02
policy/mls		The multi-level security (MLS) configuration.
Chris PeBenito 35bb02
Chris PeBenito 97749e
policy/modules/*	Each directory represents a layer in Reference Policy
Chris PeBenito 97749e
			all of the modules are contained in one of these layers.
Chris PeBenito 97749e
Chris PeBenito 97749e
policy/modules.conf	This file contains a listing of available modules, and
Chris PeBenito 97749e
			how they will be used when building Reference Policy. To
Chris PeBenito 97749e
			prevent a module from  being used, set the module to
Chris PeBenito 97749e
			"off".  For monolithic policies, modules set to "base"
Chris PeBenito 97749e
			and "module" will be included in the policy.  For
Chris PeBenito 97749e
			modular policies, modules set to "base"	will be included
Chris PeBenito 97749e
			in the base module; those set to "module" will be
Chris PeBenito 97749e
			compiled as individual loadable	modules.
Chris PeBenito 97749e
Chris PeBenito 97749e
policy/support/*	Support macros.
Chris PeBenito 97749e
Chris PeBenito 35bb02
policy/users		This file defines the users included in the policy.
Chris PeBenito 35bb02
Chris PeBenito 97749e
support/*		Scripts and other tools used to help build the policy.