summaryrefslogtreecommitdiffstats
path: root/server/providers/child_common.h
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2009-12-18 10:23:41 -0500
committerStephen Gallagher <sgallagh@redhat.com>2009-12-18 15:41:30 -0500
commitbb78a286dbc90d248bd7a9d29344de87051920f2 (patch)
tree79dc659b368e88e7fe247fe535fc48b83862d50e /server/providers/child_common.h
parent6b94e84a0455ebb68506e70cf8ccc2a4656a2c91 (diff)
downloadsssd-bb78a286dbc90d248bd7a9d29344de87051920f2.tar.gz
sssd-bb78a286dbc90d248bd7a9d29344de87051920f2.tar.xz
sssd-bb78a286dbc90d248bd7a9d29344de87051920f2.zip
Fix ldap child memory hierarchy and other issues
The timeout handler was not a child of the request so it could fire even though the request was already freed. The code wouldn't use async writes to the children so it could incur in a short write with no way to detect or recover from it. Also fixed style of some helper functions to pass explicit paramters instead of a general structure. Add common code to do async writes to pipes. Fixed async write issue for the krb5_child as well. Fix also sdap_kinit_done(), a return statement was missing and we were mixing SDAP_AUTH and errno return codes in state->result Remove usless helper function that just replicates talloc_strndup()
Diffstat (limited to 'server/providers/child_common.h')
-rw-r--r--server/providers/child_common.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/server/providers/child_common.h b/server/providers/child_common.h
index 894255b57..a441df3c5 100644
--- a/server/providers/child_common.h
+++ b/server/providers/child_common.h
@@ -46,15 +46,14 @@ struct io_buffer {
size_t size;
};
-uint8_t *copy_buffer_and_add_zero(TALLOC_CTX *mem_ctx,
- const uint8_t *src, size_t len);
-
/* Async communication with the child process via a pipe */
-struct read_pipe_state;
+struct tevent_req *write_pipe_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ uint8_t *buf, size_t len, int fd);
+int write_pipe_recv(struct tevent_req *req);
struct tevent_req *read_pipe_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev, int fd);
-
int read_pipe_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
uint8_t **buf, ssize_t *len);