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
deae193a
Commit
deae193a
authored
Dec 13, 2009
by
Rob Shearman
Committed by
Alexandre Julliard
Dec 14, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Allow the connection to override the authentication mechanism for a connection type.
parent
a65f7b63
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
136 additions
and
54 deletions
+136
-54
rpc_binding.h
dlls/rpcrt4/rpc_binding.h
+30
-0
rpc_message.c
dlls/rpcrt4/rpc_message.c
+91
-54
rpc_message.h
dlls/rpcrt4/rpc_message.h
+3
-0
rpc_transport.c
dlls/rpcrt4/rpc_transport.c
+12
-0
No files found.
dlls/rpcrt4/rpc_binding.h
View file @
deae193a
...
...
@@ -27,6 +27,12 @@
#include "rpc_defs.h"
enum
secure_packet_direction
{
SECURE_PACKET_SEND
,
SECURE_PACKET_RECEIVE
};
typedef
struct
_RpcAuthInfo
{
LONG
refs
;
...
...
@@ -100,6 +106,9 @@ struct connection_ops {
size_t
(
*
get_top_of_tower
)(
unsigned
char
*
tower_data
,
const
char
*
networkaddr
,
const
char
*
endpoint
);
RPC_STATUS
(
*
parse_top_of_tower
)(
const
unsigned
char
*
tower_data
,
size_t
tower_size
,
char
**
networkaddr
,
char
**
endpoint
);
RPC_STATUS
(
*
receive_fragment
)(
RpcConnection
*
conn
,
RpcPktHdr
**
Header
,
void
**
Payload
);
BOOL
(
*
is_authorized
)(
RpcConnection
*
conn
);
RPC_STATUS
(
*
authorize
)(
RpcConnection
*
conn
,
BOOL
first_time
,
unsigned
char
*
in_buffer
,
unsigned
int
in_len
,
unsigned
char
*
out_buffer
,
unsigned
int
*
out_len
);
RPC_STATUS
(
*
secure_packet
)(
RpcConnection
*
Connection
,
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
);
};
/* don't know what MS's structure looks like */
...
...
@@ -186,6 +195,27 @@ static inline RPC_STATUS rpcrt4_conn_handoff(RpcConnection *old_conn, RpcConnect
return
old_conn
->
ops
->
handoff
(
old_conn
,
new_conn
);
}
static
inline
BOOL
rpcrt4_conn_is_authorized
(
RpcConnection
*
Connection
)
{
return
Connection
->
ops
->
is_authorized
(
Connection
);
}
static
inline
RPC_STATUS
rpcrt4_conn_authorize
(
RpcConnection
*
conn
,
BOOL
first_time
,
unsigned
char
*
in_buffer
,
unsigned
int
in_len
,
unsigned
char
*
out_buffer
,
unsigned
int
*
out_len
)
{
return
conn
->
ops
->
authorize
(
conn
,
first_time
,
in_buffer
,
in_len
,
out_buffer
,
out_len
);
}
static
inline
RPC_STATUS
rpcrt4_conn_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
)
{
return
conn
->
ops
->
secure_packet
(
conn
,
dir
,
hdr
,
hdr_size
,
stub_data
,
stub_data_size
,
auth_hdr
,
auth_value
,
auth_value_size
);
}
/* floors 3 and up */
RPC_STATUS
RpcTransport_GetTopOfTower
(
unsigned
char
*
tower_data
,
size_t
*
tower_size
,
const
char
*
protseq
,
const
char
*
networkaddr
,
const
char
*
endpoint
);
RPC_STATUS
RpcTransport_ParseTopOfTower
(
const
unsigned
char
*
tower_data
,
size_t
tower_size
,
char
**
protseq
,
char
**
networkaddr
,
char
**
endpoint
);
...
...
dlls/rpcrt4/rpc_message.c
View file @
deae193a
This diff is collapsed.
Click to expand it.
dlls/rpcrt4/rpc_message.h
View file @
deae193a
...
...
@@ -50,5 +50,8 @@ RPC_STATUS RPCRT4_ClientConnectionAuth(RpcConnection* conn, BYTE *challenge, ULO
RPC_STATUS
RPCRT4_ServerConnectionAuth
(
RpcConnection
*
conn
,
BOOL
start
,
RpcAuthVerifier
*
auth_data_in
,
ULONG
auth_length_in
,
unsigned
char
**
auth_data_out
,
ULONG
*
auth_length_out
);
RPC_STATUS
RPCRT4_AuthorizeConnection
(
RpcConnection
*
conn
,
BYTE
*
challenge
,
ULONG
count
);
RPC_STATUS
RPCRT4_ServerGetRegisteredAuthInfo
(
USHORT
auth_type
,
CredHandle
*
cred
,
TimeStamp
*
exp
,
ULONG
*
max_token
);
RPC_STATUS
RPCRT4_default_authorize
(
RpcConnection
*
conn
,
BOOL
first_time
,
unsigned
char
*
in_buffer
,
unsigned
int
in_size
,
unsigned
char
*
out_buffer
,
unsigned
int
*
out_size
);
BOOL
RPCRT4_default_is_authorized
(
RpcConnection
*
Connection
);
RPC_STATUS
RPCRT4_default_secure_packet
(
RpcConnection
*
Connection
,
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
);
#endif
dlls/rpcrt4/rpc_transport.c
View file @
deae193a
...
...
@@ -2677,6 +2677,9 @@ static const struct connection_ops conn_protseq_list[] = {
rpcrt4_ncacn_np_get_top_of_tower
,
rpcrt4_ncacn_np_parse_top_of_tower
,
NULL
,
RPCRT4_default_is_authorized
,
RPCRT4_default_authorize
,
RPCRT4_default_secure_packet
,
},
{
"ncalrpc"
,
{
EPM_PROTOCOL_NCALRPC
,
EPM_PROTOCOL_PIPE
},
...
...
@@ -2691,6 +2694,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
,
},
{
"ncacn_ip_tcp"
,
{
EPM_PROTOCOL_NCACN
,
EPM_PROTOCOL_TCP
},
...
...
@@ -2705,6 +2711,9 @@ static const struct connection_ops conn_protseq_list[] = {
rpcrt4_ncacn_ip_tcp_get_top_of_tower
,
rpcrt4_ncacn_ip_tcp_parse_top_of_tower
,
NULL
,
RPCRT4_default_is_authorized
,
RPCRT4_default_authorize
,
RPCRT4_default_secure_packet
,
},
{
"ncacn_http"
,
{
EPM_PROTOCOL_NCACN
,
EPM_PROTOCOL_HTTP
},
...
...
@@ -2719,6 +2728,9 @@ static const struct connection_ops conn_protseq_list[] = {
rpcrt4_ncacn_http_get_top_of_tower
,
rpcrt4_ncacn_http_parse_top_of_tower
,
rpcrt4_ncacn_http_receive_fragment
,
RPCRT4_default_is_authorized
,
RPCRT4_default_authorize
,
RPCRT4_default_secure_packet
,
},
};
...
...
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