summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2011-06-20 16:57:15 +0930
committerRusty Russell <rusty@rustcorp.com.au>2011-06-20 11:18:34 +0200
commiteb8cb4f5486ec8648527e78c110b9167887ee479 (patch)
treed34fce8a3e77f34a82f2ce947f21a3158add99f7 /source3
parentf72dd0cf0f5f4b9082d022e26b1d4117b3a04d52 (diff)
downloadsamba-eb8cb4f5486ec8648527e78c110b9167887ee479.tar.gz
source3/smdb/files.c: file_name_hash to use Jenkins hash from CCAN.
Rather than tdb's internal one.
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/files.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source3/smbd/files.c b/source3/smbd/files.c
index bdf85dbfc38..b8a25c1d5b6 100644
--- a/source3/smbd/files.c
+++ b/source3/smbd/files.c
@@ -22,6 +22,7 @@
#include "smbd/globals.h"
#include "libcli/security/security.h"
#include "util_tdb.h"
+#include <ccan/hash/hash.h>
#define VALID_FNUM(fnum) (((fnum) >= 0) && ((fnum) < real_max_open_files))
@@ -599,7 +600,6 @@ NTSTATUS dup_file_fsp(struct smb_request *req, files_struct *from,
NTSTATUS file_name_hash(connection_struct *conn,
const char *name, uint32_t *p_name_hash)
{
- TDB_DATA key;
char *fullpath = NULL;
/* Set the hash of the full pathname. */
@@ -610,8 +610,7 @@ NTSTATUS file_name_hash(connection_struct *conn,
if (!fullpath) {
return NT_STATUS_NO_MEMORY;
}
- key = string_term_tdb_data(fullpath);
- *p_name_hash = tdb_jenkins_hash(&key);
+ *p_name_hash = hash(fullpath, strlen(fullpath) + 1, 0);
DEBUG(10,("file_name_hash: %s hash 0x%x\n",
fullpath,