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
f0085e63
Commit
f0085e63
authored
Aug 25, 2006
by
Robert Reif
Committed by
Alexandre Julliard
Aug 26, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Fix LookupAccountSid and tests to pass on windows and wine.
parent
ee32bd99
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
security.c
dlls/advapi32/security.c
+12
-6
security.c
dlls/advapi32/tests/security.c
+0
-0
No files found.
dlls/advapi32/security.c
View file @
f0085e63
...
...
@@ -1854,14 +1854,14 @@ LookupAccountSidA(
WideCharToMultiByte
(
CP_ACP
,
0
,
accountW
,
-
1
,
account
,
len
,
NULL
,
NULL
);
*
accountSize
=
len
;
}
else
*
accountSize
=
accountSizeW
;
*
accountSize
=
accountSizeW
+
1
;
if
(
domainW
&&
*
domainSize
)
{
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
domainW
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
WideCharToMultiByte
(
CP_ACP
,
0
,
domainW
,
-
1
,
domain
,
len
,
NULL
,
NULL
);
*
domainSize
=
len
;
}
else
*
domainSize
=
domainSizeW
;
*
domainSize
=
domainSizeW
+
1
;
}
HeapFree
(
GetProcessHeap
(),
0
,
systemW
);
...
...
@@ -1958,7 +1958,7 @@ LookupAccountSidW(
case
DOMAIN_GROUP_RID_ADMINS
:
ac
=
Domain_Admins
;
break
;
case
DOMAIN_GROUP_RID_USERS
:
case
DOMAIN_GROUP_RID_USERS
:
ac
=
Domain_Users
;
break
;
case
DOMAIN_GROUP_RID_GUESTS
:
...
...
@@ -2007,11 +2007,17 @@ LookupAccountSidW(
}
if
(((
*
accountSize
!=
0
)
&&
(
*
accountSize
<
strlenW
(
ac
)))
||
((
*
domainSize
!=
0
)
&&
(
*
domainSize
<
strlenW
(
dm
))))
{
SetLastError
(
ERROR_
NOT_ENOUGH_MEMORY
);
SetLastError
(
ERROR_
INSUFFICIENT_BUFFER
);
status
=
FALSE
;
}
*
domainSize
=
strlenW
(
dm
)
+
1
;
*
accountSize
=
strlenW
(
ac
)
+
1
;
if
(
*
domainSize
)
*
domainSize
=
strlenW
(
dm
);
else
*
domainSize
=
strlenW
(
dm
)
+
1
;
if
(
*
accountSize
)
*
accountSize
=
strlenW
(
ac
);
else
*
accountSize
=
strlenW
(
ac
)
+
1
;
*
name_use
=
use
;
HeapFree
(
GetProcessHeap
(),
0
,
computer_name
);
return
status
;
...
...
dlls/advapi32/tests/security.c
View file @
f0085e63
This diff is collapsed.
Click to expand it.
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