diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2013-06-24 10:46:53 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-06-24 15:17:20 +0200 |
commit | 3438815242464a963c0d3a70f16579723a20b52d (patch) | |
tree | d70ff70587fc0d0a062d9c988026e1396b31eda5 /src/providers | |
parent | 5e0da22f4dcc7157233e0dd4efc67bc7d217f163 (diff) | |
download | sssd-3438815242464a963c0d3a70f16579723a20b52d.tar.gz sssd-3438815242464a963c0d3a70f16579723a20b52d.tar.bz2 sssd-3438815242464a963c0d3a70f16579723a20b52d.zip |
LDAP: Retry SID search based on result of LDAP search, not the return code
Diffstat (limited to 'src/providers')
-rw-r--r-- | src/providers/ldap/ldap_id.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/providers/ldap/ldap_id.c b/src/providers/ldap/ldap_id.c index 1f3704d5..d76a81a3 100644 --- a/src/providers/ldap/ldap_id.c +++ b/src/providers/ldap/ldap_id.c @@ -1472,14 +1472,25 @@ static void get_user_and_group_users_done(struct tevent_req *subreq) struct get_user_and_group_state); int ret; - ret = users_get_recv(subreq, &state->dp_error, NULL); + ret = users_get_recv(subreq, &state->dp_error, &state->sdap_ret); talloc_zfree(subreq); - if (ret == EOK) { /* Matching user found */ + if (ret != EOK) { /* Fatal error while looking up user */ + tevent_req_error(req, ret); + return; + } + + if (state->sdap_ret == EOK) { /* Matching user found */ tevent_req_done(req); return; + } else if (state->sdap_ret != ENOENT) { + tevent_req_error(req, EIO); + return; } + /* Now the search finished fine but did not find an entry. + * Retry with groups. */ + subreq = groups_get_send(req, state->ev, state->id_ctx, state->sdom, state->conn, state->filter_val, state->filter_type, |