Francois Gouget <wine(a)gitlab.winehq.org> wrote:
+static BOOLEAN has_kerberos;
Please use BOOL instead.
status = QuerySecurityPackageInfoA(provider, &info); - ok(status == SEC_E_OK, "Kerberos package not installed, skipping test\n"); + if(status == SEC_E_SECPKG_NOT_FOUND) + skip("Skipping the Kerberos tests (package is not installed).\n"); + else + ok(status == SEC_E_OK, "Failed to query the Kerberos package: %lx\n", status); if(status != SEC_E_OK) return; + has_kerberos = TRUE;
ok( (info->fCapabilities & ~optional_mask) == expected_flags, "got %08lx, expected %08lx\n", info->fCapabilities, expected_flags ); ok( info->wVersion == 1, "got %u\n", info->wVersion ); @@ -479,7 +485,15 @@ static void test_ticket_cache(void)
RtlInitAnsiString( &name, MICROSOFT_KERBEROS_NAME_A ); status = LsaLookupAuthenticationPackage( lsa, &name, &package ); - ok( !status, "got %08lx\n", status ); + if (has_kerberos) + ok( !status, "got %08lx\n", status ); + else + { + ok( status, "expected Kerberos lookup to fail\n" ); + skip("Skipping the ticket cache tests (no Kerberos: %lx).\n", status); + LsaDeregisterLogonProcess( lsa ); + return; + }
status = LsaCallAuthenticationPackage( lsa, package, &req, sizeof(req), (void **)&resp, &len, &status ); ok( !status, "got %08lx\n", status );
Missing Kerberos makes the installation broken and not supported. Crashing in this situation is correct behaviour. It's better to spend time on fixing broken configuration instead of hiding the problem. -- Dmitry.