struct ldb_context *ldb;
unsigned int i, count = 0;
int ret=0;
+ TALLOC_CTX *mem_ctx = talloc_new(NULL);
- ldb = ldb_init(NULL, NULL);
+ ldb = ldb_init(mem_ctx, NULL);
options = ldb_cmdline_process(ldb, argc, argv, usage);
ldb_transaction_cancel(ldb);
}
- talloc_free(ldb);
+ talloc_free(mem_ctx);
printf("Added %d records with %d failures\n", count, failures);
struct ldb_cmdline *options;
struct ldb_context *ldb;
int ret = 0, i;
+ TALLOC_CTX *mem_ctx = talloc_new(NULL);
- ldb = ldb_init(NULL, NULL);
+ ldb = ldb_init(mem_ctx, NULL);
options = ldb_cmdline_process(ldb, argc, argv, usage);
}
}
- talloc_free(ldb);
+ talloc_free(mem_ctx);
return ret;
}
int ret;
const char *expression = "(|(objectClass=*)(distinguishedName=*))";
const char * const * attrs = NULL;
+ TALLOC_CTX *mem_ctx = talloc_new(NULL);
- ldb = ldb_init(NULL, NULL);
+ ldb = ldb_init(mem_ctx, NULL);
options = ldb_cmdline_process(ldb, argc, argv, usage);
}
}
- talloc_free(ldb);
+ talloc_free(mem_ctx);
+
return 0;
}
struct ldb_context *ldb;
int count=0;
int i, ret=LDB_SUCCESS;
+ TALLOC_CTX *mem_ctx = talloc_new(NULL);
- ldb = ldb_init(NULL, NULL);
+ ldb = ldb_init(mem_ctx, NULL);
options = ldb_cmdline_process(ldb, argc, argv, usage);
}
}
- talloc_free(ldb);
+ talloc_free(mem_ctx);
printf("Modified %d records with %d failures\n", count, failures);
int ret;
struct ldb_cmdline *options;
struct ldb_dn *dn1, *dn2;
+ TALLOC_CTX *mem_ctx = talloc_new(NULL);
- ldb = ldb_init(NULL, NULL);
+ ldb = ldb_init(mem_ctx, NULL);
options = ldb_cmdline_process(ldb, argc, argv, usage);
options->argv[0], options->argv[1], ldb_errstring(ldb));
}
- talloc_free(ldb);
+ talloc_free(mem_ctx);
return ret;
}
struct ldb_cmdline *options;
int ret = -1;
const char *expression = "(|(objectClass=*)(distinguishedName=*))";
+ TALLOC_CTX *mem_ctx = talloc_new(NULL);
- ldb = ldb_init(NULL, NULL);
+ ldb = ldb_init(mem_ctx, NULL);
if (ldb == NULL) {
return -1;
}
ret = do_search(ldb, basedn, options, expression, attrs);
}
- talloc_free(ldb);
+ talloc_free(mem_ctx);
+
return ret;
}