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
eba81476
Commit
eba81476
authored
Dec 10, 2010
by
Hans Leidekker
Committed by
Alexandre Julliard
Dec 10, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Return the computer name as referenced domain name in LookupAccountName.
parent
b0c925cd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
11 deletions
+16
-11
security.c
dlls/advapi32/security.c
+16
-11
No files found.
dlls/advapi32/security.c
View file @
eba81476
...
...
@@ -2629,9 +2629,8 @@ static BOOL lookup_user_account_name(PSID Sid, PDWORD cbSid, LPWSTR ReferencedDo
HANDLE
token
;
BOOL
ret
;
PSID
pSid
;
static
const
WCHAR
dm
[]
=
{
'D'
,
'O'
,
'M'
,
'A'
,
'I'
,
'N'
,
0
}
;
WCHAR
domainName
[
MAX_COMPUTERNAME_LENGTH
+
1
]
;
DWORD
nameLen
;
LPCWSTR
domainName
;
if
(
!
OpenThreadToken
(
GetCurrentThread
(),
TOKEN_READ
,
TRUE
,
&
token
))
{
...
...
@@ -2655,9 +2654,12 @@ static BOOL lookup_user_account_name(PSID Sid, PDWORD cbSid, LPWSTR ReferencedDo
}
*
cbSid
=
GetLengthSid
(
pSid
);
domainName
=
dm
;
nameLen
=
strlenW
(
domainName
);
nameLen
=
MAX_COMPUTERNAME_LENGTH
+
1
;
if
(
!
GetComputerNameW
(
domainName
,
&
nameLen
))
{
domainName
[
0
]
=
0
;
nameLen
=
0
;
}
if
(
*
cchReferencedDomainName
<=
nameLen
||
!
ret
)
{
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
...
...
@@ -2683,9 +2685,8 @@ static BOOL lookup_computer_account_name(PSID Sid, PDWORD cbSid, LPWSTR Referenc
{
MAX_SID
local
;
BOOL
ret
;
static
const
WCHAR
dm
[]
=
{
'D'
,
'O'
,
'M'
,
'A'
,
'I'
,
'N'
,
0
}
;
WCHAR
domainName
[
MAX_COMPUTERNAME_LENGTH
+
1
]
;
DWORD
nameLen
;
LPCWSTR
domainName
;
if
((
ret
=
ADVAPI_GetComputerSid
(
&
local
)))
{
...
...
@@ -2699,9 +2700,12 @@ static BOOL lookup_computer_account_name(PSID Sid, PDWORD cbSid, LPWSTR Referenc
*
cbSid
=
GetLengthSid
(
&
local
);
}
domainName
=
dm
;
nameLen
=
strlenW
(
domainName
);
nameLen
=
MAX_COMPUTERNAME_LENGTH
+
1
;
if
(
!
GetComputerNameW
(
domainName
,
&
nameLen
))
{
domainName
[
0
]
=
0
;
nameLen
=
0
;
}
if
(
*
cchReferencedDomainName
<=
nameLen
||
!
ret
)
{
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
...
...
@@ -2898,11 +2902,12 @@ BOOL WINAPI LookupAccountNameW( LPCWSTR lpSystemName, LPCWSTR lpAccountName, PSI
BOOL
ret
,
handled
;
LSA_UNICODE_STRING
account
;
FIXME
(
"%s %s %p %p %p %p %p - stub
\n
"
,
debugstr_w
(
lpSystemName
),
debugstr_w
(
lpAccountName
),
TRACE
(
"%s %s %p %p %p %p %p
\n
"
,
debugstr_w
(
lpSystemName
),
debugstr_w
(
lpAccountName
),
Sid
,
cbSid
,
ReferencedDomainName
,
cchReferencedDomainName
,
peUse
);
if
(
!
ADVAPI_IsLocalComputer
(
lpSystemName
))
{
FIXME
(
"remote computer not supported
\n
"
);
SetLastError
(
RPC_S_SERVER_UNAVAILABLE
);
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