1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

messaging3: Move [un]become_root() calls out of messaging_dgm_send()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2014-07-17 11:34:24 +00:00 committed by Jeremy Allison
parent 7c6a6cd5c8
commit 99e288c22b
2 changed files with 3 additions and 2 deletions

View File

@ -471,8 +471,11 @@ NTSTATUS messaging_send_iov(struct messaging_context *msg_ctx,
return NT_STATUS_OK;
}
become_root();
ret = messaging_dgm_send(msg_ctx->local, msg_ctx->id, server, msg_type,
iov, iovlen);
unbecome_root();
if (ret != 0) {
return map_nt_error_from_unix(ret);
}

View File

@ -318,9 +318,7 @@ int messaging_dgm_send(struct messaging_dgm_context *ctx,
iov2[0].iov_len = sizeof(hdr);
memcpy(iov2+1, iov, iovlen*sizeof(struct iovec));
become_root();
ret = unix_msg_send(ctx->dgm_ctx, &dst, iov2, iovlen + 1);
unbecome_root();
return ret;
}