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
d974d584
Commit
d974d584
authored
May 28, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kerberos: Pass input/output buffers directly for make_signature() call.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
17b283d8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
12 deletions
+21
-12
krb5_ap.c
dlls/kerberos/krb5_ap.c
+13
-1
unixlib.c
dlls/kerberos/unixlib.c
+4
-10
unixlib.h
dlls/kerberos/unixlib.h
+4
-1
No files found.
dlls/kerberos/krb5_ap.c
View file @
d974d584
...
@@ -641,7 +641,19 @@ static NTSTATUS SEC_ENTRY kerberos_SpMakeSignature( LSA_SEC_HANDLE context, ULON
...
@@ -641,7 +641,19 @@ static NTSTATUS SEC_ENTRY kerberos_SpMakeSignature( LSA_SEC_HANDLE context, ULON
if
(
context
)
if
(
context
)
{
{
struct
context_handle
*
context_handle
=
(
void
*
)
context
;
struct
context_handle
*
context_handle
=
(
void
*
)
context
;
struct
make_signature_params
params
=
{
context_handle
->
handle
,
message
};
struct
make_signature_params
params
;
int
data_idx
,
token_idx
;
/* FIXME: multiple data buffers, read-only buffers */
if
((
data_idx
=
get_buffer_index
(
message
,
SECBUFFER_DATA
))
==
-
1
)
return
SEC_E_INVALID_TOKEN
;
if
((
token_idx
=
get_buffer_index
(
message
,
SECBUFFER_TOKEN
))
==
-
1
)
return
SEC_E_INVALID_TOKEN
;
params
.
context
=
context_handle
->
handle
;
params
.
data_length
=
message
->
pBuffers
[
data_idx
].
cbBuffer
;
params
.
data
=
message
->
pBuffers
[
data_idx
].
pvBuffer
;
params
.
token_length
=
&
message
->
pBuffers
[
token_idx
].
cbBuffer
;
params
.
token
=
message
->
pBuffers
[
token_idx
].
pvBuffer
;
return
KRB5_CALL
(
make_signature
,
&
params
);
return
KRB5_CALL
(
make_signature
,
&
params
);
}
}
else
return
SEC_E_INVALID_HANDLE
;
else
return
SEC_E_INVALID_HANDLE
;
...
...
dlls/kerberos/unixlib.c
View file @
d974d584
...
@@ -753,18 +753,12 @@ static NTSTATUS initialize_context( void *args )
...
@@ -753,18 +753,12 @@ static NTSTATUS initialize_context( void *args )
static
NTSTATUS
make_signature
(
void
*
args
)
static
NTSTATUS
make_signature
(
void
*
args
)
{
{
struct
make_signature_params
*
params
=
args
;
struct
make_signature_params
*
params
=
args
;
SecBufferDesc
*
msg
=
params
->
msg
;
OM_uint32
ret
,
minor_status
;
OM_uint32
ret
,
minor_status
;
gss_buffer_desc
data_buffer
,
token_buffer
;
gss_buffer_desc
data_buffer
,
token_buffer
;
gss_ctx_id_t
ctx_handle
=
ctxhandle_sspi_to_gss
(
params
->
context
);
gss_ctx_id_t
ctx_handle
=
ctxhandle_sspi_to_gss
(
params
->
context
);
int
data_idx
,
token_idx
;
/* FIXME: multiple data buffers, read-only buffers */
if
((
data_idx
=
get_buffer_index
(
msg
,
SECBUFFER_DATA
))
==
-
1
)
return
SEC_E_INVALID_TOKEN
;
data_buffer
.
length
=
msg
->
pBuffers
[
data_idx
].
cbBuffer
;
data_buffer
.
value
=
msg
->
pBuffers
[
data_idx
].
pvBuffer
;
if
((
token_idx
=
get_buffer_index
(
msg
,
SECBUFFER_TOKEN
))
==
-
1
)
return
SEC_E_INVALID_TOKEN
;
data_buffer
.
length
=
params
->
data_length
;
data_buffer
.
value
=
params
->
data
;
token_buffer
.
length
=
0
;
token_buffer
.
length
=
0
;
token_buffer
.
value
=
NULL
;
token_buffer
.
value
=
NULL
;
...
@@ -773,8 +767,8 @@ static NTSTATUS make_signature( void *args )
...
@@ -773,8 +767,8 @@ static NTSTATUS make_signature( void *args )
if
(
GSS_ERROR
(
ret
))
trace_gss_status
(
ret
,
minor_status
);
if
(
GSS_ERROR
(
ret
))
trace_gss_status
(
ret
,
minor_status
);
if
(
ret
==
GSS_S_COMPLETE
)
if
(
ret
==
GSS_S_COMPLETE
)
{
{
memcpy
(
msg
->
pBuffers
[
token_idx
].
pvBuffer
,
token_buffer
.
value
,
token_buffer
.
length
);
memcpy
(
params
->
token
,
token_buffer
.
value
,
token_buffer
.
length
);
msg
->
pBuffers
[
token_idx
].
cbBuffer
=
token_buffer
.
length
;
*
params
->
token_length
=
token_buffer
.
length
;
pgss_release_buffer
(
&
minor_status
,
&
token_buffer
);
pgss_release_buffer
(
&
minor_status
,
&
token_buffer
);
}
}
...
...
dlls/kerberos/unixlib.h
View file @
d974d584
...
@@ -72,7 +72,10 @@ struct initialize_context_params
...
@@ -72,7 +72,10 @@ struct initialize_context_params
struct
make_signature_params
struct
make_signature_params
{
{
UINT64
context
;
UINT64
context
;
SecBufferDesc
*
msg
;
BYTE
*
data
;
ULONG
data_length
;
BYTE
*
token
;
ULONG
*
token_length
;
};
};
struct
query_context_attributes_params
struct
query_context_attributes_params
...
...
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