http://bugs.winehq.org/show_bug.cgi?id=28995
--- Comment #2 from Valentyn Pavliuchenko valentyn.pavliuchenko@gmail.com 2011-11-09 04:05:24 CST --- Some additional explanation:
CreateNamedPipe is not affected by this bug and works fine if such name is passed to it. But CreateFile fails because its name checking should handle different types of objects, not only pipes. The checking itself is done in wine_nt_to_unix_file_name(). Call path is CreateFile->NtCreateFile->FILE_CreateFile->nt_to_unix_file_name_attr->wine_nt_to_unix_file_name.
wine_nt_to_unix_file_name() should return STATUS_BAD_DEVICE_TYPE, which is then returned by nt_to_unix_file_name_attr(). This return status causes FILE_CreateFile to perform an "open_file_object" server request, that opens pipe object.
Previously, because of checking for illegal characters performed by wine_nt_to_unix_file_name(), wine_nt_to_unix_file_name() returned STATUS_OBJECT_NAME_INVALID, that caused error while opening pipe.
This patch modifies wine_nt_to_unix_file_name() to not check pipe name for special characters and doesn't affect any objects except pipes.