diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2009-04-27 08:18:06 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2009-04-27 16:30:27 -0400 |
commit | f7e32651e7dac302c941b16caa137c0c501e70bd (patch) | |
tree | 8ef26e2aaaba3739c5bb31051b91fd3c6c67941c | |
parent | 4e0c3d5ee856dfc2568d4348fc48a9eb975c66f6 (diff) | |
download | sssd-f7e32651e7dac302c941b16caa137c0c501e70bd.tar.gz sssd-f7e32651e7dac302c941b16caa137c0c501e70bd.tar.bz2 sssd-f7e32651e7dac302c941b16caa137c0c501e70bd.zip |
Eliminate segfault on NSS and PAM responder startup.
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.
-rw-r--r-- | server/responder/common/responder_common.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/server/responder/common/responder_common.c b/server/responder/common/responder_common.c index 50cda623..52be7806 100644 --- a/server/responder/common/responder_common.c +++ b/server/responder/common/responder_common.c @@ -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) { |