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
a37512ee
Commit
a37512ee
authored
Oct 18, 2008
by
Paul Bryan Roberts
Committed by
Alexandre Julliard
Oct 21, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: LookupAccountNameW() - use CreateWellKnownSid() properly.
parent
a3e0bc10
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletion
+22
-1
security.c
dlls/advapi32/security.c
+22
-1
No files found.
dlls/advapi32/security.c
View file @
a37512ee
...
...
@@ -2536,7 +2536,26 @@ BOOL WINAPI LookupAccountNameW( LPCWSTR lpSystemName, LPCWSTR lpAccountName, PSI
{
if
(
!
strcmpW
(
lpAccountName
,
ACCOUNT_SIDS
[
i
].
account
))
{
ret
=
CreateWellKnownSid
(
ACCOUNT_SIDS
[
i
].
type
,
NULL
,
Sid
,
cbSid
);
DWORD
sidLen
=
SECURITY_MAX_SID_SIZE
;
pSid
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sidLen
);
ret
=
CreateWellKnownSid
(
ACCOUNT_SIDS
[
i
].
type
,
NULL
,
pSid
,
&
sidLen
);
if
(
ret
)
{
if
(
*
cbSid
<
sidLen
)
{
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
ret
=
FALSE
;
}
else
if
(
Sid
)
{
CopySid
(
*
cbSid
,
Sid
,
pSid
);
}
*
cbSid
=
sidLen
;
}
domainName
=
ACCOUNT_SIDS
[
i
].
domain
;
nameLen
=
strlenW
(
domainName
);
...
...
@@ -2559,6 +2578,8 @@ BOOL WINAPI LookupAccountNameW( LPCWSTR lpSystemName, LPCWSTR lpAccountName, PSI
*
peUse
=
ACCOUNT_SIDS
[
i
].
name_use
;
}
HeapFree
(
GetProcessHeap
(),
0
,
pSid
);
return
ret
;
}
}
...
...
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