From: Jeremy Allison Date: Thu, 19 Mar 2009 02:58:01 +0000 (-0700) Subject: Fix bug #6196 - Unable to serve files with colons to Linux CIFS/VFS client X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=985ba585207e840caa17c3d87d93ef1ba5f15cbb;p=thirdparty%2Fsamba.git Fix bug #6196 - Unable to serve files with colons to Linux CIFS/VFS client Looks like the pathname parsing for POSIX paths got broken when the code for doing Windows streams parsing got added. Jeremy. --- diff --git a/source/smbd/reply.c b/source/smbd/reply.c index 159c6f4abc4..a374b65d55d 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -78,11 +78,16 @@ static NTSTATUS check_path_syntax_internal(char *path, } } - if (!stream_started && *s == ':') { + if (!posix_path && !stream_started && *s == ':') { if (*p_last_component_contains_wcard) { return NT_STATUS_OBJECT_NAME_INVALID; } - /* stream names allow more characters than file names */ + /* Stream names allow more characters than file names. + We're overloading posix_path here to allow a wider + range of characters. If stream_started is true this + is still a Windows path even if posix_path is true. + JRA. + */ stream_started = true; start_of_name_component = false; posix_path = true;