summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/tools/ldbdel.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/tools/ldbdel.c')
-rw-r--r--source4/lib/ldb/tools/ldbdel.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/lib/ldb/tools/ldbdel.c b/source4/lib/ldb/tools/ldbdel.c
index 94f1da9903..b4da806b51 100644
--- a/source4/lib/ldb/tools/ldbdel.c
+++ b/source4/lib/ldb/tools/ldbdel.c
@@ -36,7 +36,7 @@
#include "ldb/include/includes.h"
#include "ldb/tools/cmdline.h"
-static int ldb_delete_recursive(struct ldb_context *ldb, const struct ldb_dn *dn)
+static int ldb_delete_recursive(struct ldb_context *ldb, struct ldb_dn *dn)
{
int ret, i, total=0;
const char *attrs[] = { NULL };
@@ -91,10 +91,10 @@ int main(int argc, const char **argv)
}
for (i=0;i<options->argc;i++) {
- const struct ldb_dn *dn;
+ struct ldb_dn *dn;
- dn = ldb_dn_explode(ldb, options->argv[i]);
- if (dn == NULL) {
+ dn = ldb_dn_new(ldb, ldb, options->argv[i]);
+ if ( ! ldb_dn_validate(dn)) {
printf("Invalid DN format\n");
exit(1);
}