From 9e99e3c5c45b20189e76e4d2546966ff1fb3ce40 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Thu, 6 May 2010 11:23:23 -0400 Subject: Fix segfault in GSSAPI reconnect code Also clean up some duplicated code into a single common routine sdap_account_info_common_done() --- src/providers/ldap/ldap_id_enum.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/providers/ldap/ldap_id_enum.c') diff --git a/src/providers/ldap/ldap_id_enum.c b/src/providers/ldap/ldap_id_enum.c index d86b38d0f..89ca2de7a 100644 --- a/src/providers/ldap/ldap_id_enum.c +++ b/src/providers/ldap/ldap_id_enum.c @@ -234,7 +234,9 @@ fail: (int)err, strerror(err))); if (sdap_check_gssapi_reconnect(state->ctx)) { - state->ctx->gsh->connected = false; + if (state->ctx->gsh) { + state->ctx->gsh->connected = false; + } ret = ldap_id_enum_users_restart(req); if (ret == EOK) return; } @@ -282,7 +284,9 @@ static void ldap_id_enum_groups_done(struct tevent_req *subreq) fail: /* check if credentials are expired otherwise go offline on failures */ if (sdap_check_gssapi_reconnect(state->ctx)) { - state->ctx->gsh->connected = false; + if (state->ctx->gsh) { + state->ctx->gsh->connected = false; + } ret = ldap_id_enum_groups_restart(req); if (ret == EOK) return; } -- cgit