From 29ba7765d90eda0b3d0f45f7a970272f0ef2ab2f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 8 Sep 2009 20:57:31 +1000 Subject: s4/ldb: added --show-binary command line option This add --show-binary to ldbsearch. When this flag is set, binary blobs will be shown as-is, instead of base64 encoded. This is useful for some XML encoded attributes, and will also be used as part of some NDR print formatting for attributes like repsTo. --- source4/lib/ldb/include/ldb.h | 6 ++++++ source4/lib/ldb/include/ldb_module.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'source4/lib/ldb/include') diff --git a/source4/lib/ldb/include/ldb.h b/source4/lib/ldb/include/ldb.h index f38dc8f227..b75d63b848 100644 --- a/source4/lib/ldb/include/ldb.h +++ b/source4/lib/ldb/include/ldb.h @@ -240,6 +240,12 @@ struct ldb_utf8_fns { */ #define LDB_FLG_NOMMAP 8 +/** + Flag to tell ldif handlers not to force encoding of binary + structures in base64 +*/ +#define LDB_FLG_SHOW_BINARY 16 + /* structures for ldb_parse_tree handling code */ diff --git a/source4/lib/ldb/include/ldb_module.h b/source4/lib/ldb/include/ldb_module.h index 1d6329ca2f..199c0bb40d 100644 --- a/source4/lib/ldb/include/ldb_module.h +++ b/source4/lib/ldb/include/ldb_module.h @@ -102,7 +102,7 @@ int save_controls(struct ldb_control *exclude, struct ldb_request *req, struct l int check_critical_controls(struct ldb_control **controls); /* The following definitions come from lib/ldb/common/ldb_ldif.c */ -int ldb_should_b64_encode(const struct ldb_val *val); +int ldb_should_b64_encode(struct ldb_context *ldb, const struct ldb_val *val); /* The following definitions come from lib/ldb/common/ldb_match.c */ int ldb_match_msg(struct ldb_context *ldb, -- cgit