libxl: Exposed Flask XSM functionality
PATCH v2 1/1 libxl: Exposed Flask XSM functionality
Adds support for assigning a label to domains, obtaining and setting the current enforcing mode, and loading a policy with xl command when the Flask XSM is in use.
libxl.c | 1 libxl.idl | 3 - xl.h | 3 + xl_cmdimpl.c | 171 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--- xl_cmdtable.c | 18 +++++- 5 files changed, 187 insertions(+), 9 deletions(-)
Signature · 2 lines
Machon Gregory National Information Assurance Research Lab (NIARL)
tools/libxl/libxl.c +1 -0
@@ -333,6 +333,7 @@ {memcpy (&(xlinfo->uuid), xcinfo->handle,sizeof (xen_domain_handle_t)); xlinfo->domid = xcinfo->domain; + xlinfo->ssidref = xcinfo->ssidref; xlinfo->dying = !!(xcinfo->flags&XEN_DOMINF_dying); xlinfo->shutdown = !!(xcinfo->flags&XEN_DOMINF_shutdown);
tools/libxl/libxl.idl +2 -1
@@ -28,6 +28,7 @@ libxl_dominfo = Struct("dominfo",[ ("uuid", libxl_uuid), ("domid", domid), + ("ssidref", uint32), ("running", BitField(uint8, 1)), ("blocked", BitField(uint8, 1)), ("paused", BitField(uint8, 1)),
@@ -77,7 +78,7 @@ ("hvm", bool), ("hap", bool), ("oos", bool), - ("ssidref", integer), + ("ssidref", uint32), ("name", string), ("uuid", libxl_uuid), ("xsdata", libxl_key_value_list),
tools/libxl/xl.h +3 -0
@@ -87,6 +87,9 @@int main_cpupoolcpuremove (int argc,char **argv);int main_cpupoolmigrate (int argc,char **argv);int main_cpupoolnumasplit (int argc,char **argv); +int main_getenforce (int argc,char **argv); +int main_setenforce (int argc,char **argv); +int main_loadpolicy (int argc,char **argv);void help (const char *command);
tools/libxl/xl_cmdimpl.c +164 -7
227 lines not on this page · raw message
tools/libxl/xl_cmdtable.c +17 -1
@@ -36,7 +36,8 @@"List information about all/some domains" ,"[options] [Domain]\n" ,"-l, --long Output all VM details\n" -"-v, --verbose Prints out UUIDs" , +"-v, --verbose Prints out UUIDs and security context\n" +"-Z, --context Prints out security context" }, { "destroy", &main_destroy,
@@ -382,6 +383,21 @@ "Splits up the machine into one CPU pool per NUMA node", "", }, + {"getenforce" , + &main_getenforce, +"Returns the current enforcing mode of the Flask Xen security module" , +"" , + }, + { "setenforce", + &main_setenforce, +"Sets the current enforcing mode of the Flask Xen security module" , +"<1|0|Enforcing|Permissive>" , + }, + { "loadpolicy", + &main_loadpolicy, +"Loads a new policy int the Flask Xen security module" , + "<policy file>", + }, };int cmdtable_len =sizeof (cmd_table)/sizeof (struct cmd_spec );
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Machon Gregory writes ("[Xen-devel] [PATCHv2] libxl: Exposed Flask XSM functionality"):
Quoted 3 lines
Adds support for assigning a label to domains, obtaining and setting the current enforcing mode, and loading a policy with xl command when the Flask XSM is in use.
Thanks for this. I would like to apply this patch but I don't seem to be able to find the corresponding libxc patch which is obviously necessary as a part of this series.
Very likely I have dropped it and now aren't using the right search terms, so perhaps you could repost it for me ?
While I'm here can I suggest that you use software which posts a series of patches as a single thread rather than as a separate thread for each patch ? git-send-email knows how to do this; I don't know how to get hg to do it but no doubt someone here does.
Thanks,
Ian.
Quoted 9 lines · Ian Jackson
Machon Gregory writes ("[Xen-devel] [PATCHv2] libxl: Exposed Flask XSM functionality"):
Quoted 3 lines
Adds support for assigning a label to domains, obtaining and setting the current enforcing mode, and loading a policy with xl command when the Flask XSM is in use.
Thanks for this. I would like to apply this patch but I don't seem to be able to find the corresponding libxc patch which is obviously necessary as a part of this series.
Quoted 7 lines
Very likely I have dropped it and now aren't using the right search terms, so perhaps you could repost it for me ?
While I'm here can I suggest that you use software which posts a series of patches as a single thread rather than as a separate thread for each patch ? git-send-email knows how to do this; I don't know how to get hg to do it but no doubt someone here does.
I think it's the default if you give the "hg email" command a range spanning > 1 commit.
Ian.