Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
a0301f7d
Commit
a0301f7d
authored
May 23, 2022
by
Zhiyi Zhang
Committed by
Alexandre Julliard
Jul 18, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Implement I_RpcBindingInqLocalClientPID().
Signed-off-by:
Zhiyi Zhang
<
zzhang@codeweavers.com
>
parent
056dbb04
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
9 deletions
+26
-9
rpc_binding.c
dlls/rpcrt4/rpc_binding.c
+14
-2
rpc_binding.h
dlls/rpcrt4/rpc_binding.h
+1
-0
rpc_transport.c
dlls/rpcrt4/rpc_transport.c
+11
-0
server.c
dlls/rpcrt4/tests/server.c
+0
-7
No files found.
dlls/rpcrt4/rpc_binding.c
View file @
a0301f7d
...
...
@@ -1981,6 +1981,18 @@ RPC_STATUS WINAPI RpcBindingSetOption(RPC_BINDING_HANDLE BindingHandle, ULONG Op
RPC_STATUS
WINAPI
I_RpcBindingInqLocalClientPID
(
RPC_BINDING_HANDLE
ClientBinding
,
ULONG
*
ClientPID
)
{
FIXME
(
"%p %p: stub
\n
"
,
ClientBinding
,
ClientPID
);
return
RPC_S_INVALID_BINDING
;
RpcConnection
*
connection
=
NULL
;
RpcBinding
*
binding
;
TRACE
(
"%p %p
\n
"
,
ClientBinding
,
ClientPID
);
binding
=
ClientBinding
?
ClientBinding
:
RPCRT4_GetThreadCurrentCallHandle
();
if
(
!
binding
)
return
RPC_S_NO_CALL_ACTIVE
;
connection
=
binding
->
FromConn
;
if
(
!
connection
->
ops
->
inquire_client_pid
)
return
RPC_S_INVALID_BINDING
;
return
connection
->
ops
->
inquire_client_pid
(
connection
,
ClientPID
);
}
dlls/rpcrt4/rpc_binding.h
View file @
a0301f7d
...
...
@@ -118,6 +118,7 @@ struct connection_ops {
RPC_STATUS
(
*
impersonate_client
)(
RpcConnection
*
conn
);
RPC_STATUS
(
*
revert_to_self
)(
RpcConnection
*
conn
);
RPC_STATUS
(
*
inquire_auth_client
)(
RpcConnection
*
,
RPC_AUTHZ_HANDLE
*
,
RPC_WSTR
*
,
ULONG
*
,
ULONG
*
,
ULONG
*
,
ULONG
);
RPC_STATUS
(
*
inquire_client_pid
)(
RpcConnection
*
conn
,
ULONG
*
pid
);
};
/* don't know what MS's structure looks like */
...
...
dlls/rpcrt4/rpc_transport.c
View file @
a0301f7d
...
...
@@ -893,6 +893,13 @@ static RPC_STATUS rpcrt4_ncalrpc_inquire_auth_client(
return
RPC_S_OK
;
}
static
RPC_STATUS
rpcrt4_ncalrpc_inquire_client_pid
(
RpcConnection
*
conn
,
ULONG
*
pid
)
{
RpcConnection_np
*
connection
=
(
RpcConnection_np
*
)
conn
;
return
GetNamedPipeClientProcessId
(
connection
->
pipe
,
pid
)
?
RPC_S_OK
:
RPC_S_INVALID_BINDING
;
}
/**** ncacn_ip_tcp support ****/
static
size_t
rpcrt4_ip_tcp_get_top_of_tower
(
unsigned
char
*
tower_data
,
...
...
@@ -3134,6 +3141,7 @@ static const struct connection_ops conn_protseq_list[] = {
rpcrt4_conn_np_impersonate_client
,
rpcrt4_conn_np_revert_to_self
,
RPCRT4_default_inquire_auth_client
,
NULL
},
{
"ncalrpc"
,
{
EPM_PROTOCOL_NCALRPC
,
EPM_PROTOCOL_PIPE
},
...
...
@@ -3156,6 +3164,7 @@ static const struct connection_ops conn_protseq_list[] = {
rpcrt4_conn_np_impersonate_client
,
rpcrt4_conn_np_revert_to_self
,
rpcrt4_ncalrpc_inquire_auth_client
,
rpcrt4_ncalrpc_inquire_client_pid
},
{
"ncacn_ip_tcp"
,
{
EPM_PROTOCOL_NCACN
,
EPM_PROTOCOL_TCP
},
...
...
@@ -3178,6 +3187,7 @@ static const struct connection_ops conn_protseq_list[] = {
RPCRT4_default_impersonate_client
,
RPCRT4_default_revert_to_self
,
RPCRT4_default_inquire_auth_client
,
NULL
},
{
"ncacn_http"
,
{
EPM_PROTOCOL_NCACN
,
EPM_PROTOCOL_HTTP
},
...
...
@@ -3200,6 +3210,7 @@ static const struct connection_ops conn_protseq_list[] = {
RPCRT4_default_impersonate_client
,
RPCRT4_default_revert_to_self
,
RPCRT4_default_inquire_auth_client
,
NULL
},
};
...
...
dlls/rpcrt4/tests/server.c
View file @
a0301f7d
...
...
@@ -1140,16 +1140,13 @@ static DWORD CALLBACK test_I_RpcBindingInqLocalClientPID_thread_func(void *args)
winetest_push_context
(
"%s"
,
client_test_name
);
status
=
I_RpcBindingInqLocalClientPID
(
NULL
,
&
pid
);
todo_wine
ok
(
status
==
RPC_S_NO_CALL_ACTIVE
,
"Got unexpected %ld.
\n
"
,
status
);
/* Other protocol sequences throw exceptions */
if
(
params
->
protseq
==
RPC_PROTSEQ_LRPC
)
{
status
=
I_RpcBindingInqLocalClientPID
(
params
->
binding
,
&
pid
);
todo_wine
ok
(
status
==
RPC_S_OK
,
"Got unexpected %ld.
\n
"
,
status
);
todo_wine
ok
(
pid
==
client_info
.
dwProcessId
,
"Got unexpected pid.
\n
"
);
}
...
...
@@ -1179,9 +1176,7 @@ void __cdecl s_test_I_RpcBindingInqLocalClientPID(unsigned int protseq, RPC_BIND
status
=
I_RpcBindingInqLocalClientPID
(
NULL
,
&
pid
);
if
(
protseq
==
RPC_PROTSEQ_LRPC
)
{
todo_wine
ok
(
status
==
RPC_S_OK
,
"Got unexpected %ld.
\n
"
,
status
);
todo_wine
ok
(
pid
==
client_info
.
dwProcessId
,
"Got unexpected pid.
\n
"
);
}
else
...
...
@@ -1192,9 +1187,7 @@ void __cdecl s_test_I_RpcBindingInqLocalClientPID(unsigned int protseq, RPC_BIND
if
(
protseq
==
RPC_PROTSEQ_LRPC
)
/* Other protocol sequences throw exceptions */
{
status
=
I_RpcBindingInqLocalClientPID
(
binding
,
&
pid
);
todo_wine
ok
(
status
==
RPC_S_OK
,
"Got unexpected %ld.
\n
"
,
status
);
todo_wine
ok
(
pid
==
client_info
.
dwProcessId
,
"Got unexpected pid.
\n
"
);
}
...
...
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