Bug 494969, GSSAPI negotiate authentication may fail if /etc/resolv.conf changes

r=cbiesinger
Second checkin attempt, adding the obviously missing #ifdef needed for cross platform portability.
This commit is contained in:
Kai Engert 2009-10-30 10:13:34 +01:00
Родитель 2f5196fb04
Коммит 240e4b9ebb
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -72,6 +72,10 @@ typedef KLStatus (*KLCacheHasValidTickets_type)(
char **); char **);
#endif #endif
#if defined(HAVE_RES_NINIT)
#include <resolv.h>
#endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// We define GSS_C_NT_HOSTBASED_SERVICE explicitly since it may be referenced // We define GSS_C_NT_HOSTBASED_SERVICE explicitly since it may be referenced
@ -416,6 +420,9 @@ nsAuthGSSAPI::GetNextToken(const void *inToken,
input_token.value = (void *)mServiceName.get(); input_token.value = (void *)mServiceName.get();
input_token.length = mServiceName.Length() + 1; input_token.length = mServiceName.Length() + 1;
#if defined(HAVE_RES_NINIT)
res_ninit(&_res);
#endif
major_status = gss_import_name_ptr(&minor_status, major_status = gss_import_name_ptr(&minor_status,
&input_token, &input_token,
&gss_c_nt_hostbased_service, &gss_c_nt_hostbased_service,