summaryrefslogtreecommitdiff
path: root/librpc/ndr/uuid.c
diff options
context:
space:
mode:
Diffstat (limited to 'librpc/ndr/uuid.c')
-rw-r--r--librpc/ndr/uuid.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/librpc/ndr/uuid.c b/librpc/ndr/uuid.c
index 33a7eeeb5a..b6a7fc7071 100644
--- a/librpc/ndr/uuid.c
+++ b/librpc/ndr/uuid.c
@@ -335,3 +335,20 @@ _PUBLIC_ bool policy_handle_empty(struct policy_handle *h)
{
return (h->handle_type == 0 && GUID_all_zero(&h->uuid));
}
+
+_PUBLIC_ bool is_valid_policy_hnd(const struct policy_handle *hnd)
+{
+ struct policy_handle tmp;
+ ZERO_STRUCT(tmp);
+ return (memcmp(&tmp, hnd, sizeof(tmp)) != 0);
+}
+
+_PUBLIC_ bool policy_handle_equal(const struct policy_handle *hnd1,
+ const struct policy_handle *hnd2)
+{
+ if (!hnd1 || !hnd2) {
+ return false;
+ }
+
+ return (memcmp(hnd1, hnd2, sizeof(*hnd1)) == 0);
+}