int (*send_fn)(struct server_id src,
struct server_id pid, int msg_type,
const struct iovec *iov, int iovlen,
+ const int *fds, size_t num_fds,
struct messaging_backend *backend);
void *private_data;
};
if (!procid_is_local(&server)) {
ret = msg_ctx->remote->send_fn(msg_ctx->id, server,
msg_type, iov, iovlen,
+ NULL, 0,
msg_ctx->remote);
if (ret != 0) {
return map_nt_error_from_unix(ret);
memcpy(&iov2[1], iov, iovlen * sizeof(*iov));
become_root();
- ret = messaging_dgm_send(server.pid, iov2, iovlen+1);
+ ret = messaging_dgm_send(server.pid, iov2, iovlen+1, NULL, 0);
unbecome_root();
if (ret != 0) {
static int messaging_ctdb_send(struct server_id src,
struct server_id pid, int msg_type,
const struct iovec *iov, int iovlen,
+ const int *fds, size_t num_fds,
struct messaging_backend *backend)
{
struct messaging_ctdbd_context *ctx = talloc_get_type_abort(
uint8_t *buf;
NTSTATUS status;
+ if (num_fds > 0) {
+ return ENOSYS;
+ }
+
buf = iov_buf(talloc_tos(), iov, iovlen);
if (buf == NULL) {
return ENOMEM;
TALLOC_FREE(global_dgm_context);
}
-int messaging_dgm_send(pid_t pid, const struct iovec *iov, int iovlen)
+int messaging_dgm_send(pid_t pid,
+ const struct iovec *iov, int iovlen,
+ const int *fds, size_t num_fds)
{
struct messaging_dgm_context *ctx = global_dgm_context;
struct sockaddr_un dst;
DEBUG(10, ("%s: Sending message to %u\n", __func__, (unsigned)pid));
- ret = unix_msg_send(ctx->dgm_ctx, &dst, iov, iovlen, NULL, 0);
+ ret = unix_msg_send(ctx->dgm_ctx, &dst, iov, iovlen, fds, num_fds);
return ret;
}
void *private_data),
void *recv_cb_private_data);
void messaging_dgm_destroy(void);
-int messaging_dgm_send(pid_t pid, const struct iovec *iov, int iovlen);
+int messaging_dgm_send(pid_t pid,
+ const struct iovec *iov, int iovlen,
+ const int *fds, size_t num_fds);
int messaging_dgm_cleanup(pid_t pid);
int messaging_dgm_wipe(void);
void *messaging_dgm_register_tevent_context(TALLOC_CTX *mem_ctx,