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
4a45679f
Commit
4a45679f
authored
May 07, 2021
by
Hans Leidekker
Committed by
Alexandre Julliard
May 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
secur32: Use a reserved flag for the cached credentials hack.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
24aba090
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
19 deletions
+8
-19
main.c
dlls/msv1_0/main.c
+3
-2
negotiate.c
dlls/secur32/negotiate.c
+5
-17
No files found.
dlls/msv1_0/main.c
View file @
4a45679f
...
...
@@ -159,6 +159,7 @@ static char *get_domain_arg( const WCHAR *domain, int domain_len )
return
ret
;
}
#define WINE_NO_CACHED_CREDENTIALS 0x10000000
static
NTSTATUS
NTAPI
ntlm_SpAcquireCredentialsHandle
(
UNICODE_STRING
*
principal
,
ULONG
cred_use
,
LUID
*
logon_id
,
void
*
auth_data
,
void
*
get_key_fn
,
void
*
get_key_arg
,
LSA_SEC_HANDLE
*
handle
,
TimeStamp
*
expiry
)
...
...
@@ -171,7 +172,7 @@ static NTSTATUS NTAPI ntlm_SpAcquireCredentialsHandle( UNICODE_STRING *principal
TRACE
(
"%s, 0x%08x, %p, %p, %p, %p, %p, %p
\n
"
,
debugstr_us
(
principal
),
cred_use
,
logon_id
,
auth_data
,
get_key_fn
,
get_key_arg
,
cred
,
expiry
);
switch
(
cred_use
)
switch
(
cred_use
&
~
SECPKG_CRED_RESERVED
)
{
case
SECPKG_CRED_INBOUND
:
if
(
!
(
cred
=
malloc
(
sizeof
(
*
cred
)
)))
return
SEC_E_INSUFFICIENT_MEMORY
;
...
...
@@ -194,7 +195,7 @@ static NTSTATUS NTAPI ntlm_SpAcquireCredentialsHandle( UNICODE_STRING *principal
cred
->
domain_arg
=
NULL
;
cred
->
password
=
NULL
;
cred
->
password_len
=
0
;
cred
->
no_cached_credentials
=
0
;
cred
->
no_cached_credentials
=
(
cred_use
&
WINE_NO_CACHED_CREDENTIALS
)
;
if
((
id
=
auth_data
))
{
...
...
dlls/secur32/negotiate.c
View file @
4a45679f
...
...
@@ -58,16 +58,7 @@ struct sec_handle
SecHandle
handle_ntlm
;
};
/* matches layout from msv1_0 */
struct
ntlm_cred
{
int
mode
;
char
*
username_arg
;
char
*
domain_arg
;
char
*
password
;
int
password_len
;
int
no_cached_credentials
;
/* don't try to use cached Samba credentials */
};
#define WINE_NO_CACHED_CREDENTIALS 0x10000000
/***********************************************************************
* AcquireCredentialsHandleW
...
...
@@ -99,14 +90,11 @@ static SECURITY_STATUS SEC_ENTRY nego_AcquireCredentialsHandleW(
if
((
package
=
SECUR32_findPackageW
(
ntlmW
)))
{
ULONG
cred_use
=
pAuthData
?
fCredentialUse
:
fCredentialUse
|
WINE_NO_CACHED_CREDENTIALS
;
ret
=
package
->
provider
->
fnTableW
.
AcquireCredentialsHandleW
(
pszPrincipal
,
ntlmW
,
fCredentialUse
,
pLogonID
,
pAuthData
,
pGetKeyFn
,
pGetKeyArgument
,
&
cred
->
handle_ntlm
,
ptsExpiry
);
if
(
ret
==
SEC_E_OK
)
{
struct
ntlm_cred
*
ntlm_cred
=
(
struct
ntlm_cred
*
)
cred
->
handle_ntlm
.
dwLower
;
ntlm_cred
->
no_cached_credentials
=
(
pAuthData
==
NULL
);
cred
->
ntlm
=
package
->
provider
;
}
cred_use
,
pLogonID
,
pAuthData
,
pGetKeyFn
,
pGetKeyArgument
,
&
cred
->
handle_ntlm
,
ptsExpiry
);
if
(
ret
==
SEC_E_OK
)
cred
->
ntlm
=
package
->
provider
;
}
if
(
cred
->
krb
||
cred
->
ntlm
)
...
...
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