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
087eedc3
Commit
087eedc3
authored
May 24, 2007
by
Rob Shearman
Committed by
Alexandre Julliard
May 25, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
secur32: Fix the dwVersion field in the security function tables returned by…
secur32: Fix the dwVersion field in the security function tables returned by InitSecurityInterfaceA/W.
parent
ddbb3179
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
2 deletions
+40
-2
secur32.c
dlls/secur32/secur32.c
+2
-2
secur32.c
dlls/secur32/tests/secur32.c
+38
-0
No files found.
dlls/secur32/secur32.c
View file @
087eedc3
...
...
@@ -86,7 +86,7 @@ static SecurePackageTable *packageTable = NULL;
static
SecureProviderTable
*
providerTable
=
NULL
;
static
SecurityFunctionTableA
securityFunctionTableA
=
{
SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION
_2
,
SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION
,
EnumerateSecurityPackagesA
,
QueryCredentialsAttributesA
,
AcquireCredentialsHandleA
,
...
...
@@ -117,7 +117,7 @@ static SecurityFunctionTableA securityFunctionTableA = {
};
static
SecurityFunctionTableW
securityFunctionTableW
=
{
SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION
_2
,
SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION
,
EnumerateSecurityPackagesW
,
QueryCredentialsAttributesW
,
AcquireCredentialsHandleW
,
...
...
dlls/secur32/tests/secur32.c
View file @
087eedc3
...
...
@@ -32,6 +32,8 @@ static HMODULE secdll;
static
BOOLEAN
(
WINAPI
*
pGetComputerObjectNameA
)(
EXTENDED_NAME_FORMAT
NameFormat
,
LPSTR
lpNameBuffer
,
PULONG
lpnSize
);
static
BOOLEAN
(
WINAPI
*
pGetComputerObjectNameW
)(
EXTENDED_NAME_FORMAT
NameFormat
,
LPWSTR
lpNameBuffer
,
PULONG
lpnSize
);
static
PSecurityFunctionTableA
(
SEC_ENTRY
*
pInitSecurityInterfaceA
)(
void
);
static
PSecurityFunctionTableW
(
SEC_ENTRY
*
pInitSecurityInterfaceW
)(
void
);
static
EXTENDED_NAME_FORMAT
formats
[]
=
{
NameUnknown
,
NameFullyQualifiedDN
,
NameSamCompatible
,
NameDisplay
,
...
...
@@ -86,6 +88,38 @@ static void testGetComputerObjectNameW(void)
}
}
static
void
test_InitSecurityInterface
(
void
)
{
PSecurityFunctionTableA
sftA
;
PSecurityFunctionTableW
sftW
;
sftA
=
pInitSecurityInterfaceA
();
ok
(
sftA
!=
NULL
,
"pInitSecurityInterfaceA failed
\n
"
);
ok
(
sftA
->
dwVersion
==
SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION
,
"wrong dwVersion %ld in security function table
\n
"
,
sftA
->
dwVersion
);
ok
(
!
sftA
->
Reserved2
,
"Reserved2 should be NULL instead of %p in security function table
\n
"
,
sftA
->
Reserved2
);
todo_wine
ok
(
sftA
->
Reserved3
!=
NULL
,
"Reserved3 should not be NULL in security function table
\n
"
);
todo_wine
ok
(
sftA
->
Reserved4
!=
NULL
,
"Reserved4 should not be NULL in security function table
\n
"
);
ok
(
!
sftA
->
Reserved8
,
"Reserved8 should be NULL instead of %p in security function table
\n
"
,
sftA
->
Reserved8
);
if
(
!
pInitSecurityInterfaceW
)
{
skip
(
"InitSecurityInterfaceW not exported by secur32.dll
\n
"
);
return
;
}
sftW
=
pInitSecurityInterfaceW
();
ok
(
sftW
!=
NULL
,
"pInitSecurityInterfaceW failed
\n
"
);
ok
(
sftW
->
dwVersion
==
SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION
,
"wrong dwVersion %ld in security function table
\n
"
,
sftW
->
dwVersion
);
ok
(
!
sftW
->
Reserved2
,
"Reserved2 should be NULL instead of %p in security function table
\n
"
,
sftW
->
Reserved2
);
todo_wine
ok
(
sftW
->
Reserved3
!=
NULL
,
"Reserved3 should note be NULL in security function table
\n
"
);
todo_wine
ok
(
sftW
->
Reserved4
!=
NULL
,
"Reserved4 should not be NULL in security function table
\n
"
);
ok
(
!
sftW
->
Reserved8
,
"Reserved8 should be NULL instead of %p in security function table
\n
"
,
sftW
->
Reserved8
);
}
START_TEST
(
secur32
)
{
secdll
=
LoadLibraryA
(
"secur32.dll"
);
...
...
@@ -97,6 +131,8 @@ START_TEST(secur32)
{
pGetComputerObjectNameA
=
(
PVOID
)
GetProcAddress
(
secdll
,
"GetComputerObjectNameA"
);
pGetComputerObjectNameW
=
(
PVOID
)
GetProcAddress
(
secdll
,
"GetComputerObjectNameW"
);
pInitSecurityInterfaceA
=
(
PVOID
)
GetProcAddress
(
secdll
,
"InitSecurityInterfaceA"
);
pInitSecurityInterfaceW
=
(
PVOID
)
GetProcAddress
(
secdll
,
"InitSecurityInterfaceW"
);
if
(
pGetComputerObjectNameA
)
testGetComputerObjectNameA
();
...
...
@@ -104,6 +140,8 @@ START_TEST(secur32)
if
(
pGetComputerObjectNameW
)
testGetComputerObjectNameW
();
test_InitSecurityInterface
();
FreeLibrary
(
secdll
);
}
}
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