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
640d87df
Commit
640d87df
authored
Oct 06, 2006
by
Kai Blin
Committed by
Alexandre Julliard
Oct 06, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
secur32: Add support for cached client credentials.
parent
4fe6c3fa
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
6 deletions
+18
-6
ntlm.c
dlls/secur32/ntlm.c
+18
-6
No files found.
dlls/secur32/ntlm.c
View file @
640d87df
...
@@ -88,15 +88,16 @@ static SECURITY_STATUS SEC_ENTRY ntlm_AcquireCredentialsHandleW(
...
@@ -88,15 +88,16 @@ static SECURITY_STATUS SEC_ENTRY ntlm_AcquireCredentialsHandleW(
SECURITY_STATUS
ret
;
SECURITY_STATUS
ret
;
PNegoHelper
helper
=
NULL
;
PNegoHelper
helper
=
NULL
;
static
CHAR
ntlm_auth
[]
=
"ntlm_auth"
,
static
CHAR
ntlm_auth
[]
=
"ntlm_auth"
,
helper_protocol
[]
=
"--helper-protocol=squid-2.5-ntlmssp"
;
server_helper_protocol
[]
=
"--helper-protocol=squid-2.5-ntlmssp"
,
credentials_argv
[]
=
"--use-cached-creds"
;
SEC_CHAR
*
client_user_arg
=
NULL
;
SEC_CHAR
*
client_user_arg
=
NULL
;
SEC_CHAR
*
client_domain_arg
=
NULL
;
SEC_CHAR
*
client_domain_arg
=
NULL
;
SEC_WCHAR
*
username
=
NULL
,
*
domain
=
NULL
;
SEC_WCHAR
*
username
=
NULL
,
*
domain
=
NULL
;
SEC_CHAR
*
client_argv
[
5
];
SEC_CHAR
*
client_argv
[
6
];
SEC_CHAR
*
server_argv
[]
=
{
ntlm_auth
,
SEC_CHAR
*
server_argv
[]
=
{
ntlm_auth
,
helper_protocol
,
server_
helper_protocol
,
NULL
};
NULL
};
TRACE
(
"(%s, %s, 0x%08lx, %p, %p, %p, %p, %p, %p)
\n
"
,
TRACE
(
"(%s, %s, 0x%08lx, %p, %p, %p, %p, %p, %p)
\n
"
,
...
@@ -196,7 +197,8 @@ static SECURITY_STATUS SEC_ENTRY ntlm_AcquireCredentialsHandleW(
...
@@ -196,7 +197,8 @@ static SECURITY_STATUS SEC_ENTRY ntlm_AcquireCredentialsHandleW(
client_argv
[
1
]
=
helper_protocol
;
client_argv
[
1
]
=
helper_protocol
;
client_argv
[
2
]
=
client_user_arg
;
client_argv
[
2
]
=
client_user_arg
;
client_argv
[
3
]
=
client_domain_arg
;
client_argv
[
3
]
=
client_domain_arg
;
client_argv
[
4
]
=
NULL
;
client_argv
[
4
]
=
credentials_argv
;
client_argv
[
5
]
=
NULL
;
if
((
ret
=
fork_helper
(
&
helper
,
"ntlm_auth"
,
client_argv
))
!=
if
((
ret
=
fork_helper
(
&
helper
,
"ntlm_auth"
,
client_argv
))
!=
SEC_E_OK
)
SEC_E_OK
)
...
@@ -460,12 +462,22 @@ static SECURITY_STATUS SEC_ENTRY ntlm_InitializeSecurityContextW(
...
@@ -460,12 +462,22 @@ static SECURITY_STATUS SEC_ENTRY ntlm_InitializeSecurityContextW(
if
(
fContextReq
&
ISC_REQ_STREAM
)
if
(
fContextReq
&
ISC_REQ_STREAM
)
FIXME
(
"ISC_REQ_STREAM
\n
"
);
FIXME
(
"ISC_REQ_STREAM
\n
"
);
/* Request a challenge request from ntlm_auth */
/* If no password is given, try to use cached credentials. Fall back to an empty
* password if this failed. */
if
(
helper
->
password
==
NULL
)
if
(
helper
->
password
==
NULL
)
{
{
FIXME
(
"Using empty password for now.
\n
"
);
lstrcpynA
(
buffer
,
"OK"
,
max_len
-
1
);
if
((
ret
=
run_helper
(
helper
,
buffer
,
max_len
,
&
buffer_len
))
!=
SEC_E_OK
)
goto
isc_end
;
/* If the helper replied with "PW", using cached credentials failed */
if
(
!
strncmp
(
buffer
,
"PW"
,
2
))
{
TRACE
(
"Using cached credentials failed. Using empty password."
);
lstrcpynA
(
buffer
,
"PW AA=="
,
max_len
-
1
);
lstrcpynA
(
buffer
,
"PW AA=="
,
max_len
-
1
);
}
}
else
/* Just do a noop on the next run */
lstrcpynA
(
buffer
,
"OK"
,
max_len
-
1
);
}
else
else
{
{
lstrcpynA
(
buffer
,
"PW "
,
max_len
-
1
);
lstrcpynA
(
buffer
,
"PW "
,
max_len
-
1
);
...
...
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