server: Don't enforce named pipes path format in ntdll, only in the server.
This commit is contained in:
parent
846dc62355
commit
50c4800405
|
@ -2085,17 +2085,12 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( PHANDLE handle, ULONG access,
|
|||
PLARGE_INTEGER timeout)
|
||||
{
|
||||
NTSTATUS status;
|
||||
static const WCHAR leadin[] = {'\\','?','?','\\','P','I','P','E','\\'};
|
||||
|
||||
TRACE("(%p %x %s %p %x %d %x %d %d %d %d %d %d %p)\n",
|
||||
handle, access, debugstr_w(attr->ObjectName->Buffer), iosb, sharing, dispo,
|
||||
options, pipe_type, read_mode, completion_mode, max_inst, inbound_quota,
|
||||
outbound_quota, timeout);
|
||||
|
||||
if (attr->ObjectName->Length < sizeof(leadin) ||
|
||||
strncmpiW( attr->ObjectName->Buffer,
|
||||
leadin, sizeof(leadin)/sizeof(leadin[0]) ))
|
||||
return STATUS_OBJECT_NAME_INVALID;
|
||||
/* assume we only get relative timeout, and storable in a DWORD as ms */
|
||||
if (timeout->QuadPart > 0 || (timeout->QuadPart / -10000) >> 32)
|
||||
FIXME("Wrong time %s\n", wine_dbgstr_longlong(timeout->QuadPart));
|
||||
|
|
|
@ -585,7 +585,11 @@ static struct named_pipe *create_named_pipe( struct directory *root, const struc
|
|||
|
||||
if (!name || !name->len) return alloc_object( &named_pipe_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 (attr & OBJ_OPENIF && obj->ops == &named_pipe_ops)
|
||||
|
@ -603,7 +607,7 @@ static struct named_pipe *create_named_pipe( struct directory *root, const struc
|
|||
}
|
||||
|
||||
if (obj->ops != &named_pipe_device_ops)
|
||||
set_error( STATUS_OBJECT_TYPE_MISMATCH );
|
||||
set_error( STATUS_OBJECT_NAME_INVALID );
|
||||
else
|
||||
{
|
||||
struct named_pipe_device *dev = (struct named_pipe_device *)obj;
|
||||
|
|
Loading…
Reference in New Issue