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
848f4780
Commit
848f4780
authored
Feb 01, 2017
by
Hans Leidekker
Committed by
Alexandre Julliard
Feb 01, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
credui: Split domain from username in SspiPromptForCredentialsW.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
aa8cedb0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
6 deletions
+28
-6
credui_main.c
dlls/credui/credui_main.c
+28
-6
No files found.
dlls/credui/credui_main.c
View file @
848f4780
...
...
@@ -910,23 +910,45 @@ ULONG SEC_ENTRY SspiPromptForCredentialsW( PCWSTR target, void *info,
if
(
!
(
ret
=
CredUIPromptForCredentialsW
(
cred_info
,
target
,
NULL
,
error
,
username
,
len_username
,
password
,
len_password
,
save
,
flags
)))
{
DWORD
size
=
sizeof
(
*
id
);
WCHAR
*
ptr
;
DWORD
size
=
sizeof
(
*
id
)
,
len_domain
=
0
;
WCHAR
*
ptr
,
*
user
=
username
,
*
domain
=
NULL
;
len_username
=
strlenW
(
username
);
if
((
ptr
=
strchrW
(
username
,
'\\'
)))
{
user
=
ptr
+
1
;
len_username
=
strlenW
(
user
);
if
(
!
strcmpiW
(
package
,
ntlmW
)
||
!
strcmpiW
(
package
,
negotiateW
))
{
domain
=
username
;
len_domain
=
ptr
-
username
;
}
*
ptr
=
0
;
}
else
len_username
=
strlenW
(
username
);
len_password
=
strlenW
(
password
);
size
+=
(
len_username
+
1
)
*
sizeof
(
WCHAR
);
size
+=
(
len_domain
+
1
)
*
sizeof
(
WCHAR
);
size
+=
(
len_password
+
1
)
*
sizeof
(
WCHAR
);
if
(
!
(
id
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
)))
return
ERROR_OUTOFMEMORY
;
ptr
=
(
WCHAR
*
)(
id
+
1
);
memcpy
(
ptr
,
user
name
,
(
len_username
+
1
)
*
sizeof
(
WCHAR
)
);
memcpy
(
ptr
,
user
,
(
len_username
+
1
)
*
sizeof
(
WCHAR
)
);
id
->
User
=
ptr
;
id
->
UserLength
=
len_username
;
ptr
+=
len_username
+
1
;
id
->
Domain
=
NULL
;
id
->
DomainLength
=
0
;
if
(
len_domain
)
{
memcpy
(
ptr
,
domain
,
(
len_domain
+
1
)
*
sizeof
(
WCHAR
)
);
id
->
Domain
=
ptr
;
id
->
DomainLength
=
len_domain
;
ptr
+=
len_domain
+
1
;
}
else
{
id
->
Domain
=
NULL
;
id
->
DomainLength
=
0
;
}
memcpy
(
ptr
,
password
,
(
len_password
+
1
)
*
sizeof
(
WCHAR
)
);
id
->
Password
=
ptr
;
id
->
PasswordLength
=
len_password
;
...
...
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