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
29816504
Commit
29816504
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: LookupAccountSidW() - handle first user account.
parent
0e662695
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
security.c
dlls/advapi32/security.c
+14
-6
No files found.
dlls/advapi32/security.c
View file @
29816504
...
...
@@ -38,6 +38,7 @@
#include "objbase.h"
#include "iads.h"
#include "advapi32_misc.h"
#include "lmcons.h"
#include "wine/debug.h"
#include "wine/unicode.h"
...
...
@@ -1953,12 +1954,6 @@ LookupAccountSidA(
DWORD
accountSizeW
=
*
accountSize
;
DWORD
domainSizeW
=
*
domainSize
;
TRACE
(
"(%s,sid=%s,%p,%p(%u),%p,%p(%u),%p)
\n
"
,
debugstr_a
(
system
),
debugstr_sid
(
sid
),
account
,
accountSize
,
accountSize
?*
accountSize
:
0
,
domain
,
domainSize
,
domainSize
?*
domainSize
:
0
,
name_use
);
if
(
system
)
{
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
system
,
-
1
,
NULL
,
0
);
systemW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
...
...
@@ -2022,6 +2017,7 @@ LookupAccountSidW(
const
WCHAR
*
dm
=
NULL
;
SID_NAME_USE
use
=
0
;
LPWSTR
computer_name
=
NULL
;
LPWSTR
account_name
=
NULL
;
TRACE
(
"(%s,sid=%s,%p,%p(%u),%p,%p(%u),%p)
\n
"
,
debugstr_w
(
system
),
debugstr_sid
(
sid
),
...
...
@@ -2108,6 +2104,16 @@ LookupAccountSidW(
case
DOMAIN_ALIAS_RID_RAS_SERVERS
:
ac
=
RAS_and_IAS_Servers
;
break
;
case
1000
:
/* first user account */
size
=
UNLEN
+
1
;
account_name
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
*
sizeof
(
WCHAR
));
if
(
GetUserNameW
(
account_name
,
&
size
))
ac
=
account_name
;
else
dm
=
NULL
;
break
;
default:
dm
=
NULL
;
break
;
...
...
@@ -2145,10 +2151,12 @@ LookupAccountSidW(
else
*
accountSize
=
ac_len
+
1
;
*
name_use
=
use
;
HeapFree
(
GetProcessHeap
(),
0
,
account_name
);
HeapFree
(
GetProcessHeap
(),
0
,
computer_name
);
return
status
;
}
HeapFree
(
GetProcessHeap
(),
0
,
account_name
);
HeapFree
(
GetProcessHeap
(),
0
,
computer_name
);
SetLastError
(
ERROR_NONE_MAPPED
);
return
FALSE
;
...
...
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