https://bugs.winehq.org/show_bug.cgi?id=38766
Bug ID: 38766 Summary: RpcBindingServerFromClient is unimplemented, needed to determine client Computer Name/IP Address Product: Wine Version: unspecified Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: rpc Assignee: wine-bugs@winehq.org Reporter: mail@colinfinck.de Distribution: ---
Wine's rpcrt4.dll currently doesn't implement the RpcBindingServerFromClient function. The following code is the only way I know to determine the Computer Name/IP Address of the client doing the RPC request:
==================================================================== RpcBindingServerFromClient(NULL, &hServerBinding); RpcBindingToStringBindingW(hServerBinding, &pwszBinding); RpcStringBindingParseW(pwszBinding, NULL, NULL, &pwszComputerName, NULL, NULL); ====================================================================
I either need this function to be implemented or an alternative way to determine the client's Computer Name/IP Address.
https://bugs.winehq.org/show_bug.cgi?id=38766
super_man@post.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |super_man@post.com
--- Comment #1 from super_man@post.com --- Do you have a test application for this?
https://bugs.winehq.org/show_bug.cgi?id=38766
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch CC| |austinenglish@gmail.com
--- Comment #2 from Austin English austinenglish@gmail.com --- https://source.winehq.org/patches/data/117809
https://bugs.winehq.org/show_bug.cgi?id=38766
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |STAGED CC| |erich.e.hoover@wine-staging | |.com, michael@fds-team.de, | |sebastian@fds-team.de Ever confirmed|0 |1 Staged patchset| |https://github.com/wine-com | |pholio/wine-staging/tree/ma | |ster/patches/rpcrt4-RpcBind | |ingServerFromClient
https://bugs.winehq.org/show_bug.cgi?id=38766
--- Comment #3 from Austin English austinenglish@gmail.com --- A stub was added here: https://source.winehq.org/git/wine.git/commitdiff/591f6322187c480efe9ddfc165...
https://bugs.winehq.org/show_bug.cgi?id=38766
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords|patch | Status|STAGED |NEW
--- Comment #4 from Nikolay Sivov bunglehead@gmail.com --- Stub is obviously not what Colin was asking for, the idea as far as I remember was to get client info from printing server code in ReactOS.
https://bugs.winehq.org/show_bug.cgi?id=38766
--- Comment #5 from Austin English austinenglish@gmail.com --- (In reply to Nikolay Sivov from comment #4)
Stub is obviously not what Colin was asking for, the idea as far as I remember was to get client info from printing server code in ReactOS.
That's why I didn't resolve the bug, comment was an FYI (i.e., it would prevent a crash, but not fix the underlying issue).
https://bugs.winehq.org/show_bug.cgi?id=38766
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |1.9.1 Assignee|wine-bugs@winehq.org |bunglehead@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=38766
--- Comment #6 from Colin Finck mail@colinfinck.de --- Patches for the prototype and a test have been submitted:
https://www.winehq.org/pipermail/wine-patches/2016-August/153678.html https://www.winehq.org/pipermail/wine-patches/2016-August/153679.html
https://bugs.winehq.org/show_bug.cgi?id=38766
--- Comment #7 from Colin Finck mail@colinfinck.de --- Made some improvements to my previous patches:
https://www.winehq.org/pipermail/wine-patches/2016-August/153701.html https://www.winehq.org/pipermail/wine-patches/2016-August/153702.html
Even though rpcrt4:server doesn't fully pass on all OS in the Testbot, this isn't related to my changes.
https://bugs.winehq.org/show_bug.cgi?id=38766
Christoph von Wittich Christoph@ApiViewer.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |Christoph@ApiViewer.de
--- Comment #8 from Christoph von Wittich Christoph@ApiViewer.de --- No idea if this is the right approach. I wasn't able to test it yet.
RPCRTAPI RPC_STATUS RPC_ENTRY RpcBindingServerFromClient( RPC_BINDING_HANDLE ClientBinding, RPC_BINDING_HANDLE *ServerBinding ) { RpcBinding *bind = ClientBinding; RpcBinding *NewBinding;
if (!bind) bind = I_RpcGetCurrentCallHandle();
if (!bind->server) return RPC_S_INVALID_BINDING;
RPCRT4_AllocBinding(&NewBinding, TRUE);
NewBinding->NetworkAddr = RPCRT4_strndupA(bind->FromConn->server_binding->NetworkAddr, -1); NewBinding->Endpoint = RPCRT4_strndupA(bind->FromConn->server_binding->Endpoint, -1);
*ServerBinding = NewBinding;
return RPC_S_OK; }
https://bugs.winehq.org/show_bug.cgi?id=38766
--- Comment #9 from Christoph von Wittich Christoph@ApiViewer.de --- [17:52] aeikum Christoph_vW: with that function implemented, i get three instances of [17:53] aeikum server.c:750: Test succeeded inside todo block: expected RPC_S_OK got 0 [17:53] aeikum server.c:751: Test succeeded inside todo block: binding is NULL [17:53] aeikum so that seems good [17:53] aeikum the tests in the following if-block are executed and succeed aeikum (they're not very thorough though, just checking for non-NULL)
https://bugs.winehq.org/show_bug.cgi?id=38766
--- Comment #10 from Colin Finck mail@colinfinck.de --- I took over Christoph's code and implemented the missing features. RpcBindingServerFromClient works for my use-case now.
Patch is at https://www.winehq.org/pipermail/wine-patches/2016-October/154971.html
https://bugs.winehq.org/show_bug.cgi?id=38766
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|bunglehead@gmail.com |wine-bugs@winehq.org
https://bugs.winehq.org/show_bug.cgi?id=38766
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED Fixed by SHA1| |01290cdc1f79e2ad53ef02acc10 | |9f132521e3f66
--- Comment #11 from Nikolay Sivov bunglehead@gmail.com --- Fixed with 01290cdc1f79e2ad53ef02acc109f132521e3f66.
https://bugs.winehq.org/show_bug.cgi?id=38766
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #12 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 2.0-rc4.