Commit aa5c1e87 authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

server: Return STATUS_OBJECT_PATH_INVALID for noname pipe name query.

parent a2ffa8ef
......@@ -2479,7 +2479,7 @@ static void test_empty_name(void)
ok(type_info->TypeName.Buffer && !wcscmp(type_info->TypeName.Buffer, L"File"),
"Got unexpected type %s.\n", debugstr_w(type_info->TypeName.Buffer));
status = pNtQueryObject(hpipe, ObjectNameInformation, name_info, sizeof(buffer), NULL);
todo_wine ok(status == STATUS_OBJECT_PATH_INVALID, "Got unexpected status %#x.\n", status);
ok(status == STATUS_OBJECT_PATH_INVALID, "Got unexpected status %#x.\n", status);
status = pNtCreateNamedPipeFile(&handle, GENERIC_READ | SYNCHRONIZE, &attr,
&io, FILE_SHARE_READ | FILE_SHARE_WRITE, FILE_OPEN, FILE_SYNCHRONOUS_IO_NONALERT,
......
......@@ -105,6 +105,7 @@ struct named_pipe_device_file
static void named_pipe_dump( struct object *obj, int verbose );
static unsigned int named_pipe_map_access( struct object *obj, unsigned int access );
static WCHAR *named_pipe_get_full_name( struct object *obj, data_size_t *ret_len );
static int named_pipe_link_name( struct object *obj, struct object_name *name, struct object *parent );
static struct object *named_pipe_open_file( struct object *obj, unsigned int access,
unsigned int sharing, unsigned int options );
......@@ -124,7 +125,7 @@ static const struct object_ops named_pipe_ops =
named_pipe_map_access, /* map_access */
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
default_get_full_name, /* get_full_name */
named_pipe_get_full_name, /* get_full_name */
no_lookup_name, /* lookup_name */
named_pipe_link_name, /* link_name */
default_unlink_name, /* unlink_name */
......@@ -328,6 +329,15 @@ static unsigned int named_pipe_map_access( struct object *obj, unsigned int acce
return access & ~(GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE | GENERIC_ALL);
}
static WCHAR *named_pipe_get_full_name( struct object *obj, data_size_t *ret_len )
{
WCHAR *ret;
if (!(ret = default_get_full_name( obj, ret_len )))
set_error( STATUS_OBJECT_PATH_INVALID );
return ret;
}
static void pipe_server_dump( struct object *obj, int verbose )
{
struct pipe_server *server = (struct pipe_server *) obj;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment