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
0592210b
Commit
0592210b
authored
May 19, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
May 20, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Add the definition of RpcAuthVerifier to rpc_defs.h from the DCE/RPC spec.
Use it in RPCRT4_SendAuth instead of writing out the data byte-by-byte.
parent
46005c2f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
10 deletions
+19
-10
rpc_defs.h
dlls/rpcrt4/rpc_defs.h
+9
-0
rpc_message.c
dlls/rpcrt4/rpc_message.c
+10
-10
No files found.
dlls/rpcrt4/rpc_defs.h
View file @
0592210b
...
...
@@ -134,6 +134,15 @@ typedef union
RpcPktBindNAckHdr
bind_nack
;
}
RpcPktHdr
;
typedef
struct
{
unsigned
char
auth_type
;
/* authentication scheme in use */
unsigned
char
auth_level
;
/* RPC_C_AUTHN_LEVEL* */
unsigned
char
auth_pad_length
;
/* length of padding to restore n % 4 alignment */
unsigned
char
auth_reserved
;
/* reserved, must be zero */
unsigned
long
auth_context_id
;
/* unique value for the authenticated connection */
}
RpcAuthVerifier
;
#define RPC_VER_MAJOR 5
#define RPC_VER_MINOR 0
...
...
dlls/rpcrt4/rpc_message.c
View file @
0592210b
...
...
@@ -271,8 +271,8 @@ static RPC_STATUS RPCRT4_SendAuth(RpcConnection *Connection, RpcPktHdr *Header,
PUCHAR
buffer_pos
;
DWORD
hdr_size
;
LONG
count
;
unsigned
char
*
pkt
,
*
auth_hdr
;
LONG
alen
=
AuthLength
?
(
AuthLength
+
8
)
:
0
;
unsigned
char
*
pkt
;
LONG
alen
=
AuthLength
?
(
AuthLength
+
sizeof
(
RpcAuthVerifier
)
)
:
0
;
buffer_pos
=
Buffer
;
/* The packet building functions save the packet header size, so we can use it. */
...
...
@@ -309,16 +309,16 @@ static RPC_STATUS RPCRT4_SendAuth(RpcConnection *Connection, RpcPktHdr *Header,
/* add the authorization info */
if
(
Connection
->
AuthInfo
&&
AuthLength
)
{
auth_hdr
=
&
pkt
[
Header
->
common
.
frag_len
-
alen
];
auth_hdr
[
0
]
=
Connection
->
AuthInfo
->
AuthnSvc
;
auth_hdr
[
1
]
=
Connection
->
AuthInfo
->
AuthnLevel
;
auth_hdr
[
2
]
=
auth_pad_len
;
auth_hdr
[
3
]
=
0x00
;
RpcAuthVerifier
*
auth_hdr
=
(
RpcAuthVerifier
*
)
&
pkt
[
Header
->
common
.
frag_len
-
alen
];
auth_hdr
->
auth_type
=
Connection
->
AuthInfo
->
AuthnSvc
;
auth_hdr
->
auth_level
=
Connection
->
AuthInfo
->
AuthnLevel
;
auth_hdr
->
auth_pad_length
=
auth_pad_len
;
auth_hdr
->
auth_reserved
=
0
;
/* a unique number... */
memcpy
(
&
auth_hdr
[
4
],
&
Connection
,
4
);
memcpy
(
&
auth_hdr
[
8
],
Auth
,
AuthLength
);
auth_hdr
->
auth_context_id
=
(
unsigned
long
)
Connection
;
memcpy
(
auth_hdr
+
1
,
Auth
,
AuthLength
);
}
write:
...
...
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