summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/tools
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/tools')
-rw-r--r--source4/lib/ldb/tools/ldbadd.c4
-rw-r--r--source4/lib/ldb/tools/ldbdel.c3
-rw-r--r--source4/lib/ldb/tools/ldbedit.c4
-rw-r--r--source4/lib/ldb/tools/ldbmodify.c4
-rw-r--r--source4/lib/ldb/tools/ldbsearch.c2
5 files changed, 9 insertions, 8 deletions
diff --git a/source4/lib/ldb/tools/ldbadd.c b/source4/lib/ldb/tools/ldbadd.c
index a45021c1d9..9383197ed0 100644
--- a/source4/lib/ldb/tools/ldbadd.c
+++ b/source4/lib/ldb/tools/ldbadd.c
@@ -55,7 +55,7 @@ static int process_file(struct ldb_context *ldb, FILE *f)
struct ldb_ldif *ldif;
int ret, count=0;
- while ((ldif = ldif_read_file(ldb, f))) {
+ while ((ldif = ldb_ldif_read_file(ldb, f))) {
if (ldif->changetype != LDB_CHANGETYPE_ADD &&
ldif->changetype != LDB_CHANGETYPE_NONE) {
fprintf(stderr, "Only CHANGETYPE_ADD records allowed\n");
@@ -70,7 +70,7 @@ static int process_file(struct ldb_context *ldb, FILE *f)
} else {
count++;
}
- ldif_read_free(ldb, ldif);
+ ldb_ldif_read_free(ldb, ldif);
}
return count;
diff --git a/source4/lib/ldb/tools/ldbdel.c b/source4/lib/ldb/tools/ldbdel.c
index 880713b25a..2977357ced 100644
--- a/source4/lib/ldb/tools/ldbdel.c
+++ b/source4/lib/ldb/tools/ldbdel.c
@@ -90,7 +90,8 @@ static void usage(void)
for (i=0;i<argc;i++) {
ret = ldb_delete(ldb, argv[i]);
if (ret != 0) {
- printf("delete of '%s' failed\n", argv[i]);
+ printf("delete of '%s' failed - %s\n",
+ argv[i], ldb_errstring(ldb));
}
}
diff --git a/source4/lib/ldb/tools/ldbedit.c b/source4/lib/ldb/tools/ldbedit.c
index 7e41702422..f8e0fbb68a 100644
--- a/source4/lib/ldb/tools/ldbedit.c
+++ b/source4/lib/ldb/tools/ldbedit.c
@@ -173,7 +173,7 @@ static int save_ldif(struct ldb_context *ldb,
ldif.changetype = LDB_CHANGETYPE_NONE;
ldif.msg = *msgs[i];
- ldif_write_file(ldb, f, &ldif);
+ ldb_ldif_write_file(ldb, f, &ldif);
}
return 0;
@@ -243,7 +243,7 @@ static int do_edit(struct ldb_context *ldb, struct ldb_message **msgs1, int coun
return -1;
}
- while ((ldif = ldif_read_file(ldb, f))) {
+ while ((ldif = ldb_ldif_read_file(ldb, f))) {
msgs2 = ldb_realloc_p(ldb, msgs2, struct ldb_message *, count2+1);
if (!msgs2) {
fprintf(stderr, "out of memory");
diff --git a/source4/lib/ldb/tools/ldbmodify.c b/source4/lib/ldb/tools/ldbmodify.c
index 828b7d4865..b6ca2993ce 100644
--- a/source4/lib/ldb/tools/ldbmodify.c
+++ b/source4/lib/ldb/tools/ldbmodify.c
@@ -54,7 +54,7 @@ static int process_file(struct ldb_context *ldb, FILE *f)
struct ldb_ldif *ldif;
int ret = -1, count = 0;
- while ((ldif = ldif_read_file(ldb, f))) {
+ while ((ldif = ldb_ldif_read_file(ldb, f))) {
switch (ldif->changetype) {
case LDB_CHANGETYPE_NONE:
case LDB_CHANGETYPE_ADD:
@@ -74,7 +74,7 @@ static int process_file(struct ldb_context *ldb, FILE *f)
} else {
count++;
}
- ldif_read_free(ldb, ldif);
+ ldb_ldif_read_free(ldb, ldif);
}
return count;
diff --git a/source4/lib/ldb/tools/ldbsearch.c b/source4/lib/ldb/tools/ldbsearch.c
index 478601ec7e..137299d89b 100644
--- a/source4/lib/ldb/tools/ldbsearch.c
+++ b/source4/lib/ldb/tools/ldbsearch.c
@@ -69,7 +69,7 @@ static int do_search(struct ldb_context *ldb,
ldif.changetype = LDB_CHANGETYPE_NONE;
ldif.msg = *msgs[i];
- ldif_write_file(ldb, stdout, &ldif);
+ ldb_ldif_write_file(ldb, stdout, &ldif);
}
if (ret > 0) {