Module: wine
Branch: master
Commit: 95026f9d6b6092158d6c22ce21dc7fd651117fc0
URL: http://source.winehq.org/git/wine.git/?a=commit;h=95026f9d6b6092158d6c22ce2…
Author: Rob Shearman <robertshearman(a)gmail.com>
Date: Sun Dec 13 21:35:54 2009 +0000
rpcrt4: Override authentication functions for ncalrpc protocol to do nothing.
The protocol is local only and therefore encryption/decryption isn't
necessary to keep the data private, and methods are built into the
protocol for impersonating the user of the calling thread.
---
dlls/rpcrt4/rpc_transport.c | 35 ++++++++++++++++++++++++++++++++---
1 files changed, 32 insertions(+), 3 deletions(-)
diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c
index e7bda8c..f8c8d1f 100644
--- a/dlls/rpcrt4/rpc_transport.c
+++ b/dlls/rpcrt4/rpc_transport.c
@@ -769,6 +769,35 @@ static RPC_STATUS rpcrt4_ncalrpc_parse_top_of_tower(const unsigned char *tower_d
return RPC_S_OK;
}
+static BOOL rpcrt4_ncalrpc_is_authorized(RpcConnection *conn)
+{
+ return FALSE;
+}
+
+static RPC_STATUS rpcrt4_ncalrpc_authorize(RpcConnection *conn, BOOL first_time,
+ unsigned char *in_buffer,
+ unsigned int in_size,
+ unsigned char *out_buffer,
+ unsigned int *out_size)
+{
+ /* since this protocol is local to the machine there is no need to
+ * authenticate the caller */
+ *out_size = 0;
+ return RPC_S_OK;
+}
+
+static RPC_STATUS rpcrt4_ncalrpc_secure_packet(RpcConnection *conn,
+ enum secure_packet_direction dir,
+ RpcPktHdr *hdr, unsigned int hdr_size,
+ unsigned char *stub_data, unsigned int stub_data_size,
+ RpcAuthVerifier *auth_hdr,
+ unsigned char *auth_value, unsigned int auth_value_size)
+{
+ /* since this protocol is local to the machine there is no need to secure
+ * the packet */
+ return RPC_S_OK;
+}
+
/**** ncacn_ip_tcp support ****/
static size_t rpcrt4_ip_tcp_get_top_of_tower(unsigned char *tower_data,
@@ -2694,9 +2723,9 @@ static const struct connection_ops conn_protseq_list[] = {
rpcrt4_ncalrpc_get_top_of_tower,
rpcrt4_ncalrpc_parse_top_of_tower,
NULL,
- RPCRT4_default_is_authorized,
- RPCRT4_default_authorize,
- RPCRT4_default_secure_packet,
+ rpcrt4_ncalrpc_is_authorized,
+ rpcrt4_ncalrpc_authorize,
+ rpcrt4_ncalrpc_secure_packet,
},
{ "ncacn_ip_tcp",
{ EPM_PROTOCOL_NCACN, EPM_PROTOCOL_TCP },