1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-08 03:45:57 +00:00

kerberos: Use the Unix call helpers.

This commit is contained in:
Alexandre Julliard 2022-11-25 10:12:17 +01:00
parent 5392bd303e
commit f7b55ffafa
2 changed files with 5 additions and 29 deletions

View File

@ -39,10 +39,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(kerberos);
static HINSTANCE instance;
unixlib_handle_t krb5_handle = 0;
#define KERBEROS_CAPS \
( SECPKG_FLAG_INTEGRITY \
| SECPKG_FLAG_PRIVACY \
@ -134,11 +130,9 @@ static NTSTATUS NTAPI kerberos_LsaApInitializePackage(ULONG package_id, PLSA_DIS
{
char *kerberos_name;
if (!krb5_handle)
if (!__wine_unixlib_handle)
{
if (NtQueryVirtualMemory( GetCurrentProcess(), instance, MemoryWineUnixFuncs,
&krb5_handle, sizeof(krb5_handle), NULL ) ||
KRB5_CALL( process_attach, NULL ))
if (__wine_init_unix_call() || KRB5_CALL( process_attach, NULL ))
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);
if (!krb5_handle)
if (!__wine_unixlib_handle)
{
if (NtQueryVirtualMemory( GetCurrentProcess(), instance, MemoryWineUnixFuncs,
&krb5_handle, sizeof(krb5_handle), NULL ) ||
KRB5_CALL( process_attach, NULL ))
if (__wine_init_unix_call() || KRB5_CALL( process_attach, NULL ))
WARN( "no Kerberos support\n" );
return STATUS_UNSUCCESSFUL;
}
@ -781,17 +773,3 @@ NTSTATUS NTAPI SpUserModeInitialize(ULONG lsa_version, PULONG package_version,
*table_count = 1;
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;
}

View File

@ -139,6 +139,4 @@ enum unix_funcs
unix_verify_signature,
};
extern unixlib_handle_t krb5_handle DECLSPEC_HIDDEN;
#define KRB5_CALL( func, params ) __wine_unix_call( krb5_handle, unix_ ## func, params )
#define KRB5_CALL( func, params ) WINE_UNIX_CALL( unix_ ## func, params )