Skip to content

Commit

Permalink
Eliminate segfault on NSS and PAM responder startup.
Browse files Browse the repository at this point in the history
If the data provider is not yet available when NSS and PAM start,
they will generate a segmentation fault when trying to configure
their automatic reconnection to the Data Provider. I've now added
code in sss_dp_init() to detect whether the dp_ctx is NULL and
return EIO.
  • Loading branch information
sgallagher committed Apr 27, 2009
1 parent 4e0c3d5 commit f7e3265
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/responder/common/responder_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,10 @@ int sss_process_init(TALLOC_CTX *mem_ctx,
DEBUG(0, ("fatal error setting up backend connector\n"));
return ret;
}
else if (!rctx->dp_ctx) {
DEBUG(0, ("Data Provider is not yet available. Retrying.\n"));
return EIO;
}

ret = sysdb_init(rctx, ev, cdb, NULL, &rctx->sysdb);
if (ret != EOK) {
Expand Down

0 comments on commit f7e3265

Please sign in to comment.