Fix bug #6196 - Unable to serve files with colons to Linux CIFS/VFS client
authorJeremy Allison <jra@samba.org>
Thu, 19 Mar 2009 03:00:28 +0000 (20:00 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 19 Mar 2009 03:01:33 +0000 (20:01 -0700)
Looks like the pathname parsing for POSIX paths got
broken when the code for doing Windows streams parsing got added.
Jeremy.

source3/smbd/reply.c

index a743385f7f51fa7c454f66875ba4fd7a19ba1104..8b560bd8ca64b87dd098e3bc1b274cfd19859fb6 100644 (file)
@@ -72,11 +72,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;