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
58ce4955
Commit
58ce4955
authored
Aug 17, 2006
by
Robert Reif
Committed by
Alexandre Julliard
Aug 24, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Output information on failed LsaQueryInformationPolicy tests.
parent
08941174
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
1 deletion
+61
-1
Makefile.in
dlls/advapi32/tests/Makefile.in
+1
-1
lsa.c
dlls/advapi32/tests/lsa.c
+60
-0
No files found.
dlls/advapi32/tests/Makefile.in
View file @
58ce4955
...
...
@@ -3,7 +3,7 @@ TOPOBJDIR = ../../..
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
TESTDLL
=
advapi32.dll
IMPORTS
=
advapi32 kernel32
IMPORTS
=
ole32
advapi32 kernel32
EXTRALIBS
=
-luuid
CTESTS
=
\
...
...
dlls/advapi32/tests/lsa.c
View file @
58ce4955
...
...
@@ -28,6 +28,9 @@
#include "winreg.h"
#include "winternl.h"
#include "ntsecapi.h"
#include "sddl.h"
#include "winnls.h"
#include "objbase.h"
#define INITGUID
#include "guiddef.h"
#include "wine/test.h"
...
...
@@ -91,6 +94,25 @@ static void test_lsa(void)
ok
(
status
==
STATUS_SUCCESS
,
"LsaQueryInformationPolicy(PolicyPrimaryDomainInformation) failed, returned 0x%08lx
\n
"
,
status
);
if
(
status
==
STATUS_SUCCESS
)
{
ok
(
primary_domain_info
->
Sid
==
0
,
"Sid should be NULL on the local computer
\n
"
);
if
(
primary_domain_info
->
Sid
)
{
LPSTR
strsid
;
if
(
ConvertSidToStringSidA
(
primary_domain_info
->
Sid
,
&
strsid
))
{
if
(
primary_domain_info
->
Name
.
Buffer
)
{
LPSTR
name
=
NULL
;
UINT
len
;
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
primary_domain_info
->
Name
.
Buffer
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
name
=
LocalAlloc
(
0
,
len
);
WideCharToMultiByte
(
CP_ACP
,
0
,
primary_domain_info
->
Name
.
Buffer
,
-
1
,
name
,
len
,
NULL
,
NULL
);
trace
(
" name: %s sid: %s
\n
"
,
name
,
strsid
);
LocalFree
(
name
);
}
else
trace
(
" name: NULL sid: %s
\n
"
,
strsid
);
LocalFree
(
strsid
);
}
else
trace
(
"invalid sid
\n
"
);
}
pLsaFreeMemory
((
LPVOID
)
primary_domain_info
);
}
...
...
@@ -107,6 +129,44 @@ static void test_lsa(void)
if
(
status
==
STATUS_SUCCESS
)
{
ok
(
IsEqualGUID
(
&
dns_domain_info
->
DomainGuid
,
&
GUID_NULL
),
"DomainGUID should be GUID_NULL on local computer
\n
"
);
ok
(
dns_domain_info
->
Sid
==
0
,
"Sid should be NULL on the local computer
\n
"
);
if
(
dns_domain_info
->
Sid
||
!
IsEqualGUID
(
&
dns_domain_info
->
DomainGuid
,
&
GUID_NULL
))
{
LPSTR
strsid
=
NULL
;
LPSTR
name
=
NULL
;
LPSTR
domain
=
NULL
;
LPSTR
forest
=
NULL
;
LPSTR
guidstr
=
NULL
;
WCHAR
guidstrW
[
64
];
UINT
len
;
guidstr
[
0
]
=
'\0'
;
ConvertSidToStringSidA
(
dns_domain_info
->
Sid
,
&
strsid
);
StringFromGUID2
(
&
dns_domain_info
->
DomainGuid
,
guidstrW
,
sizeof
(
guidstrW
)
/
sizeof
(
WCHAR
));
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
guidstrW
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
guidstr
=
LocalAlloc
(
0
,
len
);
WideCharToMultiByte
(
CP_ACP
,
0
,
guidstrW
,
-
1
,
guidstr
,
len
,
NULL
,
NULL
);
if
(
dns_domain_info
->
Name
.
Buffer
)
{
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
dns_domain_info
->
Name
.
Buffer
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
name
=
LocalAlloc
(
0
,
len
);
WideCharToMultiByte
(
CP_ACP
,
0
,
dns_domain_info
->
Name
.
Buffer
,
-
1
,
name
,
len
,
NULL
,
NULL
);
}
if
(
dns_domain_info
->
DnsDomainName
.
Buffer
)
{
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
dns_domain_info
->
DnsDomainName
.
Buffer
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
domain
=
LocalAlloc
(
0
,
len
);
WideCharToMultiByte
(
CP_ACP
,
0
,
dns_domain_info
->
DnsDomainName
.
Buffer
,
-
1
,
name
,
len
,
NULL
,
NULL
);
}
if
(
dns_domain_info
->
DnsForestName
.
Buffer
)
{
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
dns_domain_info
->
DnsForestName
.
Buffer
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
forest
=
LocalAlloc
(
0
,
len
);
WideCharToMultiByte
(
CP_ACP
,
0
,
dns_domain_info
->
DnsForestName
.
Buffer
,
-
1
,
name
,
len
,
NULL
,
NULL
);
}
trace
(
" name: %s domain: %s forest: %s guid: %s sid: %s
\n
"
,
name
?
name
:
"NULL"
,
domain
?
domain
:
"NULL"
,
forest
?
forest
:
"NULL"
,
guidstr
,
strsid
?
strsid
:
"NULL"
);
LocalFree
(
name
);
LocalFree
(
forest
);
LocalFree
(
domain
);
LocalFree
(
guidstr
);
LocalFree
(
strsid
);
}
pLsaFreeMemory
((
LPVOID
)
dns_domain_info
);
}
...
...
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