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
0197f54a
Commit
0197f54a
authored
Mar 02, 2018
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Mar 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
secur32: Add support for NameFullyQualifiedDN to GetComputerObjectName.
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
411ccfb9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
5 deletions
+56
-5
sysinfo.c
dlls/adsldp/tests/sysinfo.c
+6
-5
secur32.c
dlls/secur32/secur32.c
+50
-0
No files found.
dlls/adsldp/tests/sysinfo.c
View file @
0197f54a
...
...
@@ -165,14 +165,15 @@ static void test_sysinfo(void)
if
(
hr
!=
S_OK
)
{
skip
(
"Computer is not part of a domain, skipping the tests
\n
"
);
IADsADSystemInfo_Release
(
sysinfo
);
return
;
goto
done
;
}
SysFreeString
(
bstr
);
hr
=
IADsADSystemInfo_get_UserName
(
sysinfo
,
&
bstr
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
SysFreeString
(
bstr
);
todo_wine
ok
(
hr
==
S_OK
||
hr
==
HRESULT_FROM_WIN32
(
ERROR_NONE_MAPPED
),
"got %#x
\n
"
,
hr
);
if
(
hr
!=
S_OK
)
goto
done
;
SysFreeString
(
bstr
);
hr
=
IADsADSystemInfo_get_SiteName
(
sysinfo
,
&
bstr
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
...
...
@@ -201,7 +202,7 @@ static void test_sysinfo(void)
hr
=
IADsADSystemInfo_GetAnyDCName
(
sysinfo
,
&
bstr
);
ok
(
hr
==
S_OK
,
"got %#x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
SysFreeString
(
bstr
);
done:
IADsADSystemInfo_Release
(
sysinfo
);
}
...
...
dlls/secur32/secur32.c
View file @
0197f54a
...
...
@@ -1021,6 +1021,56 @@ BOOLEAN WINAPI GetComputerObjectNameW(
}
break
;
case
NameFullyQualifiedDN
:
{
static
const
WCHAR
cnW
[]
=
{
'C'
,
'N'
,
'='
,
0
};
static
const
WCHAR
ComputersW
[]
=
{
'C'
,
'N'
,
'='
,
'C'
,
'o'
,
'm'
,
'p'
,
'u'
,
't'
,
'e'
,
'r'
,
's'
,
0
};
static
const
WCHAR
dcW
[]
=
{
'D'
,
'C'
,
'='
,
0
};
static
const
WCHAR
commaW
[]
=
{
','
,
0
};
WCHAR
name
[
MAX_COMPUTERNAME_LENGTH
+
1
];
DWORD
len
,
size
;
WCHAR
*
suffix
;
size
=
sizeof
(
name
)
/
sizeof
(
name
[
0
]);
if
(
!
GetComputerNameW
(
name
,
&
size
))
{
status
=
FALSE
;
break
;
}
len
=
strlenW
(
cnW
)
+
size
+
1
+
strlenW
(
ComputersW
)
+
1
+
strlenW
(
dcW
);
suffix
=
strrchrW
(
domainInfo
->
DnsDomainName
.
Buffer
,
'.'
);
if
(
suffix
)
{
*
suffix
++
=
0
;
len
+=
1
+
strlenW
(
dcW
)
+
strlenW
(
suffix
);
}
len
+=
strlenW
(
domainInfo
->
DnsDomainName
.
Buffer
);
if
(
lpNameBuffer
&&
*
nSize
>
len
)
{
lstrcpyW
(
lpNameBuffer
,
cnW
);
lstrcatW
(
lpNameBuffer
,
name
);
lstrcatW
(
lpNameBuffer
,
commaW
);
lstrcatW
(
lpNameBuffer
,
ComputersW
);
lstrcatW
(
lpNameBuffer
,
commaW
);
lstrcatW
(
lpNameBuffer
,
dcW
);
lstrcatW
(
lpNameBuffer
,
domainInfo
->
DnsDomainName
.
Buffer
);
if
(
suffix
)
{
lstrcatW
(
lpNameBuffer
,
commaW
);
lstrcatW
(
lpNameBuffer
,
dcW
);
lstrcatW
(
lpNameBuffer
,
suffix
);
}
status
=
TRUE
;
}
else
/* just requesting length required */
{
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
status
=
FALSE
;
}
*
nSize
=
len
+
1
;
break
;
}
case
NameDisplay
:
case
NameUniqueId
:
case
NameCanonical
:
...
...
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