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
6d5d0eaa
Commit
6d5d0eaa
authored
Sep 25, 2007
by
Mikolaj Zalewski
Committed by
Alexandre Julliard
Sep 26, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Make ConvertSidToStringSid use helper functions of…
advapi32: Make ConvertSidToStringSid use helper functions of ConvertSecurityDescriptorToStringSecurityDescriptor.
parent
3198809f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
26 deletions
+8
-26
security.c
dlls/advapi32/security.c
+8
-26
No files found.
dlls/advapi32/security.c
View file @
6d5d0eaa
...
...
@@ -4000,37 +4000,19 @@ BOOL WINAPI ConvertStringSidToSidA(LPCSTR StringSid, PSID* Sid)
*/
BOOL
WINAPI
ConvertSidToStringSidW
(
PSID
pSid
,
LPWSTR
*
pstr
)
{
DWORD
sz
,
i
;
LPWSTR
str
;
WCHAR
fmt
[]
=
{
'S'
,
'-'
,
'%'
,
'u'
,
'-'
,
'%'
,
'd'
,
0
};
WCHAR
subauthfmt
[]
=
{
'-'
,
'%'
,
'u'
,
0
};
SID
*
pisid
=
pSid
;
DWORD
len
=
0
;
LPWSTR
wstr
,
wptr
;
TRACE
(
"%p %p
\n
"
,
pSid
,
pstr
);
if
(
!
IsValidSid
(
pSid
)
)
return
FALSE
;
if
(
pisid
->
Revision
!=
SDDL_REVISION
)
return
FALSE
;
if
(
pisid
->
IdentifierAuthority
.
Value
[
0
]
||
pisid
->
IdentifierAuthority
.
Value
[
1
])
{
FIXME
(
"not matching MS' bugs
\n
"
);
len
=
0
;
if
(
!
DumpSidNumeric
(
pSid
,
NULL
,
&
len
))
return
FALSE
;
}
sz
=
14
+
pisid
->
SubAuthorityCount
*
11
;
str
=
LocalAlloc
(
0
,
sz
*
sizeof
(
WCHAR
)
);
sprintfW
(
str
,
fmt
,
pisid
->
Revision
,
MAKELONG
(
MAKEWORD
(
pisid
->
IdentifierAuthority
.
Value
[
5
],
pisid
->
IdentifierAuthority
.
Value
[
4
]
),
MAKEWORD
(
pisid
->
IdentifierAuthority
.
Value
[
3
],
pisid
->
IdentifierAuthority
.
Value
[
2
]
)
)
);
for
(
i
=
0
;
i
<
pisid
->
SubAuthorityCount
;
i
++
)
sprintfW
(
str
+
strlenW
(
str
),
subauthfmt
,
pisid
->
SubAuthority
[
i
]
);
*
pstr
=
str
;
wstr
=
wptr
=
LocalAlloc
(
0
,
(
len
+
1
)
*
sizeof
(
WCHAR
));
DumpSidNumeric
(
pSid
,
&
wptr
,
NULL
);
*
wptr
=
0
;
*
pstr
=
wstr
;
return
TRUE
;
}
...
...
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