mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 23:53:38 +00:00
kerberos: Use the Unix call helpers.
This commit is contained in:
parent
5392bd303e
commit
f7b55ffafa
|
@ -39,10 +39,6 @@
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(kerberos);
|
WINE_DEFAULT_DEBUG_CHANNEL(kerberos);
|
||||||
|
|
||||||
static HINSTANCE instance;
|
|
||||||
|
|
||||||
unixlib_handle_t krb5_handle = 0;
|
|
||||||
|
|
||||||
#define KERBEROS_CAPS \
|
#define KERBEROS_CAPS \
|
||||||
( SECPKG_FLAG_INTEGRITY \
|
( SECPKG_FLAG_INTEGRITY \
|
||||||
| SECPKG_FLAG_PRIVACY \
|
| SECPKG_FLAG_PRIVACY \
|
||||||
|
@ -134,11 +130,9 @@ static NTSTATUS NTAPI kerberos_LsaApInitializePackage(ULONG package_id, PLSA_DIS
|
||||||
{
|
{
|
||||||
char *kerberos_name;
|
char *kerberos_name;
|
||||||
|
|
||||||
if (!krb5_handle)
|
if (!__wine_unixlib_handle)
|
||||||
{
|
{
|
||||||
if (NtQueryVirtualMemory( GetCurrentProcess(), instance, MemoryWineUnixFuncs,
|
if (__wine_init_unix_call() || KRB5_CALL( process_attach, NULL ))
|
||||||
&krb5_handle, sizeof(krb5_handle), NULL ) ||
|
|
||||||
KRB5_CALL( process_attach, NULL ))
|
|
||||||
ERR( "no Kerberos support, expect problems\n" );
|
ERR( "no Kerberos support, expect problems\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -569,11 +563,9 @@ static NTSTATUS NTAPI kerberos_SpInitialize(ULONG_PTR package_id, SECPKG_PARAMET
|
||||||
{
|
{
|
||||||
TRACE("%Iu, %p, %p\n", package_id, params, lsa_function_table);
|
TRACE("%Iu, %p, %p\n", package_id, params, lsa_function_table);
|
||||||
|
|
||||||
if (!krb5_handle)
|
if (!__wine_unixlib_handle)
|
||||||
{
|
{
|
||||||
if (NtQueryVirtualMemory( GetCurrentProcess(), instance, MemoryWineUnixFuncs,
|
if (__wine_init_unix_call() || KRB5_CALL( process_attach, NULL ))
|
||||||
&krb5_handle, sizeof(krb5_handle), NULL ) ||
|
|
||||||
KRB5_CALL( process_attach, NULL ))
|
|
||||||
WARN( "no Kerberos support\n" );
|
WARN( "no Kerberos support\n" );
|
||||||
return STATUS_UNSUCCESSFUL;
|
return STATUS_UNSUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
@ -781,17 +773,3 @@ NTSTATUS NTAPI SpUserModeInitialize(ULONG lsa_version, PULONG package_version,
|
||||||
*table_count = 1;
|
*table_count = 1;
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, void *reserved )
|
|
||||||
{
|
|
||||||
switch (reason)
|
|
||||||
{
|
|
||||||
case DLL_PROCESS_ATTACH:
|
|
||||||
instance = hinst;
|
|
||||||
DisableThreadLibraryCalls( hinst );
|
|
||||||
break;
|
|
||||||
case DLL_PROCESS_DETACH:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
|
@ -139,6 +139,4 @@ enum unix_funcs
|
||||||
unix_verify_signature,
|
unix_verify_signature,
|
||||||
};
|
};
|
||||||
|
|
||||||
extern unixlib_handle_t krb5_handle DECLSPEC_HIDDEN;
|
#define KRB5_CALL( func, params ) WINE_UNIX_CALL( unix_ ## func, params )
|
||||||
|
|
||||||
#define KRB5_CALL( func, params ) __wine_unix_call( krb5_handle, unix_ ## func, params )
|
|
||||||
|
|
Loading…
Reference in a new issue