rpcrt4/tests: Don't crash on NT4.

This commit is contained in:
Paul Vriens 2009-12-16 09:00:30 +01:00 committed by Alexandre Julliard
parent e4897a827b
commit 4d1fa5833e

View File

@ -1346,7 +1346,7 @@ s_authinfo_test(unsigned int protseq, int secure)
todo_wine
ok(principal != NULL, "NULL principal\n");
}
if (protseq == RPC_PROTSEQ_LRPC && principal)
if (protseq == RPC_PROTSEQ_LRPC && principal && pGetUserNameExA)
{
int len;
char *spn;
@ -1399,6 +1399,9 @@ set_auth_info(RPC_BINDING_HANDLE handle)
RPC_STATUS status;
RPC_SECURITY_QOS qos;
if (!pGetUserNameExA)
return;
qos.Version = 1;
qos.Capabilities = RPC_C_QOS_CAPABILITIES_MUTUAL_AUTH;
qos.IdentityTracking = RPC_C_QOS_IDENTITY_STATIC;
@ -1573,6 +1576,8 @@ START_TEST(server)
domain_and_user = HeapAlloc(GetProcessHeap(), 0, size);
ok(pGetUserNameExA(NameSamCompatible, domain_and_user, &size), "GetUserNameExA\n");
}
else
win_skip("GetUserNameExA is needed for some authentication tests\n");
argc = winetest_get_mainargs(&argv);
progname = argv[0];