From e5c70a58873d5f274ec38d85884e0e76bbbaa291 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 13 Jun 2005 06:52:48 +0000 Subject: r7522: added a ldb_filter_from_tree() function that takes a ldb_parse_tree and forms a ldab search filter expression. Next step is to make our ldap server code go from ASN.1 to a ldb_parse_tree, instead of trying to construct string filters, then add a ldb_search_tree() call to allow for searches using parse trees. all of this is being done as I am hitting bitwise '&' ldap search expressions from w2k, and want to handle them cleanly. (This used to be commit 04356c1b1ed86d72934bc1b0ed60b767e10a1196) --- source4/lib/ldb/include/ldb_parse.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source4/lib/ldb/include') diff --git a/source4/lib/ldb/include/ldb_parse.h b/source4/lib/ldb/include/ldb_parse.h index 741a8af618..c8d89d2165 100644 --- a/source4/lib/ldb/include/ldb_parse.h +++ b/source4/lib/ldb/include/ldb_parse.h @@ -35,7 +35,7 @@ #ifndef _LDB_PARSE_H #define _LDB_PARSE_H 1 -enum ldb_parse_op {LDB_OP_SIMPLE, LDB_OP_AND, LDB_OP_OR, LDB_OP_NOT}; +enum ldb_parse_op {LDB_OP_SIMPLE=1, LDB_OP_AND='&', LDB_OP_OR='|', LDB_OP_NOT='!'}; struct ldb_parse_tree { enum ldb_parse_op operation; @@ -55,6 +55,7 @@ struct ldb_parse_tree { }; struct ldb_parse_tree *ldb_parse_tree(TALLOC_CTX *mem_ctx, const char *s); -const char *ldb_binary_encode(TALLOC_CTX *ctx, struct ldb_val val); +char *ldb_filter_from_tree(TALLOC_CTX *mem_ctx, struct ldb_parse_tree *tree); +char *ldb_binary_encode(TALLOC_CTX *ctx, struct ldb_val val); #endif -- cgit