struct ldapsrv_reply *ent_r, *done_r;
struct ldb_context *ldb;
const char *errstr = NULL;
- int count, j, y;
+ int count, j;
const char **attrs = NULL;
if (r->scope != LDAP_SEARCH_SCOPE_BASE) {
*/
static const char *ildb_errstring(struct ldb_module *module)
{
- struct ildb_private *ildb = module->private_data;
+ struct ildb_private *ildb = talloc_get_type(module->private_data,
+ struct ildb_private);
+ if (ildb == NULL) {
+ return "ildap not connected";
+ }
return ldap_errstr(ildb->ldap, ildb->last_rc);
}
return 0;
failed:
+ if (ldb->modules) {
+ ldb->modules->private_data = NULL;
+ }
talloc_free(ildb);
return -1;
}
{
struct ldb_context *ldb;
int count=0;
- int i, ret;
+ int i;
struct ldb_cmdline *options;
ldb = ldb_init(NULL);
{
TALLOC_CTX *mem_ctx = talloc_new(NULL);
struct ldb_context *ldb;
- int ret;
ldb = ldb_init(mem_ctx);