summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/smbd/mangle_hash.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/smbd/mangle_hash.c b/source3/smbd/mangle_hash.c
index 94bb184b0f..c08bc4019a 100644
--- a/source3/smbd/mangle_hash.c
+++ b/source3/smbd/mangle_hash.c
@@ -612,7 +612,10 @@ static bool must_mangle(const char *name,
}
status = is_valid_name(name_ucs2, False, False);
TALLOC_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);
}
/*****************************************************************************