diff options
author | Volker Lendecke <vl@samba.org> | 2013-05-16 16:11:54 +0200 |
---|---|---|
committer | Christian Ambach <ambi@samba.org> | 2013-05-17 11:22:45 +0200 |
commit | d67e614a07cbf143293436d380aba9a022c0e31b (patch) | |
tree | 8bbd6a2d278ee96a48761fa5083130080267e888 /lib/async_req/async_sock.h | |
parent | 272a58afff69f52704bcc9a62947853b638420d5 (diff) | |
download | samba-d67e614a07cbf143293436d380aba9a022c0e31b.tar.gz samba-d67e614a07cbf143293436d380aba9a022c0e31b.tar.xz samba-d67e614a07cbf143293436d380aba9a022c0e31b.zip |
lib: Add before/after hooks to async_connect
This will facilitiate [un]become_root for smbd to connect safely to ctdbd.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
Diffstat (limited to 'lib/async_req/async_sock.h')
-rw-r--r-- | lib/async_req/async_sock.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/async_req/async_sock.h b/lib/async_req/async_sock.h index af917bcb836..494b92eb29f 100644 --- a/lib/async_req/async_sock.h +++ b/lib/async_req/async_sock.h @@ -40,10 +40,12 @@ struct tevent_req *recvfrom_send(TALLOC_CTX *mem_ctx, socklen_t *addr_len); ssize_t recvfrom_recv(struct tevent_req *req, int *perrno); -struct tevent_req *async_connect_send(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, - int fd, const struct sockaddr *address, - socklen_t address_len); +struct tevent_req *async_connect_send( + TALLOC_CTX *mem_ctx, struct tevent_context *ev, int fd, + const struct sockaddr *address, socklen_t address_len, + void (*before_connect)(void *private_data), + void (*after_connect)(void *private_data), + void *private_data); int async_connect_recv(struct tevent_req *req, int *perrno); struct tevent_req *writev_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, |