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

Alexandre Julliard julliard at wine.codeweavers.com
Tue Feb 9 10:46:48 CST 2016


Module: wine
Branch: master
Commit: 39e60dc68003813c020c9a29d4e69d2f7a809e52
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=39e60dc68003813c020c9a29d4e69d2f7a809e52

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Feb  9 20:18:20 2016 +0900

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

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntdll/tests/om.c | 1 -
 server/handle.c       | 7 +++----
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c
index 3d0487c..9d0f501 100644
--- a/dlls/ntdll/tests/om.c
+++ b/dlls/ntdll/tests/om.c
@@ -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 );
diff --git a/server/handle.c b/server/handle.c
index f440f9f..15e5670 100644
--- a/server/handle.c
+++ b/server/handle.c
@@ -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 );




More information about the wine-cvs mailing list