1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-10 13:57:47 +03:00

s4-ldb: display an error if we can't decode a NDR blob

This commit is contained in:
Andrew Tridgell 2009-09-19 18:41:22 -07:00
parent ad53c34b6b
commit 8fd6ce613a

View File

@ -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);