summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/include
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/include')
-rw-r--r--source4/lib/ldb/include/ldb.h14
-rw-r--r--source4/lib/ldb/include/ldb_private.h13
2 files changed, 18 insertions, 9 deletions
diff --git a/source4/lib/ldb/include/ldb.h b/source4/lib/ldb/include/ldb.h
index b2468b6ecb..8233e78f0e 100644
--- a/source4/lib/ldb/include/ldb.h
+++ b/source4/lib/ldb/include/ldb.h
@@ -154,7 +154,8 @@ struct ldb_debug_ops {
/* structues for ldb_parse_tree handling code */
-enum ldb_parse_op {LDB_OP_SIMPLE=1, LDB_OP_EXTENDED=2,
+enum ldb_parse_op {LDB_OP_SIMPLE=1, LDB_OP_EXTENDED=2,
+ LDB_OP_SUBSTRING=3, LDB_OP_PRESENT=4,
LDB_OP_AND='&', LDB_OP_OR='|', LDB_OP_NOT='!'};
struct ldb_parse_tree {
@@ -166,6 +167,15 @@ struct ldb_parse_tree {
} simple;
struct {
char *attr;
+ } present;
+ struct {
+ char *attr;
+ int start_with_wildcard;
+ int end_with_wildcard;
+ struct ldb_val **chunks;
+ } substring;
+ struct {
+ char *attr;
int dnAttributes;
char *rule_id;
struct ldb_val value;
@@ -211,14 +221,12 @@ struct ldb_attrib_handler {
};
#define LDB_ATTR_FLAG_HIDDEN (1<<0)
-#define LDB_ATTR_FLAG_WILDCARD (1<<1)
/* well-known ldap attribute syntaxes - see rfc2252 section 4.3.2 */
#define LDB_SYNTAX_DN "1.3.6.1.4.1.1466.115.121.1.12"
#define LDB_SYNTAX_DIRECTORY_STRING "1.3.6.1.4.1.1466.115.121.1.15"
#define LDB_SYNTAX_INTEGER "1.3.6.1.4.1.1466.115.121.1.27"
#define LDB_SYNTAX_OCTET_STRING "1.3.6.1.4.1.1466.115.121.1.40"
-#define LDB_SYNTAX_WILDCARD "LDB_SYNTAX_WILDCARD"
#define LDB_SYNTAX_OBJECTCLASS "LDB_SYNTAX_OBJECTCLASS"
/*
diff --git a/source4/lib/ldb/include/ldb_private.h b/source4/lib/ldb/include/ldb_private.h
index 1d7d453767..da813eb588 100644
--- a/source4/lib/ldb/include/ldb_private.h
+++ b/source4/lib/ldb/include/ldb_private.h
@@ -175,11 +175,11 @@ struct ldb_module *schema_module_init(struct ldb_context *ldb, const char *optio
const struct ldb_attrib_handler *ldb_attrib_handler(struct ldb_context *ldb,
const char *attrib);
-int ldb_match_message(struct ldb_context *ldb,
- struct ldb_message *msg,
- struct ldb_parse_tree *tree,
- const char *base,
- enum ldb_scope scope);
+int ldb_match_msg(struct ldb_context *ldb,
+ struct ldb_message *msg,
+ struct ldb_parse_tree *tree,
+ const char *base,
+ enum ldb_scope scope);
void ldb_remove_attrib_handler(struct ldb_context *ldb, const char *attrib);
const struct ldb_attrib_handler *ldb_attrib_handler_syntax(struct ldb_context *ldb,
@@ -193,9 +193,10 @@ int ldb_setup_wellknown_attributes(struct ldb_context *ldb);
/* The following definitions come from lib/ldb/common/ldb_dn.c */
struct ldb_dn *ldb_dn_explode(void *mem_ctx, const char *dn);
char *ldb_dn_linearize(void *mem_ctx, const struct ldb_dn *edn);
+int ldb_dn_compare_base(struct ldb_context *ldb, const struct ldb_dn *base, const struct ldb_dn *dn);
int ldb_dn_compare(struct ldb_context *ldb, const struct ldb_dn *edn0, const struct ldb_dn *edn1);
struct ldb_dn *ldb_dn_casefold(struct ldb_context *ldb, const struct ldb_dn *edn);
-
+struct ldb_dn *ldb_dn_explode_casefold(struct ldb_context *ldb, const char *dn);
/* The following definitions come from lib/ldb/common/ldb_attributes.c */
const char **ldb_subclass_list(struct ldb_context *ldb, const char *class);