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
ff3ab480
Commit
ff3ab480
authored
Sep 24, 2007
by
Mikolaj Zalewski
Committed by
Alexandre Julliard
Sep 25, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Make ConvertStringSidToSid not to ignore the first subauthority.
parent
57ca9ae9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
security.c
dlls/advapi32/security.c
+2
-2
security.c
dlls/advapi32/tests/security.c
+8
-0
No files found.
dlls/advapi32/security.c
View file @
ff3ab480
...
...
@@ -3900,12 +3900,12 @@ static BOOL ParseStringSidToSid(LPCWSTR StringSid, PSID pSid, LPDWORD cBytes)
while
(
*
StringSid
)
{
pisid
->
SubAuthority
[
i
++
]
=
atoiW
(
StringSid
);
while
(
*
StringSid
&&
*
StringSid
!=
'-'
)
StringSid
++
;
if
(
*
StringSid
==
'-'
)
StringSid
++
;
pisid
->
SubAuthority
[
i
++
]
=
atoiW
(
StringSid
);
}
if
(
i
!=
pisid
->
SubAuthorityCount
)
...
...
dlls/advapi32/tests/security.c
View file @
ff3ab480
...
...
@@ -148,6 +148,7 @@ static void test_sid(void)
const
char
noSubAuthStr
[]
=
"S-1-5"
;
unsigned
int
i
;
PSID
psid
=
NULL
;
SID
*
pisid
;
BOOL
r
;
LPSTR
str
=
NULL
;
...
...
@@ -185,6 +186,13 @@ static void test_sid(void)
"expected GetLastError() is ERROR_INVALID_SID, got %d
\n
"
,
GetLastError
()
);
ok
(
pConvertStringSidToSidA
(
"S-1-5-21-93476-23408-4576"
,
&
psid
),
"ConvertStringSidToSidA failed
\n
"
);
pisid
=
(
SID
*
)
psid
;
ok
(
pisid
->
SubAuthorityCount
==
4
,
"Invalid sub authority count - expected 4, got %d
\n
"
,
pisid
->
SubAuthorityCount
);
ok
(
pisid
->
SubAuthority
[
0
]
==
21
,
"Invalid subauthority 0 - expceted 21, got %d
\n
"
,
pisid
->
SubAuthority
[
0
]);
ok
(
pisid
->
SubAuthority
[
3
]
==
4576
,
"Invalid subauthority 0 - expceted 4576, got %d
\n
"
,
pisid
->
SubAuthority
[
3
]);
LocalFree
(
str
);
for
(
i
=
0
;
i
<
sizeof
(
refs
)
/
sizeof
(
refs
[
0
]);
i
++
)
{
PISID
pisid
;
...
...
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