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
3dbf356f
Commit
3dbf356f
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 authentication details of the client to be transport-specific.
parent
d918587f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
18 deletions
+52
-18
rpc_binding.c
dlls/rpcrt4/rpc_binding.c
+4
-18
rpc_binding.h
dlls/rpcrt4/rpc_binding.h
+8
-0
rpc_message.c
dlls/rpcrt4/rpc_message.c
+35
-0
rpc_message.h
dlls/rpcrt4/rpc_message.h
+1
-0
rpc_transport.c
dlls/rpcrt4/rpc_transport.c
+4
-0
No files found.
dlls/rpcrt4/rpc_binding.c
View file @
3dbf356f
...
...
@@ -1614,25 +1614,11 @@ RpcBindingInqAuthClientExW( RPC_BINDING_HANDLE ClientBinding, RPC_AUTHZ_HANDLE *
TRACE
(
"%p %p %p %p %p %p 0x%x
\n
"
,
ClientBinding
,
Privs
,
ServerPrincName
,
AuthnLevel
,
AuthnSvc
,
AuthzSvc
,
Flags
);
if
(
!
bind
->
AuthInfo
)
return
RPC_S_BINDING_HAS_NO_AUTH
;
if
(
Privs
)
*
Privs
=
(
RPC_AUTHZ_HANDLE
)
bind
->
AuthInfo
->
identity
;
if
(
ServerPrincName
)
{
*
ServerPrincName
=
RPCRT4_strdupW
(
bind
->
AuthInfo
->
server_principal_name
);
if
(
!*
ServerPrincName
)
return
ERROR_OUTOFMEMORY
;
}
if
(
AuthnLevel
)
*
AuthnLevel
=
bind
->
AuthInfo
->
AuthnLevel
;
if
(
AuthnSvc
)
*
AuthnSvc
=
bind
->
AuthInfo
->
AuthnSvc
;
if
(
AuthzSvc
)
{
FIXME
(
"authorization service not implemented
\n
"
);
*
AuthzSvc
=
RPC_C_AUTHZ_NONE
;
}
if
(
Flags
)
FIXME
(
"flags 0x%x not implemented
\n
"
,
Flags
);
if
(
!
bind
->
FromConn
)
return
RPC_S_INVALID_BINDING
;
return
RPC_S_OK
;
return
rpcrt4_conn_inquire_auth_client
(
bind
->
FromConn
,
Privs
,
ServerPrincName
,
AuthnLevel
,
AuthnSvc
,
AuthzSvc
,
Flags
);
}
/***********************************************************************
...
...
dlls/rpcrt4/rpc_binding.h
View file @
3dbf356f
...
...
@@ -111,6 +111,7 @@ struct connection_ops {
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
);
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
);
};
/* don't know what MS's structure looks like */
...
...
@@ -230,6 +231,13 @@ static inline RPC_STATUS rpcrt4_conn_revert_to_self(
return
conn
->
ops
->
revert_to_self
(
conn
);
}
static
inline
RPC_STATUS
rpcrt4_conn_inquire_auth_client
(
RpcConnection
*
conn
,
RPC_AUTHZ_HANDLE
*
privs
,
RPC_WSTR
*
server_princ_name
,
ULONG
*
authn_level
,
ULONG
*
authn_svc
,
ULONG
*
authz_svc
,
ULONG
flags
)
{
return
conn
->
ops
->
inquire_auth_client
(
conn
,
privs
,
server_princ_name
,
authn_level
,
authn_svc
,
authz_svc
,
flags
);
}
/* 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 @
3dbf356f
...
...
@@ -1177,6 +1177,41 @@ RPC_STATUS RPCRT4_default_revert_to_self(RpcConnection *conn)
}
/***********************************************************************
* RPCRT4_default_inquire_auth_client (internal)
*
* Default function to retrieve the authentication details that the client
* is using to call the server.
*/
RPC_STATUS
RPCRT4_default_inquire_auth_client
(
RpcConnection
*
conn
,
RPC_AUTHZ_HANDLE
*
privs
,
RPC_WSTR
*
server_princ_name
,
ULONG
*
authn_level
,
ULONG
*
authn_svc
,
ULONG
*
authz_svc
,
ULONG
flags
)
{
if
(
!
conn
->
AuthInfo
)
return
RPC_S_BINDING_HAS_NO_AUTH
;
if
(
privs
)
{
FIXME
(
"privs not implemented
\n
"
);
*
privs
=
NULL
;
}
if
(
server_princ_name
)
{
*
server_princ_name
=
RPCRT4_strdupW
(
conn
->
AuthInfo
->
server_principal_name
);
if
(
!*
server_princ_name
)
return
ERROR_OUTOFMEMORY
;
}
if
(
authn_level
)
*
authn_level
=
conn
->
AuthInfo
->
AuthnLevel
;
if
(
authn_svc
)
*
authn_svc
=
conn
->
AuthInfo
->
AuthnSvc
;
if
(
authz_svc
)
{
FIXME
(
"authorization service not implemented
\n
"
);
*
authz_svc
=
RPC_C_AUTHZ_NONE
;
}
if
(
flags
)
FIXME
(
"flags 0x%x not implemented
\n
"
,
flags
);
return
RPC_S_OK
;
}
/***********************************************************************
* RPCRT4_Send (internal)
*
* Transmit a packet over connection in acceptable fragments.
...
...
dlls/rpcrt4/rpc_message.h
View file @
3dbf356f
...
...
@@ -55,5 +55,6 @@ 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
);
RPC_STATUS
RPCRT4_default_impersonate_client
(
RpcConnection
*
conn
);
RPC_STATUS
RPCRT4_default_revert_to_self
(
RpcConnection
*
conn
);
RPC_STATUS
RPCRT4_default_inquire_auth_client
(
RpcConnection
*
conn
,
RPC_AUTHZ_HANDLE
*
privs
,
RPC_WSTR
*
server_princ_name
,
ULONG
*
authn_level
,
ULONG
*
authn_svc
,
ULONG
*
authz_svc
,
ULONG
flags
);
#endif
dlls/rpcrt4/rpc_transport.c
View file @
3dbf356f
...
...
@@ -2753,6 +2753,7 @@ static const struct connection_ops conn_protseq_list[] = {
RPCRT4_default_secure_packet
,
rpcrt4_conn_np_impersonate_client
,
rpcrt4_conn_np_revert_to_self
,
RPCRT4_default_inquire_auth_client
,
},
{
"ncalrpc"
,
{
EPM_PROTOCOL_NCALRPC
,
EPM_PROTOCOL_PIPE
},
...
...
@@ -2772,6 +2773,7 @@ static const struct connection_ops conn_protseq_list[] = {
rpcrt4_ncalrpc_secure_packet
,
rpcrt4_conn_np_impersonate_client
,
rpcrt4_conn_np_revert_to_self
,
RPCRT4_default_inquire_auth_client
,
},
{
"ncacn_ip_tcp"
,
{
EPM_PROTOCOL_NCACN
,
EPM_PROTOCOL_TCP
},
...
...
@@ -2791,6 +2793,7 @@ static const struct connection_ops conn_protseq_list[] = {
RPCRT4_default_secure_packet
,
RPCRT4_default_impersonate_client
,
RPCRT4_default_revert_to_self
,
RPCRT4_default_inquire_auth_client
,
},
{
"ncacn_http"
,
{
EPM_PROTOCOL_NCACN
,
EPM_PROTOCOL_HTTP
},
...
...
@@ -2810,6 +2813,7 @@ static const struct connection_ops conn_protseq_list[] = {
RPCRT4_default_secure_packet
,
RPCRT4_default_impersonate_client
,
RPCRT4_default_revert_to_self
,
RPCRT4_default_inquire_auth_client
,
},
};
...
...
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