diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-06-24 16:26:23 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-06-24 16:26:23 +1000 |
commit | 6da26870e0ae5acd6ff49a30ec2f6886b44d095e (patch) | |
tree | 850c71039563c16a5d563c47e7ba2ab645baf198 /source3/smbd/files.c | |
parent | 6925a799d04c6fa59dd2ddef1f5510f9bb7d17d1 (diff) | |
parent | 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 (diff) | |
download | samba-4.0.0alpha16.tar.gz samba-4.0.0alpha16.tar.xz samba-4.0.0alpha16.zip |
Merge 2610c05b5b95cc7036b3d6dfb894c6cfbdb68483 as Samba-4.0alpha16samba-4.0.0alpha16
Diffstat (limited to 'source3/smbd/files.c')
-rw-r--r-- | source3/smbd/files.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/smbd/files.c b/source3/smbd/files.c index b9063ccbb89..b8a25c1d5b6 100644 --- a/source3/smbd/files.c +++ b/source3/smbd/files.c @@ -21,6 +21,8 @@ #include "smbd/smbd.h" #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)) @@ -598,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. */ @@ -609,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, |