summaryrefslogtreecommitdiffstats
path: root/src/providers/ipa
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2013-08-30 10:56:04 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-08-30 14:14:35 +0200
commit0e9563e10a023092b6086a673a266323e9b1d603 (patch)
treedac5982a696d32dd451a99d40bdc63c9ef7fcdb3 /src/providers/ipa
parent3dc0400cf25f23b4947340ca591e4a15b89ca331 (diff)
downloadsssd-0e9563e10a023092b6086a673a266323e9b1d603.tar.gz
sssd-0e9563e10a023092b6086a673a266323e9b1d603.tar.xz
sssd-0e9563e10a023092b6086a673a266323e9b1d603.zip
SIGCHLD handler: do not call callback when pvt data was freed
https://fedorahosted.org/sssd/ticket/1992
Diffstat (limited to 'src/providers/ipa')
-rw-r--r--src/providers/ipa/ipa_dyndns.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/providers/ipa/ipa_dyndns.c b/src/providers/ipa/ipa_dyndns.c
index 22a16a11a..a3d358ec2 100644
--- a/src/providers/ipa/ipa_dyndns.c
+++ b/src/providers/ipa/ipa_dyndns.c
@@ -860,6 +860,7 @@ failed:
struct nsupdate_send_ctx {
struct ipa_nsupdate_ctx *nsupdate_ctx;
+ struct sss_child_ctx_old *child_ctx;
int child_status;
};
@@ -1105,7 +1106,8 @@ fork_nsupdate_send(struct ipa_nsupdate_ctx *ctx)
/* Set up SIGCHLD handler */
ret = child_handler_setup(ctx->dyndns_ctx->ipa_ctx->id_ctx->sdap_id_ctx->be->ev,
- pid, ipa_dyndns_child_handler, req);
+ pid, ipa_dyndns_child_handler, req,
+ &state->child_ctx);
if (ret != EOK) {
return NULL;
}
@@ -1135,9 +1137,15 @@ static void ipa_dyndns_timeout(struct tevent_context *ev,
{
struct tevent_req *req =
talloc_get_type(pvt, struct tevent_req);
+ struct nsupdate_send_ctx *state =
+ tevent_req_data(req, struct nsupdate_send_ctx);
DEBUG(1, ("Timeout reached for dynamic DNS update\n"));
+ child_handler_destroy(state->child_ctx);
+ state->child_ctx = NULL;
+ state->child_status = ETIMEDOUT;
+
tevent_req_error(req, ETIMEDOUT);
}