A deleted key returns STATUS_KEY_DELETED when ObjectNameInformation is
requested, but succeeds when ObjectBasicInformation is requested.
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com>
---
dlls/ntdll/unix/file.c | 2 +-
server/handle.c | 11 ++++++++++-
server/protocol.def | 7 +++++++
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index 1a57a112a59..21bcb215385 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -6772,7 +6772,7 @@ NTSTATUS WINAPI NtQueryObject( HANDLE handle, OBJECT_INFORMATION_CLASS info_clas
/* not a file, treat as a generic object */
- SERVER_START_REQ( get_object_info )
+ SERVER_START_REQ( get_object_name )
{
req->handle = wine_server_obj_handle( handle );
if (len > sizeof(*p)) wine_server_set_reply( req, p + 1, len - sizeof(*p) );
diff --git a/server/handle.c b/server/handle.c
index d86f0960ccf..6efd82f2ff9 100644
--- a/server/handle.c
+++ b/server/handle.c
@@ -686,13 +686,22 @@ DECL_HANDLER(dup_handle)
DECL_HANDLER(get_object_info)
{
struct object *obj;
- WCHAR *name;
if (!(obj = get_handle_obj( current->process, req->handle, 0, NULL ))) return;
reply->access = get_handle_access( current->process, req->handle );
reply->ref_count = obj->refcount;
reply->handle_count = obj->handle_count;
+ release_object( obj );
+}
+
+DECL_HANDLER(get_object_name)
+{
+ struct object *obj;
+ WCHAR *name;
+
+ if (!(obj = get_handle_obj( current->process, req->handle, 0, NULL ))) return;
+
if ((name = obj->ops->get_full_name( obj, &reply->total )))
set_reply_data_ptr( name, min( reply->total, get_reply_max_size() ));
release_object( obj );
diff --git a/server/protocol.def b/server/protocol.def
index 762be1fa7c0..59ed5632503 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -3299,6 +3299,13 @@ struct handle_info
unsigned int access; /* granted access mask */
unsigned int ref_count; /* object ref count */
unsigned int handle_count; /* object handle count */
+@END
+
+
+/* Query the full name of an object */
+@REQ(get_object_name)
+ obj_handle_t handle; /* handle to the object */
+@REPLY
data_size_t total; /* total needed size for name */
VARARG(name,unicode_str); /* object name */
@END
--
2.30.2