Commit 39e60dc6 authored by Alexandre Julliard's avatar Alexandre Julliard

server: Support opening objects from any root, not only directories.

parent 7ad32cf5
......@@ -551,7 +551,6 @@ static void test_name_limits(void)
status = pNtOpenSymbolicLinkObject( &ret2, GENERIC_ALL, &attr );
ok( status == STATUS_OBJECT_TYPE_MISMATCH, "%u: NtOpenSymbolicLinkObject failed %x\n", str.Length, status );
status = pNtOpenSymbolicLinkObject( &ret2, GENERIC_ALL, &attr3 );
todo_wine
ok( status == STATUS_SUCCESS, "%u: NtOpenSymbolicLinkObject failed %x\n", str.Length, status );
pNtClose( ret2 );
pNtClose( ret );
......
......@@ -578,8 +578,7 @@ obj_handle_t open_object( struct process *process, obj_handle_t parent, unsigned
unsigned int attributes )
{
obj_handle_t handle = 0;
struct directory *root = NULL;
struct object *obj;
struct object *obj, *root = NULL;
if (name->len >= 65534)
{
......@@ -587,9 +586,9 @@ obj_handle_t open_object( struct process *process, obj_handle_t parent, unsigned
return 0;
}
if (parent && !(root = get_directory_obj( process, parent, 0 ))) return 0;
if (parent && !(root = get_handle_obj( process, parent, 0, NULL ))) return 0;
if ((obj = open_object_dir( root, name, attributes, ops )))
if ((obj = open_named_object( root, ops, name, attributes )))
{
handle = alloc_handle( process, obj, access, attributes );
release_object( 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