[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v2 6/6] libxl: assign a default ssidref (XSM label) to guests

We have now arranged for SECINITSID_DOMU to be defined (it corresponds
to system_u:system_r:domU_t in the default policy). Use it as the
default for the SSID of every domain.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Cc: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
Cc: Wei.Liu2@xxxxxxxxxx
v2: Set ssidref rather than label. It is no longer necessary to
    reorder things in libxl.c.
 tools/libxl/libxl_create.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
index f0da7dc..c9b2fec 100644
--- a/tools/libxl/libxl_create.c
+++ b/tools/libxl/libxl_create.c
@@ -25,6 +25,8 @@
 #include <xen/hvm/hvm_info_table.h>
 #include <xen/hvm/e820.h>
+#include <xen-xsm/flask/flask.h>
 int libxl__domain_create_info_setdefault(libxl__gc *gc,
                                          libxl_domain_create_info *c_info)
@@ -42,6 +44,9 @@ int libxl__domain_create_info_setdefault(libxl__gc *gc,
     libxl_defbool_setdefault(&c_info->run_hotplug_scripts, true);
     libxl_defbool_setdefault(&c_info->driver_domain, false);
+    if (!c_info->ssidref)
+        c_info->ssidref = SECINITSID_DOMU;
     return 0;

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.