Fix bug #6196 - Unable to serve files with colons to Linux CIFS/VFS client
authorJeremy Allison <jra@samba.org>
Thu, 19 Mar 2009 02:59:04 +0000 (19:59 -0700)
committerMichael Adam <obnox@samba.org>
Thu, 19 Mar 2009 17:03:51 +0000 (18:03 +0100)
Looks like the pathname parsing for POSIX paths got
broken when the code for doing Windows streams parsing got added.
Jeremy.

source/smbd/reply.c

index 499b67fb9f8b9c1ff7945ed15d211caed13d8450..46653cd9c5ebd3e08608a7337c6924353b78ad93 100644 (file)
@@ -76,11 +76,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;