Call RpcBindingSetAuthInfo to auth against RPC endpoint.

This commit is contained in:
bugch3ck
2022-05-19 16:47:43 +02:00
parent 9f1702bf58
commit cd97df7331
+7
View File
@@ -68,6 +68,13 @@ handle_t Bind(wchar_t* target)
return(0);
}
RpcStatus = RpcBindingSetAuthInfoW(BindingHandle, (RPC_WSTR)target, RPC_C_AUTHN_LEVEL_PKT_PRIVACY, RPC_C_AUTHN_GSS_NEGOTIATE, NULL, RPC_C_AUTHZ_NONE);
if (RpcStatus != RPC_S_OK) {
wprintf(L"Error in RpcBindingSetAuthInfoW\n");
return(0);
}
return(BindingHandle);
}