Alexandre Julliard : server: Don't enforce mailslots path format in
ntdll, only in the server.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Mar 22 10:11:09 CDT 2007
Module: wine
Branch: master
Commit: 928d28f688d5656fc366dd01e5d9403255ebb7a9
URL: http://source.winehq.org/git/wine.git/?a=commit;h=928d28f688d5656fc366dd01e5d9403255ebb7a9
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Mar 22 14:41:37 2007 +0100
server: Don't enforce mailslots path format in ntdll, only in the server.
---
dlls/ntdll/file.c | 11 -----------
server/mailslot.c | 8 ++++++--
2 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index eb11c69..16eb9b7 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -2187,8 +2187,6 @@ NTSTATUS WINAPI NtCreateMailslotFile(PHANDLE pHandle, ULONG DesiredAccess,
PLARGE_INTEGER TimeOut)
{
LARGE_INTEGER timeout;
- static const WCHAR leadin[] = {
- '\\','?','?','\\','M','A','I','L','S','L','O','T','\\'};
NTSTATUS ret;
TRACE("%p %08x %p %p %08x %08x %08x %p\n",
@@ -2196,18 +2194,9 @@ NTSTATUS WINAPI NtCreateMailslotFile(PHANDLE pHandle, ULONG DesiredAccess,
CreateOptions, MailslotQuota, MaxMessageSize, TimeOut);
if (!pHandle) return STATUS_ACCESS_VIOLATION;
-
if (!attr) return STATUS_INVALID_PARAMETER;
-
if (!attr->ObjectName) return STATUS_OBJECT_PATH_SYNTAX_BAD;
- if (attr->ObjectName->Length < sizeof(leadin) ||
- strncmpiW( attr->ObjectName->Buffer,
- leadin, sizeof(leadin)/sizeof(leadin[0]) ))
- {
- return STATUS_OBJECT_NAME_INVALID;
- }
-
/*
* For a NULL TimeOut pointer set the default timeout value
*/
diff --git a/server/mailslot.c b/server/mailslot.c
index 9391e13..28c67a8 100644
--- a/server/mailslot.c
+++ b/server/mailslot.c
@@ -345,7 +345,11 @@ static struct mailslot *create_mailslot( struct directory *root,
if (!name || !name->len) return alloc_object( &mailslot_ops );
- if (!(obj = find_object_dir( root, name, attr, &new_name ))) return NULL;
+ if (!(obj = find_object_dir( root, name, attr, &new_name )))
+ {
+ set_error( STATUS_OBJECT_NAME_INVALID );
+ return NULL;
+ }
if (!new_name.len)
{
@@ -362,7 +366,7 @@ static struct mailslot *create_mailslot( struct directory *root,
if (obj->ops != &mailslot_device_ops)
{
- set_error( STATUS_OBJECT_TYPE_MISMATCH );
+ set_error( STATUS_OBJECT_NAME_INVALID );
release_object( obj );
return NULL;
}
More information about the wine-cvs
mailing list