From 6a3b742db7fba057b5dd0534bee6fa1385010311 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 1 Jul 2008 20:09:09 +0200 Subject: util: add policy_hnd_equal(). Guenther (This used to be commit 6aca163e898bfeeff824725bb27b2ef4f7b729f9) --- source3/lib/util.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source3/lib/util.c') diff --git a/source3/lib/util.c b/source3/lib/util.c index 8d744a5ae3..b346254617 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -3458,6 +3458,16 @@ bool is_valid_policy_hnd(const POLICY_HND *hnd) return (memcmp(&tmp, hnd, sizeof(tmp)) != 0); } +bool policy_hnd_equal(const struct policy_handle *hnd1, + const struct policy_handle *hnd2) +{ + if (!hnd1 || !hnd2) { + return false; + } + + return (memcmp(hnd1, hnd2, sizeof(*hnd1)) == 0); +} + /**************************************************************** strip off leading '\\' from a hostname ****************************************************************/ -- cgit