[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-3268-g6aca163

Günther Deschner gd at samba.org
Thu Jul 17 08:32:13 GMT 2008


The branch, v3-3-test has been updated
       via  6aca163e898bfeeff824725bb27b2ef4f7b729f9 (commit)
      from  7b4f84793b39f2940381bccae27f65275cc39572 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test


- Log -----------------------------------------------------------------
commit 6aca163e898bfeeff824725bb27b2ef4f7b729f9
Author: Günther Deschner <gd at samba.org>
Date:   Tue Jul 1 20:09:09 2008 +0200

    util: add policy_hnd_equal().
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 source/include/proto.h |    2 ++
 source/lib/util.c      |   10 ++++++++++
 2 files changed, 12 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/include/proto.h b/source/include/proto.h
index 03d203b..3c3d501 100644
--- a/source/include/proto.h
+++ b/source/include/proto.h
@@ -1408,6 +1408,8 @@ void *talloc_zeronull(const void *context, size_t size, const char *name);
 NTSTATUS split_ntfs_stream_name(TALLOC_CTX *mem_ctx, const char *fname,
 				char **pbase, char **pstream);
 bool is_valid_policy_hnd(const POLICY_HND *hnd);
+bool policy_hnd_equal(const struct policy_handle *hnd1,
+		      const struct policy_handle *hnd2);
 const char *strip_hostname(const char *s);
 
 /* The following definitions come from lib/util_file.c  */
diff --git a/source/lib/util.c b/source/lib/util.c
index 8d744a5..b346254 100644
--- a/source/lib/util.c
+++ b/source/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
 ****************************************************************/


-- 
Samba Shared Repository


More information about the samba-cvs mailing list