From 7b41ccb28d62269dc1b56aa29253cfa92748e319 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Jacke?= Date: Fri, 17 Apr 2015 14:43:07 +0200 Subject: [PATCH 1/2] smbd/mangle/hash: tailing period and space are allowed these days BUG: https://bugzilla.samba.org/show_bug.cgi?id=11207 Signed-off-by: Bjoern Jacke --- source3/smbd/mangle_hash.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/source3/smbd/mangle_hash.c b/source3/smbd/mangle_hash.c index 46541e9..5bc31cd 100644 --- a/source3/smbd/mangle_hash.c +++ b/source3/smbd/mangle_hash.c @@ -547,7 +547,6 @@ static NTSTATUS mangle_get_prefix(const smb_ucs2_t *ucs2_string, smb_ucs2_t **pr static NTSTATUS is_valid_name(const smb_ucs2_t *fname, bool allow_wildcards, bool only_8_3) { smb_ucs2_t *str, *p; - size_t num_ucs2_chars; NTSTATUS ret = NT_STATUS_OK; if (!fname || !*fname) @@ -567,12 +566,6 @@ static NTSTATUS is_valid_name(const smb_ucs2_t *fname, bool allow_wildcards, boo if (!NT_STATUS_IS_OK(ret)) return ret; - /* Name can't end in '.' or ' ' */ - num_ucs2_chars = strlen_w(fname); - if (fname[num_ucs2_chars-1] == UCS2_CHAR('.') || fname[num_ucs2_chars-1] == UCS2_CHAR(' ')) { - return NT_STATUS_UNSUCCESSFUL; - } - str = strdup_w(fname); /* Truncate copy after the first dot. */ -- 2.3.0