#include "libsmb/clidgram.h"
#include "libsmb/nmblib.h"
#include "messages.h"
+#include "librpc/gen_ndr/samr.h"
+#include "../lib/util/pidfile.h"
/*
* cli_send_mailslot, send a mailslot for client code ...
*/
static bool cli_prep_mailslot(bool unique, const char *mailslot,
- uint16 priority,
+ uint16_t priority,
char *buf, int len,
const char *srcname, int src_type,
const char *dstname, int dest_type,
if (tevent_req_nomem(state->my_mailslot, req)) {
return tevent_req_post(req, ev);
}
- state->nmbd_pid = pidfile_pid("nmbd");
+ state->nmbd_pid = pidfile_pid(lp_pid_directory(), "nmbd");
if (state->nmbd_pid == 0) {
DEBUG(3, ("No nmbd found\n"));
tevent_req_nterror(req, NT_STATUS_NOT_SUPPORTED);
}
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,
struct tevent_req *req;
NTSTATUS status = NT_STATUS_NO_MEMORY;
- ev = tevent_context_init(frame);
+ ev = samba_tevent_context_init(frame);
if (ev == NULL) {
goto fail;
}
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;
}