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
fe30b79d
Commit
fe30b79d
authored
May 18, 2009
by
Aric Stewart
Committed by
Alexandre Julliard
May 19, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Handle well qualified names in LookupAccountNameW for account names.
parent
1862826a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
security.c
dlls/advapi32/security.c
+12
-2
No files found.
dlls/advapi32/security.c
View file @
fe30b79d
...
@@ -2753,13 +2753,23 @@ BOOL WINAPI LookupAccountNameW( LPCWSTR lpSystemName, LPCWSTR lpAccountName, PSI
...
@@ -2753,13 +2753,23 @@ BOOL WINAPI LookupAccountNameW( LPCWSTR lpSystemName, LPCWSTR lpAccountName, PSI
userName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
nameLen
*
sizeof
(
WCHAR
));
userName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
nameLen
*
sizeof
(
WCHAR
));
if
(
GetUserNameW
(
userName
,
&
nameLen
)
&&
!
strcmpW
(
lpAccountName
,
userName
))
if
(
lpDomainNamePtr
)
{
/* check to make sure this account is on this computer */
if
(
GetComputerNameW
(
userName
,
&
nameLen
)
&&
strcmpW
(
lpDomainNamePtr
,
userName
))
{
SetLastError
(
ERROR_NONE_MAPPED
);
ret
=
FALSE
;
}
}
if
(
GetUserNameW
(
userName
,
&
nameLen
)
&&
!
strcmpW
(
lpAccountNamePtr
,
userName
))
ret
=
lookup_user_account_name
(
Sid
,
cbSid
,
ReferencedDomainName
,
ret
=
lookup_user_account_name
(
Sid
,
cbSid
,
ReferencedDomainName
,
cchReferencedDomainName
,
peUse
);
cchReferencedDomainName
,
peUse
);
else
else
{
{
nameLen
=
UNLEN
+
1
;
nameLen
=
UNLEN
+
1
;
if
(
GetComputerNameW
(
userName
,
&
nameLen
)
&&
!
strcmpW
(
lpAccountName
,
userName
))
if
(
GetComputerNameW
(
userName
,
&
nameLen
)
&&
!
strcmpW
(
lpAccountName
Ptr
,
userName
))
ret
=
lookup_computer_account_name
(
Sid
,
cbSid
,
ReferencedDomainName
,
ret
=
lookup_computer_account_name
(
Sid
,
cbSid
,
ReferencedDomainName
,
cchReferencedDomainName
,
peUse
);
cchReferencedDomainName
,
peUse
);
else
else
...
...
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