summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2011-06-20 16:56:15 +0930
committerRusty Russell <rusty@rustcorp.com.au>2011-06-20 11:18:34 +0200
commitf72dd0cf0f5f4b9082d022e26b1d4117b3a04d52 (patch)
treec1462edab6eaf209b4fda45576720c031ef1ff1d /source3
parent20687dcd7b66635f851f09c51f967e17203c8ab0 (diff)
downloadsamba-f72dd0cf0f5f4b9082d022e26b1d4117b3a04d52.tar.gz
samba-f72dd0cf0f5f4b9082d022e26b1d4117b3a04d52.tar.bz2
samba-f72dd0cf0f5f4b9082d022e26b1d4117b3a04d52.zip
source3/lib/util.c: str_checksum to use Jenkins hash from CCAN.
Rather than tdb's internal one.
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/util.c6
-rwxr-xr-xsource3/wscript_build2
2 files changed, 5 insertions, 3 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index d04887c854..b25c15c7a3 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -28,6 +28,7 @@
#include "ctdbd_conn.h"
#include "../lib/util/util_pw.h"
#include "messages.h"
+#include <ccan/hash/hash.h>
/* Max allowable allococation - 256mb - 0x10000000 */
#define MAX_ALLOC_SIZE (1024*1024*256)
@@ -1306,8 +1307,9 @@ const char *tab_depth(int level, int depth)
int str_checksum(const char *s)
{
- TDB_DATA key = string_tdb_data(s);
- return tdb_jenkins_hash(&key);
+ if (s == NULL)
+ return 0;
+ return hash(s, strlen(s), 0);
}
/*****************************************************************
diff --git a/source3/wscript_build b/source3/wscript_build
index 1aefad0b67..0e8ec502f5 100755
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -800,7 +800,7 @@ bld.SAMBA3_SUBSYSTEM('KRBCLIENT',
bld.SAMBA3_SUBSYSTEM('samba3core',
source=LIB_SRC,
- deps='LIBCRYPTO ndr security NDR_SECURITY samba-util NDR_MESSAGING LIBASYNC_REQ tdb-wrap3 UTIL_TDB UTIL_PW SAMBA_VERSION KRB5_WRAP flag_mapping util_reg PTHREADPOOL interfaces cap string_init param util_str CHARSET3 namearray SECRETS3 dbwrap_util util_sec util_malloc memcache',
+ deps='LIBCRYPTO ndr security NDR_SECURITY samba-util NDR_MESSAGING LIBASYNC_REQ tdb-wrap3 UTIL_TDB UTIL_PW SAMBA_VERSION KRB5_WRAP flag_mapping util_reg PTHREADPOOL interfaces cap string_init param util_str CHARSET3 namearray SECRETS3 dbwrap_util util_sec util_malloc memcache ccan',
vars=locals())
bld.SAMBA3_SUBSYSTEM('LIB_NONSMBD',