summaryrefslogtreecommitdiff
path: root/source4/lib/ldb
diff options
context:
space:
mode:
authorKamen Mazdrashki <kamenim@samba.org>2010-07-16 14:03:53 +0300
committerAndrew Bartlett <abartlet@samba.org>2010-07-19 17:33:35 +1000
commitd71b20e8dc9d8e8366ffb5147c84586f5d71416e (patch)
tree32be9b1e0e1ed08eabe969436b099bc2236fd399 /source4/lib/ldb
parent2ad701911e2bd5d4cdc5d5db64449f3cc01df3cd (diff)
downloadsamba-d71b20e8dc9d8e8366ffb5147c84586f5d71416e.tar.gz
samba-d71b20e8dc9d8e8366ffb5147c84586f5d71416e.tar.bz2
samba-d71b20e8dc9d8e8366ffb5147c84586f5d71416e.zip
s4-dsdb: use ldb_msg_normalize() in ldbadd-process_file()
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r--source4/lib/ldb/tools/ldbadd.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source4/lib/ldb/tools/ldbadd.c b/source4/lib/ldb/tools/ldbadd.c
index e057b873a8..fd05d8fa7f 100644
--- a/source4/lib/ldb/tools/ldbadd.c
+++ b/source4/lib/ldb/tools/ldbadd.c
@@ -68,7 +68,15 @@ static int process_file(struct ldb_context *ldb, FILE *f, unsigned int *count)
break;
}
- ldif->msg = ldb_msg_canonicalize(ldb, ldif->msg);
+ ret = ldb_msg_normalize(ldb, ldif, ldif->msg, &ldif->msg);
+ if (ret != LDB_SUCCESS) {
+ fprintf(stderr,
+ "ERR: Message canonicalize failed - %s\n",
+ ldb_strerror(ret));
+ failures++;
+ ldb_ldif_read_free(ldb, ldif);
+ continue;
+ }
ret = ldb_add_ctrl(ldb, ldif->msg,req_ctrls);
if (ret != LDB_SUCCESS) {