r10641: fixed the error handling on search errors in the ildap backend
authorAndrew Tridgell <tridge@samba.org>
Fri, 30 Sep 2005 03:42:07 +0000 (03:42 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:39:14 +0000 (13:39 -0500)
(This used to be commit e80d42933fe3cbc18cb229e47fffb9ca8068aca5)

source4/lib/ldb/ldb_ildap/ldb_ildap.c

index ffb812acd0b25c6c0507f0d6b9e3a5fcf17bb83e..499ce054d098af4ba378ca3ed127a9334faad62e 100644 (file)
@@ -166,6 +166,7 @@ static int ildb_search(struct ldb_module *module, const struct ldb_dn *base,
                                     0, &ldapres);
        talloc_free(search_base);
        if (!NT_STATUS_IS_OK(ildb->last_rc)) {
+               ldb_set_errstring(module, talloc_strdup(module, ldap_errstr(ildb->ldap, ildb->last_rc)));
                return -1;
        }