- policy translation tools support
PATCH 1/1 - policy translation tools support
This patch adds support for the simplified policies to the policy translation tools.
Signed-off by: Reiner Sailer <[email protected]>
--- tools/security/Makefile | 24 - tools/security/secpol_tool.c | 199 ++---------- tools/security/secpol_xml2bin.c | 624 +++++++++++++++++++--------------------- tools/security/secpol_xml2bin.h | 179 ++++++----- 4 files changed, 437 insertions(+), 589 deletions(-)
tools/security/Makefile +6 -18
@@ -30,28 +30,23 @@ SRCS_TOOL = secpol_tool.c OBJS_TOOL := $(patsubst %.c,%.o,$(filter %.c,$(SRCS_TOOL))) SRCS_XML2BIN = secpol_xml2bin.c secpol_xml2bin.h OBJS_XML2BIN := $(patsubst %.c,%.o,$(filter %.c,$(SRCS_XML2BIN))) -SRCS_GETD = get_decision.c -OBJS_GETD := $(patsubst %.c,%.o,$(filter %.c,$(SRCS_GETD))) ACM_INST_TOOLS = xensec_tool xensec_xml2bin xensec_gen -ACM_NOINST_TOOLS = get_decision ACM_OBJS = $(OBJS_TOOL) $(OBJS_XML2BIN) $(OBJS_GETD) -ACM_SCRIPTS = getlabel.sh setlabel.sh updategrub.sh labelfuncs.sh +ACM_SCRIPTS = python/xensec_tools/acm_getlabel python/xensec_tools/acm_getdecision ACM_CONFIG_DIR = /etc/xen/acm-security ACM_POLICY_DIR = $(ACM_CONFIG_DIR)/policies ACM_SCRIPT_DIR = $(ACM_CONFIG_DIR)/scripts ACM_INST_HTML = python/xensec_gen/index.html -ACM_INST_CGI = python/xensec_gen/cgi-bin/policy.cgi \ - python/xensec_gen/cgi-bin/policylabel.cgi +ACM_INST_CGI = python/xensec_gen/cgi-bin/policy.cgi ACM_SECGEN_HTMLDIR= /var/lib/xensec_gen ACM_SECGEN_CGIDIR = $(ACM_SECGEN_HTMLDIR)/cgi-bin ACM_SCHEMA = security_policy.xsd -ACM_EXAMPLES = null chwall ste chwall_ste +ACM_EXAMPLES = chwall ste chwall_ste ACM_POLICY_SUFFIX = security_policy.xml -ACM_LABEL_SUFFIX = security_label_template.xml ifeq ($(ACM_SECURITY),y) .PHONY: all
@@ -64,10 +59,10 @@ install: all $(ACM_CONFIG_FILE) $(INSTALL_DIR) -p $(DESTDIR)$(ACM_CONFIG_DIR) $(INSTALL_DIR) -p $(DESTDIR)$(ACM_POLICY_DIR) $(INSTALL_DATA) -p policies/$(ACM_SCHEMA) $(DESTDIR)$(ACM_POLICY_DIR) + $(INSTALL_DIR) -p $(DESTDIR)$(ACM_POLICY_DIR)/example for i in $(ACM_EXAMPLES); do \ - $(INSTALL_DIR) -p $(DESTDIR)$(ACM_POLICY_DIR)/$$i; \ - $(INSTALL_DATA) -p policies/$$i/$$i-$(ACM_POLICY_SUFFIX) $(DESTDIR)$(ACM_POLICY_DIR)/$$i; \ - $(INSTALL_DATA) -p policies/$$i/$$i-$(ACM_LABEL_SUFFIX) $(DESTDIR)$(ACM_POLICY_DIR)/$$i; \ + $(INSTALL_DIR) -p $(DESTDIR)$(ACM_POLICY_DIR)/example/$$i; \ + $(INSTALL_DATA) -p policies/example/$$i/client_v1-$(ACM_POLICY_SUFFIX) $(DESTDIR)$(ACM_POLICY_DIR)/example/$$i; \ done $(INSTALL_DIR) -p $(DESTDIR)$(ACM_SCRIPT_DIR) $(INSTALL_PROG) -p $(ACM_SCRIPTS) $(DESTDIR)$(ACM_SCRIPT_DIR)
@@ -99,9 +94,6 @@ xensec_tool: $(OBJS_TOOL) xensec_xml2bin: $(OBJS_XML2BIN) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ -get_decision: $(OBJS_GETD) - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ - xensec_gen: xensec_gen.py cp -f $^ $@
@@ -116,8 +108,4 @@ clean: .PHONY: mrproper mrproper: clean -.PHONY: boot_install -boot_install: install - $(ACM_SCRIPT_DIR)/updategrub.sh $(POLICY) $(KERNEL_VERSION) - -include $(PROG_DEPS)
tools/security/secpol_tool.c +34 -165
344 lines not on this page · raw message
tools/security/secpol_xml2bin.c +299 -325
1,147 lines not on this page · raw message
tools/security/secpol_xml2bin.h +98 -81
216 lines not on this page · raw message
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel