server/ntdll: Simplistic implementation of NtQueryObject(ObjectBasicInformation).
diff --git a/server/handle.c b/server/handle.c
index f8f007d..f0c58a8 100644
--- a/server/handle.c
+++ b/server/handle.c
@@ -399,9 +399,9 @@
 {
     struct handle_entry *entry;
 
-    if (get_magic_handle( handle )) return ~0U;  /* magic handles have all access rights */
+    if (get_magic_handle( handle )) return ~RESERVED_ALL;  /* magic handles have all access rights */
     if (!(entry = get_handle( process, handle ))) return 0;
-    return entry->access;
+    return entry->access & ~RESERVED_ALL;
 }
 
 /* find the first inherited handle of the given type */
@@ -540,3 +540,14 @@
         release_object( src );
     }
 }
+
+DECL_HANDLER(get_object_info)
+{
+    struct object *obj;
+
+    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;
+    release_object( obj );
+}