Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
bae75024
Commit
bae75024
authored
Jan 24, 2007
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Jan 25, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server/ntdll: Simplistic implementation of NtQueryObject(ObjectBasicInformation).
parent
fad936c7
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
78 additions
and
3 deletions
+78
-3
om.c
dlls/ntdll/om.c
+22
-0
server_protocol.h
include/wine/server_protocol.h
+18
-1
handle.c
server/handle.c
+13
-2
protocol.def
server/protocol.def
+9
-0
request.h
server/request.h
+2
-0
trace.c
server/trace.c
+14
-0
No files found.
dlls/ntdll/om.c
View file @
bae75024
...
...
@@ -63,6 +63,28 @@ NTSTATUS WINAPI NtQueryObject(IN HANDLE handle,
switch
(
info_class
)
{
case
ObjectBasicInformation
:
{
POBJECT_BASIC_INFORMATION
p
=
(
POBJECT_BASIC_INFORMATION
)
ptr
;
if
(
len
<
sizeof
(
*
p
))
return
STATUS_INVALID_BUFFER_SIZE
;
SERVER_START_REQ
(
get_object_info
)
{
req
->
handle
=
handle
;
status
=
wine_server_call
(
req
);
if
(
status
==
STATUS_SUCCESS
)
{
memset
(
p
,
0
,
sizeof
(
*
p
)
);
p
->
GrantedAccess
=
reply
->
access
;
p
->
PointerCount
=
reply
->
ref_count
;
p
->
HandleCount
=
1
;
/* at least one */
if
(
used_len
)
*
used_len
=
sizeof
(
*
p
);
}
}
SERVER_END_REQ
;
}
break
;
case
ObjectDataInformation
:
{
OBJECT_DATA_INFORMATION
*
p
=
(
OBJECT_DATA_INFORMATION
*
)
ptr
;
...
...
include/wine/server_protocol.h
View file @
bae75024
...
...
@@ -3967,6 +3967,20 @@ struct query_symlink_reply
};
struct
get_object_info_request
{
struct
request_header
__header
;
obj_handle_t
handle
;
};
struct
get_object_info_reply
{
struct
reply_header
__header
;
unsigned
int
access
;
unsigned
int
ref_count
;
};
enum
request
{
REQ_new_process
,
...
...
@@ -4183,6 +4197,7 @@ enum request
REQ_create_symlink
,
REQ_open_symlink
,
REQ_query_symlink
,
REQ_get_object_info
,
REQ_NB_REQUESTS
};
...
...
@@ -4404,6 +4419,7 @@ union generic_request
struct
create_symlink_request
create_symlink_request
;
struct
open_symlink_request
open_symlink_request
;
struct
query_symlink_request
query_symlink_request
;
struct
get_object_info_request
get_object_info_request
;
};
union
generic_reply
{
...
...
@@ -4623,8 +4639,9 @@ union generic_reply
struct
create_symlink_reply
create_symlink_reply
;
struct
open_symlink_reply
open_symlink_reply
;
struct
query_symlink_reply
query_symlink_reply
;
struct
get_object_info_reply
get_object_info_reply
;
};
#define SERVER_PROTOCOL_VERSION 27
4
#define SERVER_PROTOCOL_VERSION 27
5
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/handle.c
View file @
bae75024
...
...
@@ -399,9 +399,9 @@ unsigned int get_handle_access( struct process *process, obj_handle_t handle )
{
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 @@ DECL_HANDLER(dup_handle)
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
);
}
server/protocol.def
View file @
bae75024
...
...
@@ -2848,3 +2848,12 @@ enum message_type
@REPLY
VARARG(target_name,unicode_str); /* target name */
@END
/* Query basic object information */
@REQ(get_object_info)
obj_handle_t handle; /* handle to the object */
@REPLY
unsigned int access; /* granted access mask */
unsigned int ref_count; /* object ref count */
@END
server/request.h
View file @
bae75024
...
...
@@ -324,6 +324,7 @@ DECL_HANDLER(open_directory);
DECL_HANDLER
(
create_symlink
);
DECL_HANDLER
(
open_symlink
);
DECL_HANDLER
(
query_symlink
);
DECL_HANDLER
(
get_object_info
);
#ifdef WANT_REQUEST_HANDLERS
...
...
@@ -544,6 +545,7 @@ static const req_handler req_handlers[REQ_NB_REQUESTS] =
(
req_handler
)
req_create_symlink
,
(
req_handler
)
req_open_symlink
,
(
req_handler
)
req_query_symlink
,
(
req_handler
)
req_get_object_info
,
};
#endif
/* WANT_REQUEST_HANDLERS */
...
...
server/trace.c
View file @
bae75024
...
...
@@ -3424,6 +3424,17 @@ static void dump_query_symlink_reply( const struct query_symlink_reply *req )
dump_varargs_unicode_str
(
cur_size
);
}
static
void
dump_get_object_info_request
(
const
struct
get_object_info_request
*
req
)
{
fprintf
(
stderr
,
" handle=%p"
,
req
->
handle
);
}
static
void
dump_get_object_info_reply
(
const
struct
get_object_info_reply
*
req
)
{
fprintf
(
stderr
,
" access=%08x,"
,
req
->
access
);
fprintf
(
stderr
,
" ref_count=%08x"
,
req
->
ref_count
);
}
static
const
dump_func
req_dumpers
[
REQ_NB_REQUESTS
]
=
{
(
dump_func
)
dump_new_process_request
,
(
dump_func
)
dump_get_new_process_info_request
,
...
...
@@ -3639,6 +3650,7 @@ static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
(
dump_func
)
dump_create_symlink_request
,
(
dump_func
)
dump_open_symlink_request
,
(
dump_func
)
dump_query_symlink_request
,
(
dump_func
)
dump_get_object_info_request
,
};
static
const
dump_func
reply_dumpers
[
REQ_NB_REQUESTS
]
=
{
...
...
@@ -3856,6 +3868,7 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
(
dump_func
)
dump_create_symlink_reply
,
(
dump_func
)
dump_open_symlink_reply
,
(
dump_func
)
dump_query_symlink_reply
,
(
dump_func
)
dump_get_object_info_reply
,
};
static
const
char
*
const
req_names
[
REQ_NB_REQUESTS
]
=
{
...
...
@@ -4073,6 +4086,7 @@ static const char * const req_names[REQ_NB_REQUESTS] = {
"create_symlink"
,
"open_symlink"
,
"query_symlink"
,
"get_object_info"
,
};
static
const
struct
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment