}
NTSTATUS nbt_getdc(struct messaging_context *msg_ctx,
+ uint32_t timeout_in_seconds,
const struct sockaddr_storage *dc_addr,
const char *domain_name,
const struct dom_sid *sid,
if (req == NULL) {
goto fail;
}
+ if (!tevent_req_set_endtime(req, ev,
+ timeval_current_ofs(timeout_in_seconds, 0))) {
+ goto fail;
+ }
if (!tevent_req_poll_ntstatus(req, ev, &status)) {
goto fail;
}
uint32_t *nt_version, const char **dc_name,
struct netlogon_samlogon_response **samlogon_response);
NTSTATUS nbt_getdc(struct messaging_context *msg_ctx,
+ uint32_t timeout_in_seconds,
const struct sockaddr_storage *dc_addr,
const char *domain_name,
const struct dom_sid *sid,
return NT_STATUS_UNSUCCESSFUL;
}
- status = nbt_getdc(msg_ctx, &dclist[i].ss, domain_name,
+ status = nbt_getdc(msg_ctx, 10, &dclist[i].ss, domain_name,
NULL, nt_version,
mem_ctx, &nt_version, &dc_name, &r);
if (NT_STATUS_IS_OK(status)) {
}
#endif
- status = nbt_getdc(winbind_messaging_context(), pss, domain->name,
+ status = nbt_getdc(winbind_messaging_context(), 10, pss, domain->name,
&domain->sid, nt_version, mem_ctx, &nt_version,
&dc_name, NULL);
if (NT_STATUS_IS_OK(status)) {