summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-09-19 18:41:22 -0700
committerAndrew Tridgell <tridge@samba.org>2009-09-19 18:41:22 -0700
commit8fd6ce613a4c1b35e1c1435bdd99af96de1d6bdf (patch)
treee17b7b2a4f8bc324c4314e0ddcdc4043ba237841
parentad53c34b6bf7fe0cc51f687ecc46253ea960a089 (diff)
downloadsamba-8fd6ce613a4c1b35e1c1435bdd99af96de1d6bdf.tar.gz
samba-8fd6ce613a4c1b35e1c1435bdd99af96de1d6bdf.tar.bz2
samba-8fd6ce613a4c1b35e1c1435bdd99af96de1d6bdf.zip
s4-ldb: display an error if we can't decode a NDR blob
-rw-r--r--source4/lib/ldb-samba/ldif_handlers.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/lib/ldb-samba/ldif_handlers.c b/source4/lib/ldb-samba/ldif_handlers.c
index 5a60a37da2..d1bdd957ee 100644
--- a/source4/lib/ldb-samba/ldif_handlers.c
+++ b/source4/lib/ldb-samba/ldif_handlers.c
@@ -54,7 +54,9 @@ static int ldif_write_NDR(struct ldb_context *ldb, void *mem_ctx,
p, pull_fn);
if (err != NDR_ERR_SUCCESS) {
talloc_free(p);
- return ldb_handler_copy(ldb, mem_ctx, in, out);
+ out->data = (uint8_t *)talloc_strdup(mem_ctx, "<Unable to decode binary data>");
+ out->length = strlen((const char *)out->data);
+ return 0;
}
out->data = (uint8_t *)ndr_print_struct_string(mem_ctx, print_fn, "NDR", p);
talloc_free(p);