|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] libxl: Add device_model_stubdomain_seclabel
# HG changeset patch
# User Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
# Date 1328811915 0
# Node ID 90fbc6b03d2f85577642c591d482ccc3dac532ae
# Parent 0f9e4b424d7c55e5ebfbfe933ceeb647f2cd6176
libxl: Add device_model_stubdomain_seclabel
This allows the security label of stub domains to be specified.
Signed-off-by: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
diff -r 0f9e4b424d7c -r 90fbc6b03d2f docs/man/xl.cfg.pod.5
--- a/docs/man/xl.cfg.pod.5 Thu Feb 09 18:07:48 2012 +0000
+++ b/docs/man/xl.cfg.pod.5 Thu Feb 09 18:25:15 2012 +0000
@@ -789,6 +789,10 @@
be automatically selected based upon the other features and options
you have selected.
+=item B<device_model_stubdomain_seclabel="LABEL">
+
+Assign an XSM security label to the device-model stubdomain.
+
=item B<device_model_args=[ "ARG", "ARG", ...]>
Pass additional arbitrary options on the devide-model command
diff -r 0f9e4b424d7c -r 90fbc6b03d2f tools/libxl/libxl_dm.c
--- a/tools/libxl/libxl_dm.c Thu Feb 09 18:07:48 2012 +0000
+++ b/tools/libxl/libxl_dm.c Thu Feb 09 18:25:15 2012 +0000
@@ -703,6 +703,7 @@
dm_config.c_info.type = LIBXL_DOMAIN_TYPE_PV;
dm_config.c_info.name = libxl__sprintf(gc, "%s-dm",
libxl__domid_to_name(gc, guest_domid));
+ dm_config.c_info.ssidref = guest_config->b_info.device_model_ssidref;
libxl_uuid_generate(&dm_config.c_info.uuid);
diff -r 0f9e4b424d7c -r 90fbc6b03d2f tools/libxl/libxl_types.idl
--- a/tools/libxl/libxl_types.idl Thu Feb 09 18:07:48 2012 +0000
+++ b/tools/libxl/libxl_types.idl Thu Feb 09 18:25:15 2012 +0000
@@ -217,6 +217,7 @@
("device_model_stubdomain", bool),
# you set device_model you must set device_model_version too
("device_model", string),
+ ("device_model_ssidref", uint32),
# extra parameters pass directly to qemu, NULL terminated
("extra", libxl_string_list),
diff -r 0f9e4b424d7c -r 90fbc6b03d2f tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c Thu Feb 09 18:07:48 2012 +0000
+++ b/tools/libxl/xl_cmdimpl.c Thu Feb 09 18:25:15 2012 +0000
@@ -1134,6 +1134,21 @@
if (!xlu_cfg_get_long (config, "device_model_stubdomain_override", &l, 0))
b_info->device_model_stubdomain = l;
+ if (!xlu_cfg_get_string (config, "device_model_stubdomain_seclabel",
+ &buf, 0)) {
+ e = libxl_flask_context_to_sid(ctx, (char *)buf, strlen(buf),
+ &b_info->device_model_ssidref);
+ if (e) {
+ if (errno == ENOSYS) {
+ fprintf(stderr, "XSM Disabled:"
+ " device_model_stubdomain_seclabel not supported\n");
+ } else {
+ fprintf(stderr, "Invalid device_model_stubdomain_seclabel:"
+ " %s\n", buf);
+ exit(1);
+ }
+ }
+ }
#define parse_extra_args(type) \
e = xlu_cfg_get_list_as_string_list(config, "device_model_args"#type, \
&b_info->extra##type, 0); \
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |