aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxen
diff options
context:
space:
mode:
Diffstat (limited to 'tools/libxen')
-rw-r--r--tools/libxen/include/xen/api/xen_acmpolicy.h17
-rw-r--r--tools/libxen/src/xen_acmpolicy.c35
2 files changed, 51 insertions, 1 deletions
diff --git a/tools/libxen/include/xen/api/xen_acmpolicy.h b/tools/libxen/include/xen/api/xen_acmpolicy.h
index 4ac1cfd8e8..d0b4a500ca 100644
--- a/tools/libxen/include/xen/api/xen_acmpolicy.h
+++ b/tools/libxen/include/xen/api/xen_acmpolicy.h
@@ -108,7 +108,22 @@ xen_acmpolicy_get_binary(xen_session *session, char **binary,
xen_xspolicy xspolicy);
/**
- * Get the UUID filed of the given policy.
+ * Get the binary representation (base64-encoded) of the currently
+ * enforced policy.
+ */
+extern bool
+xen_acmpolicy_get_enforced_binary(xen_session *session, char **binary,
+ xen_xspolicy xspolicy);
+
+/**
+ * Get the ACM ssidref of the given VM.
+ */
+bool
+xen_acmpolicy_get_VM_ssidref(xen_session *session, int64_t *result,
+ xen_vm vm);
+
+/**
+ * Get the UUID field of the given policy.
*/
bool
xen_acmpolicy_get_uuid(xen_session *session, char **result,
diff --git a/tools/libxen/src/xen_acmpolicy.c b/tools/libxen/src/xen_acmpolicy.c
index 1a6190bfee..f8d69195a4 100644
--- a/tools/libxen/src/xen_acmpolicy.c
+++ b/tools/libxen/src/xen_acmpolicy.c
@@ -217,6 +217,41 @@ xen_acmpolicy_get_binary(xen_session *session, char **result,
bool
+xen_acmpolicy_get_enforced_binary(xen_session *session, char **result,
+ xen_xspolicy xspolicy)
+{
+ abstract_value param_values[] =
+ {
+ { .type = &abstract_type_string,
+ .u.string_val = xspolicy },
+ };
+
+ abstract_type result_type = abstract_type_string;
+
+ *result = NULL;
+ XEN_CALL_("ACMPolicy.get_enforced_binary");
+ return session->ok;
+}
+
+
+bool
+xen_acmpolicy_get_VM_ssidref(xen_session *session,
+ int64_t *result, xen_vm vm)
+{
+ abstract_value param_values[] =
+ {
+ { .type = &abstract_type_string,
+ .u.string_val = vm }
+ };
+
+ abstract_type result_type = abstract_type_int;
+
+ XEN_CALL_("ACMPolicy.get_VM_ssidref");
+ return session->ok;
+}
+
+
+bool
xen_acmpolicy_get_uuid(xen_session *session, char **result,
xen_xspolicy xspolicy)
{