do dtd verification on xml. fix current xml to be valid

This commit is contained in:
Chris PeBenito 2005-06-01 18:34:34 +00:00
parent 3c62aa31a9
commit 004db90d3f
3 changed files with 19 additions and 5 deletions

View File

@ -44,6 +44,7 @@ SBINDIR := $(PREFIX)/sbin
CHECKPOLICY := $(BINDIR)/checkpolicy
LOADPOLICY := $(SBINDIR)/load_policy
SETFILES := $(SBINDIR)/setfiles
XMLLINT := $(BINDIR)/xmllint
# enable MLS if requested.
ifeq ($(MLS),y)
@ -270,11 +271,16 @@ xml: policy.xml
policy.xml: $(ALL_INTERFACES) tmp/generated_definitions.conf
@echo "Creating $@"
$(QUIET) echo "<policy>" > $@
$(QUIET) echo '<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>' > $@
$(QUIET) echo '<!DOCTYPE policy SYSTEM "policy.dtd">' >> $@
$(QUIET) echo "<policy>" >> $@
# process this through m4 to eliminate the generated definitions.
# currently these are only in corenetwork.if
$(QUIET) m4 $^ | egrep -h "^##[[:space:]]" | sed -e 's/^##[[:space:]]//g' >> $@
$(QUIET) m4 $^ | egrep -h "^##[[:blank:]]" | sed -e 's/^##[[:blank:]]//g' >> $@
$(QUIET) echo "</policy>" >> $@
$(QUIET) if test -x $(XMLLINT) && test -f policy.dtd; then \
$(XMLLINT) --noout --dtdvalid policy.dtd $@ ;\
fi
########################################
#

View File

@ -335,3 +335,4 @@ dontaudit $1_gpg_pinentry_t cifs_t:file write;
dontaudit $1_gpg_pinentry_t { sysctl_t sysctl_kernel_t }:dir { getattr search };
') dnl end TODO
') dnl end gpg_per_userdomain_template

View File

@ -2,9 +2,16 @@
## <summary>Policy controlling access to network objects</summary>
ifdef(`interface_pass',`',`
#######################################
#
# corenetwork_network_tcp_on_general_interface(domain)
########################################
## <interface name="corenetwork_network_tcp_on_general_interface">
## <description>
## Send and receive TCP network traffic on the general interfaces.
## </description>
## <parameter name="domain">
## The type of the process performing this action.
## </parameter>
## <infoflow type="both" weight="10"/>
## </interface>
#
define(`corenetwork_network_tcp_on_general_interface',`
requires_block_template(`$0'_depend)