@@ -50,6 +50,21 @@ JITManager::GetJITManager()
5050 return &s_jitManager;
5151}
5252
53+ typedef struct _CHAKRA_RPC_SECURITY_QOS_V5 {
54+ unsigned long Version;
55+ unsigned long Capabilities;
56+ unsigned long IdentityTracking;
57+ unsigned long ImpersonationType;
58+ unsigned long AdditionalSecurityInfoType;
59+ union
60+ {
61+ RPC_HTTP_TRANSPORT_CREDENTIALS_W * HttpCredentials;
62+ } u;
63+ void * Sid;
64+ unsigned int EffectiveOnly;
65+ void * ServerSecurityDescriptor;
66+ } CHAKRA_RPC_SECURITY_QOS_V5 ;
67+
5368// This routine creates a binding with the server.
5469HRESULT
5570JITManager::CreateBinding (
@@ -67,22 +82,13 @@ JITManager::CreateBinding(
6782 RPC_BINDING_HANDLE_TEMPLATE_V1 bindingTemplate;
6883 RPC_BINDING_HANDLE_SECURITY_V1_W bindingSecurity;
6984
70- #if (NTDDI_VERSION >= NTDDI_WIN8)
71- RPC_SECURITY_QOS_V5 securityQOS;
72- ZeroMemory (&securityQOS, sizeof (RPC_SECURITY_QOS_V5 ));
85+ CHAKRA_RPC_SECURITY_QOS_V5 securityQOS;
86+ ZeroMemory (&securityQOS, sizeof (CHAKRA_RPC_SECURITY_QOS_V5 ));
7387 securityQOS.Capabilities = RPC_C_QOS_CAPABILITIES_DEFAULT ;
7488 securityQOS.IdentityTracking = RPC_C_QOS_IDENTITY_DYNAMIC ;
7589 securityQOS.ImpersonationType = RPC_C_IMP_LEVEL_IDENTIFY ;
76- securityQOS.Version = 5 ;
90+ securityQOS.Version = AutoSystemInfo::Data. IsWin8OrLater () ? 5 : 4 ;
7791 securityQOS.ServerSecurityDescriptor = serverSecurityDescriptor;
78- #else
79- RPC_SECURITY_QOS_V4 securityQOS;
80- ZeroMemory (&securityQOS, sizeof (RPC_SECURITY_QOS_V4 ));
81- securityQOS.Capabilities = RPC_C_QOS_CAPABILITIES_DEFAULT ;
82- securityQOS.IdentityTracking = RPC_C_QOS_IDENTITY_DYNAMIC ;
83- securityQOS.ImpersonationType = RPC_C_IMP_LEVEL_IDENTIFY ;
84- securityQOS.Version = 4 ;
85- #endif
8692
8793 ZeroMemory (&bindingTemplate, sizeof (bindingTemplate));
8894 bindingTemplate.Version = 1 ;
0 commit comments