server: Don't enforce mailslots path format in ntdll, only in the server.
This commit is contained in:
parent
50c4800405
commit
928d28f688
|
@ -2187,8 +2187,6 @@ NTSTATUS WINAPI NtCreateMailslotFile(PHANDLE pHandle, ULONG DesiredAccess,
|
||||||
PLARGE_INTEGER TimeOut)
|
PLARGE_INTEGER TimeOut)
|
||||||
{
|
{
|
||||||
LARGE_INTEGER timeout;
|
LARGE_INTEGER timeout;
|
||||||
static const WCHAR leadin[] = {
|
|
||||||
'\\','?','?','\\','M','A','I','L','S','L','O','T','\\'};
|
|
||||||
NTSTATUS ret;
|
NTSTATUS ret;
|
||||||
|
|
||||||
TRACE("%p %08x %p %p %08x %08x %08x %p\n",
|
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);
|
CreateOptions, MailslotQuota, MaxMessageSize, TimeOut);
|
||||||
|
|
||||||
if (!pHandle) return STATUS_ACCESS_VIOLATION;
|
if (!pHandle) return STATUS_ACCESS_VIOLATION;
|
||||||
|
|
||||||
if (!attr) return STATUS_INVALID_PARAMETER;
|
if (!attr) return STATUS_INVALID_PARAMETER;
|
||||||
|
|
||||||
if (!attr->ObjectName) return STATUS_OBJECT_PATH_SYNTAX_BAD;
|
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
|
* For a NULL TimeOut pointer set the default timeout value
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -345,7 +345,11 @@ static struct mailslot *create_mailslot( struct directory *root,
|
||||||
|
|
||||||
if (!name || !name->len) return alloc_object( &mailslot_ops );
|
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)
|
if (!new_name.len)
|
||||||
{
|
{
|
||||||
|
@ -362,7 +366,7 @@ static struct mailslot *create_mailslot( struct directory *root,
|
||||||
|
|
||||||
if (obj->ops != &mailslot_device_ops)
|
if (obj->ops != &mailslot_device_ops)
|
||||||
{
|
{
|
||||||
set_error( STATUS_OBJECT_TYPE_MISMATCH );
|
set_error( STATUS_OBJECT_NAME_INVALID );
|
||||||
release_object( obj );
|
release_object( obj );
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue