xsm, python tools: remove autogenerated xsm.py

- The patch does away with the autogenerated xsm.py file and
introduces a config parameter in xend-config.sxp to determine the
security module. The parameter is (xsm_module_name {acm, dummy,
flask}).  The default setting/option is dummy.  .hgignore is also
updated to stop ignoring xsm.py on commits.

- The patch has created an xsconstant for XS_POLICY_FLASK and updated
  the toolchain to check the instance of XS_POLICY_USE.  XS_POLICY_USE
  evalauates to XS_POLICY_FLASK or XS_POLICY_ACM or XS_POLICY_DUMMY
  depending on configuration.

- Flask relies on the current value of ssidref returned by dominfo to
  ensure that the label to sid mapping is consistent.  ssidref had
  been pop'ed from the dominfo object.  The patch addresses this
  issue.

- Flask python module style cleanups.

Signed-off-by: George Coker <gscoker@alpha.ncsc.mil>
This commit is contained in:
Keir Fraser committed 2008-09-04 11:23:08 +01:00
1 parent e4e909d6e2
commit 06cfe5df7b
12 files changed
+47 -37

No files matched your search

+3 -23
View File
@@ -1,14 +1,6 @@
XEN_ROOT = ../..
include $(XEN_ROOT)/tools/Rules.mk
XEN_SECURITY_MODULE = dummy
ifeq ($(FLASK_ENABLE),y)
XEN_SECURITY_MODULE = flask
endif
ifeq ($(ACM_SECURITY),y)
XEN_SECURITY_MODULE = acm
endif
.PHONY: all
all: build
@@ -23,8 +15,8 @@ CATALOGS = $(patsubst %,xen/xm/messages/%.mo,$(LINGUAS))
NLSDIR = /usr/share/locale
.PHONY: build buildpy
buildpy: xsm.py
CC="$(CC)" CFLAGS="$(CFLAGS)" XEN_SECURITY_MODULE="$(XEN_SECURITY_MODULE)" python setup.py build
buildpy:
CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py build
build: buildpy refresh-pot refresh-po $(CATALOGS)
@@ -61,18 +53,6 @@ refresh-po: $(POTFILE)
%.mo: %.po
$(MSGFMT) -c -o $@ $<
xsm.py:
@(set -e; \
echo "XEN_SECURITY_MODULE = \""$(XEN_SECURITY_MODULE)"\""; \
echo "from xsm_core import *"; \
echo ""; \
echo "import xen.util.xsm."$(XEN_SECURITY_MODULE)"."$(XEN_SECURITY_MODULE)" as xsm_module"; \
echo ""; \
echo "xsm_init(xsm_module)"; \
echo "from xen.util.xsm."$(XEN_SECURITY_MODULE)"."$(XEN_SECURITY_MODULE)" import *"; \
echo "del xsm_module"; \
echo "") >xen/util/xsm/$@
.PHONY: install
ifndef XEN_PYTHON_NATIVE_INSTALL
install: LIBPATH=$(shell PYTHONPATH=xen/util python -c "import auxbin; print auxbin.libpath()")
@@ -104,4 +84,4 @@ test:
.PHONY: clean
clean:
rm -rf build *.pyc *.pyo *.o *.a *~ $(CATALOGS) xen/util/xsm/xsm.py xen/util/auxbin.pyc
rm -rf build *.pyc *.pyo *.o *.a *~ $(CATALOGS) xen/util/auxbin.pyc
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.