git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9eabcc6
)
Fix bug #6939 - mangling method = hash breaks long filenames.
author
Jeremy Allison
<jra@samba.org>
Fri, 18 Dec 2009 00:36:53 +0000
(16:36 -0800)
committer
Karolin Seeger
<kseeger@samba.org>
Wed, 13 Jan 2010 13:01:05 +0000
(14:01 +0100)
We were returning the wrong sense of the bool. must_mangle()
has to return !NT_STATUS_IS_OK, not NT_STATUS_IS_OK.
Jeremy.
(cherry picked from commit
f249d2d5893a3f8494e43fd1a805c78cee8eeec5
)
source/smbd/mangle_hash.c
patch
|
blob
|
history
diff --git
a/source/smbd/mangle_hash.c
b/source/smbd/mangle_hash.c
index 69ecf77834b09ce494799c7d23bb459594b27ac5..5de69e21ab419fa60522240e22bea1ba8c42fa80 100644
(file)
--- a/
source/smbd/mangle_hash.c
+++ b/
source/smbd/mangle_hash.c
@@
-613,7
+613,10
@@
static bool must_mangle(const char *name,
}
status = is_valid_name(name_ucs2, False, False);
SAFE_FREE(name_ucs2);
- return NT_STATUS_IS_OK(status);
+ /* We return true if we *must* mangle, so if it's
+ * a valid name (status == OK) then we must return
+ * false. Bug #6939. */
+ return !NT_STATUS_IS_OK(status);
}
/*****************************************************************************