diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2010-05-06 11:23:23 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2010-05-07 16:38:21 -0400 |
commit | a076b249f6263c74fe78b509225f59c8adc74188 (patch) | |
tree | fca62a2f47397aeb8ecc1e8bc40b7310714ac009 /src/providers/ldap/ldap_id_enum.c | |
parent | b4283f03ddf1a73b7da790751ee10953109bb922 (diff) | |
download | sssd-a076b249f6263c74fe78b509225f59c8adc74188.tar.gz sssd-a076b249f6263c74fe78b509225f59c8adc74188.tar.xz sssd-a076b249f6263c74fe78b509225f59c8adc74188.zip |
Fix segfault in GSSAPI reconnect code
Also clean up some duplicated code into a single common routine
sdap_account_info_common_done()
Diffstat (limited to 'src/providers/ldap/ldap_id_enum.c')
-rw-r--r-- | src/providers/ldap/ldap_id_enum.c | 8 |
1 files changed, 6 insertions, 2 deletions
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; } |