summaryrefslogtreecommitdiffstats
path: root/src/providers/ipa/ipa_dyndns.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/providers/ipa/ipa_dyndns.c')
-rw-r--r--src/providers/ipa/ipa_dyndns.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/providers/ipa/ipa_dyndns.c b/src/providers/ipa/ipa_dyndns.c
index 7217c6145..dc910770c 100644
--- a/src/providers/ipa/ipa_dyndns.c
+++ b/src/providers/ipa/ipa_dyndns.c
@@ -162,6 +162,26 @@ ipa_dyndns_update_send(struct ipa_options *ctx)
}
state->ipa_ctx = ctx;
+ /* The following three checks are here to prevent SEGFAULT
+ * from ticket #3076. */
+ if (ctx->service == NULL) {
+ DEBUG(SSSDBG_CRIT_FAILURE, "service structure not initialized\n");
+ ret = EINVAL;
+ goto done;
+ }
+
+ if (ctx->service->sdap == NULL) {
+ DEBUG(SSSDBG_CRIT_FAILURE, "sdap structure not initialized\n");
+ ret = EINVAL;
+ goto done;
+ }
+
+ if (ctx->service->sdap->uri == NULL) {
+ DEBUG(SSSDBG_CRIT_FAILURE, "LDAP uri not set\n");
+ ret = EINVAL;
+ goto done;
+ }
+
if (ctx->dyndns_ctx->last_refresh + 60 > time(NULL) ||
ctx->dyndns_ctx->timer_in_progress) {
DEBUG(SSSDBG_FUNC_DATA, "Last periodic update ran recently or timer "