summaryrefslogtreecommitdiffstats
path: root/server/responder/nss/nsssrv_dp.c
diff options
context:
space:
mode:
Diffstat (limited to 'server/responder/nss/nsssrv_dp.c')
-rw-r--r--server/responder/nss/nsssrv_dp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/server/responder/nss/nsssrv_dp.c b/server/responder/nss/nsssrv_dp.c
index 0668a5b5f..b2e15df3a 100644
--- a/server/responder/nss/nsssrv_dp.c
+++ b/server/responder/nss/nsssrv_dp.c
@@ -142,6 +142,15 @@ int nss_dp_send_acct_req(struct resp_ctx *rctx, TALLOC_CTX *memctx,
return ENOMEM;
}
+ /* double check dp_ctx has actually been initialized.
+ * in some pathological cases it may happen that nss starts up before
+ * dp connection code is actually able to establish a connection.
+ */
+ if (!rctx->dp_ctx) {
+ DEBUG(1, ("The Data Provider connection is not available yet!"
+ " This maybe a bug, it shouldn't happen!\n"));
+ return EIO;
+ }
conn = sbus_get_connection(rctx->dp_ctx->scon_ctx);
/* create the message */