summaryrefslogtreecommitdiff
path: root/src/providers
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-05-04 16:52:49 +0200
committerStephen Gallagher <sgallagh@redhat.com>2012-05-07 14:35:49 -0400
commit4627cf4d8a949d1d7b4a9b24f9ad3b9a06d5b5bc (patch)
tree40646f58064bb02519c1570f6d657fc8f3eebfed /src/providers
parent7efbb82f43d5b7c17c4f7a4bfc363e6bf0291281 (diff)
downloadsssd-4627cf4d8a949d1d7b4a9b24f9ad3b9a06d5b5bc.tar.gz
sssd-4627cf4d8a949d1d7b4a9b24f9ad3b9a06d5b5bc.tar.bz2
sssd-4627cf4d8a949d1d7b4a9b24f9ad3b9a06d5b5bc.zip
Special-case LDAP_SIZELIMIT_EXCEEDED
Previous version of the SSSD did not abort the async LDAP search operation on errors. In cases where the request ended in progress, such as when the paging was very strictly limited, the old versions at least returned partial data. This patch special-cases the LDAP_SIZELIMIT_EXCEEDED error to avoid a user-visible regression. https://fedorahosted.org/sssd/ticket/1322
Diffstat (limited to 'src/providers')
-rw-r--r--src/providers/ldap/sdap_async.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/providers/ldap/sdap_async.c b/src/providers/ldap/sdap_async.c
index fb5c8902..d505772c 100644
--- a/src/providers/ldap/sdap_async.c
+++ b/src/providers/ldap/sdap_async.c
@@ -1288,10 +1288,15 @@ static void sdap_get_generic_ext_done(struct sdap_op *op,
sss_ldap_err2string(result), result,
errmsg ? errmsg : "no errmsg set"));
- if (result != LDAP_SUCCESS && result != LDAP_NO_SUCH_OBJECT) {
- DEBUG(2, ("Unexpected result from ldap: %s(%d), %s\n",
- sss_ldap_err2string(result), result,
- errmsg ? errmsg : "no errmsg set"));
+ if (result == LDAP_SIZELIMIT_EXCEEDED) {
+ /* Try to return what we've got */
+ DEBUG(SSSDBG_MINOR_FAILURE,
+ ("LDAP sizelimit was exceeded, returning incomplete data\n"));
+ } else if (result != LDAP_SUCCESS && result != LDAP_NO_SUCH_OBJECT) {
+ DEBUG(SSSDBG_OP_FAILURE,
+ ("Unexpected result from ldap: %s(%d), %s\n",
+ sss_ldap_err2string(result), result,
+ errmsg ? errmsg : "no errmsg set"));
ldap_memfree(errmsg);
tevent_req_error(req, EIO);
return;