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
875d3b97
Commit
875d3b97
authored
Sep 17, 2001
by
Ge van Geldorp
Committed by
Alexandre Julliard
Oct 06, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
schannel/tests: Fix crash on Win7.
parent
2165c264
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
and
4 deletions
+74
-4
lsamode.c
dlls/schannel/lsamode.c
+13
-1
main.c
dlls/schannel/tests/main.c
+32
-3
ntsecpkg.h
include/ntsecpkg.h
+29
-0
No files found.
dlls/schannel/lsamode.c
View file @
875d3b97
...
...
@@ -109,6 +109,12 @@ static SECPKG_FUNCTION_TABLE secPkgFunctionTable[2] =
NULL
,
/* SetExtendedInformation */
NULL
,
/* SetContextAttributes */
NULL
,
/* SetCredentialsAttributes */
NULL
,
/* ChangeAccountPassword */
NULL
,
/* QueryMetaData */
NULL
,
/* ExchangeMetaData */
NULL
,
/* GetCredUIContext */
NULL
,
/* UpdateCredentials */
NULL
,
/* ValidateTargetInfo */
},
{
NULL
,
/* InitializePackage */
NULL
,
/* LsaLogonUser */
...
...
@@ -139,6 +145,12 @@ static SECPKG_FUNCTION_TABLE secPkgFunctionTable[2] =
NULL
,
/* SetExtendedInformation */
NULL
,
/* SetContextAttributes */
NULL
,
/* SetCredentialsAttributes */
NULL
,
/* ChangeAccountPassword */
NULL
,
/* QueryMetaData */
NULL
,
/* ExchangeMetaData */
NULL
,
/* GetCredUIContext */
NULL
,
/* UpdateCredentials */
NULL
,
/* ValidateTargetInfo */
}
};
...
...
@@ -150,7 +162,7 @@ NTSTATUS WINAPI SpLsaModeInitialize(ULONG LsaVersion, PULONG PackageVersion,
{
TRACE
(
"(%u, %p, %p, %p)
\n
"
,
LsaVersion
,
PackageVersion
,
ppTables
,
pcTables
);
*
PackageVersion
=
SECPKG_INTERFACE_VERSION_
3
;
*
PackageVersion
=
SECPKG_INTERFACE_VERSION_
6
;
*
pcTables
=
2
;
*
ppTables
=
secPkgFunctionTable
;
...
...
dlls/schannel/tests/main.c
View file @
875d3b97
...
...
@@ -37,7 +37,13 @@
SetContextAttributes)
#define SECPKG_FUNCTION_TABLE_SIZE_2 FIELD_OFFSET(SECPKG_FUNCTION_TABLE, \
SetCredentialsAttributes)
#define SECPKG_FUNCTION_TABLE_SIZE_3 sizeof(SECPKG_FUNCTION_TABLE)
#define SECPKG_FUNCTION_TABLE_SIZE_3 FIELD_OFFSET(SECPKG_FUNCTION_TABLE, \
ChangeAccountPassword)
#define SECPKG_FUNCTION_TABLE_SIZE_4 FIELD_OFFSET(SECPKG_FUNCTION_TABLE, \
QueryMetaData)
#define SECPKG_FUNCTION_TABLE_SIZE_5 FIELD_OFFSET(SECPKG_FUNCTION_TABLE, \
ValidateTargetInfo)
#define SECPKG_FUNCTION_TABLE_SIZE_6 sizeof(SECPKG_FUNCTION_TABLE)
static
NTSTATUS
(
NTAPI
*
pSpLsaModeInitialize
)(
ULONG
,
PULONG
,
PSECPKG_FUNCTION_TABLE
*
,
PULONG
);
...
...
@@ -121,6 +127,7 @@ static PSECPKG_FUNCTION_TABLE getNextSecPkgTable(PSECPKG_FUNCTION_TABLE pTable,
ULONG
Version
)
{
size_t
size
;
PSECPKG_FUNCTION_TABLE
pNextTable
;
if
(
Version
==
SECPKG_INTERFACE_VERSION
)
size
=
SECPKG_FUNCTION_TABLE_SIZE_1
;
...
...
@@ -128,12 +135,32 @@ static PSECPKG_FUNCTION_TABLE getNextSecPkgTable(PSECPKG_FUNCTION_TABLE pTable,
size
=
SECPKG_FUNCTION_TABLE_SIZE_2
;
else
if
(
Version
==
SECPKG_INTERFACE_VERSION_3
)
size
=
SECPKG_FUNCTION_TABLE_SIZE_3
;
else
if
(
Version
==
SECPKG_INTERFACE_VERSION_4
)
size
=
SECPKG_FUNCTION_TABLE_SIZE_4
;
else
if
(
Version
==
SECPKG_INTERFACE_VERSION_5
)
size
=
SECPKG_FUNCTION_TABLE_SIZE_5
;
else
if
(
Version
==
SECPKG_INTERFACE_VERSION_6
)
size
=
SECPKG_FUNCTION_TABLE_SIZE_6
;
else
{
ok
(
FALSE
,
"Unknown package version 0x%x
\n
"
,
Version
);
return
NULL
;
}
return
(
PSECPKG_FUNCTION_TABLE
)((
PBYTE
)
pTable
+
size
);
pNextTable
=
(
PSECPKG_FUNCTION_TABLE
)((
PBYTE
)
pTable
+
size
);
/* Win7 function tables appear to be SECPKG_INTERFACE_VERSION_6 format,
but unfortunately SpLsaModeInitialize returns SECPKG_INTERFACE_VERSION_3.
We detect that by comparing the "Initialize" pointer from the old table
to the "FreeCredentialsHandle" pointer of the new table. These functions
have different numbers of arguments, so they can't possibly point to the
same implementation */
if
(
broken
((
void
*
)
pTable
->
Initialize
==
(
void
*
)
pNextTable
->
FreeCredentialsHandle
&&
pNextTable
->
FreeCredentialsHandle
!=
NULL
))
{
win_skip
(
"Invalid function pointers for next package
\n
"
);
return
NULL
;
}
return
pNextTable
;
}
static
void
testGetInfo
(
void
)
...
...
@@ -181,7 +208,9 @@ static void testGetInfo(void)
PackageInfo
.
fCapabilities
);
ok
(
PackageInfo
.
wVersion
==
1
,
"wVersion: %d
\n
"
,
PackageInfo
.
wVersion
);
ok
(
PackageInfo
.
wRPCID
==
14
,
"wRPCID: %d
\n
"
,
PackageInfo
.
wRPCID
);
ok
(
PackageInfo
.
cbMaxToken
==
0x4000
,
"cbMaxToken: 0x%x
\n
"
,
ok
(
PackageInfo
.
cbMaxToken
==
0x4000
||
PackageInfo
.
cbMaxToken
==
0x6000
,
/* Win7 */
"cbMaxToken: 0x%x
\n
"
,
PackageInfo
.
cbMaxToken
);
}
}
...
...
include/ntsecpkg.h
View file @
875d3b97
...
...
@@ -34,6 +34,9 @@ extern "C" {
#define SECPKG_INTERFACE_VERSION 0x10000
#define SECPKG_INTERFACE_VERSION_2 0x20000
#define SECPKG_INTERFACE_VERSION_3 0x40000
#define SECPKG_INTERFACE_VERSION_4 0x80000
#define SECPKG_INTERFACE_VERSION_5 0x100000
#define SECPKG_INTERFACE_VERSION_6 0x200000
/* enum definitions for Secure Service Provider/Authentication Packages */
typedef
enum
_LSA_TOKEN_INFORMATION_TYPE
{
...
...
@@ -144,6 +147,11 @@ typedef struct _SECPKG_EXTENDED_INFORMATION {
}
Info
;
}
SECPKG_EXTENDED_INFORMATION
,
*
PSECPKG_EXTENDED_INFORMATION
;
typedef
struct
_SECPKG_TARGETINFO
{
PSID
DomainSid
;
PCWSTR
ComputerName
;
}
SECPKG_TARGETINFO
,
*
PSECPKG_TARGETINFO
;
/* callbacks implemented by SSP/AP dlls and called by the LSA */
typedef
VOID
(
NTAPI
*
PLSA_CALLBACK_FUNCTION
)(
ULONG_PTR
,
ULONG_PTR
,
PSecBuffer
,
PSecBuffer
);
...
...
@@ -345,6 +353,18 @@ typedef NTSTATUS (NTAPI SpSetContextAttributesFn)(LSA_SEC_HANDLE, ULONG, PVOID,
ULONG
);
typedef
NTSTATUS
(
NTAPI
SpSetCredentialsAttributesFn
)(
LSA_SEC_HANDLE
,
ULONG
,
PVOID
,
ULONG
);
typedef
NTSTATUS
(
NTAPI
SpChangeAccountPasswordFn
)(
PUNICODE_STRING
,
PUNICODE_STRING
,
PUNICODE_STRING
,
PUNICODE_STRING
,
BOOLEAN
,
PSecBufferDesc
);
typedef
NTSTATUS
(
NTAPI
SpQueryMetaDataFn
)(
LSA_SEC_HANDLE
,
PUNICODE_STRING
,
ULONG
,
PULONG
,
PUCHAR
*
,
PLSA_SEC_HANDLE
);
typedef
NTSTATUS
(
NTAPI
SpExchangeMetaDataFn
)(
LSA_SEC_HANDLE
,
PUNICODE_STRING
,
ULONG
,
ULONG
,
PUCHAR
,
PLSA_SEC_HANDLE
);
typedef
NTSTATUS
(
NTAPI
SpGetCredUIContextFn
)(
LSA_SEC_HANDLE
,
GUID
*
,
PULONG
,
PUCHAR
*
);
typedef
NTSTATUS
(
NTAPI
SpUpdateCredentialsFn
)(
LSA_SEC_HANDLE
,
GUID
*
,
ULONG
,
PUCHAR
);
typedef
NTSTATUS
(
NTAPI
SpValidateTargetInfoFn
)(
PLSA_CLIENT_REQUEST
,
PVOID
,
PVOID
,
ULONG
,
PSECPKG_TARGETINFO
);
/* User-mode functions implemented by SSP/AP obtainable by a dispatch table */
typedef
NTSTATUS
(
NTAPI
SpInstanceInitFn
)(
ULONG
,
PSECPKG_DLL_FUNCTIONS
,
...
...
@@ -406,6 +426,15 @@ typedef struct SECPKG_FUNCTION_TABLE {
/* Packages with version SECPKG_INTERFACE_VERSION_2 end here */
SpSetCredentialsAttributesFn
*
SetCredentialsAttributes
;
/* Packages with version SECPKG_INTERFACE_VERSION_3 end here */
SpChangeAccountPasswordFn
*
ChangeAccountPassword
;
/* Packages with version SECPKG_INTERFACE_VERSION_4 end here */
SpQueryMetaDataFn
*
QueryMetaData
;
SpExchangeMetaDataFn
*
ExchangeMetaData
;
SpGetCredUIContextFn
*
GetCredUIContext
;
SpUpdateCredentialsFn
*
UpdateCredentials
;
/* Packages with version SECPKG_INTERFACE_VERSION_5 end here */
SpValidateTargetInfoFn
*
ValidateTargetInfo
;
/* Packages with version SECPKG_INTERFACE_VERSION_6 end here */
}
SECPKG_FUNCTION_TABLE
,
*
PSECPKG_FUNCTION_TABLE
;
...
...
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