summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/include
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-06-14 01:35:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:18:08 -0500
commit4fec6356ea190d202783fe19013387462a22c441 (patch)
tree7c36a84ebd98b7d48d4613619218c5c557392f54 /source4/lib/ldb/include
parentf29b9278bb782b48c4f31dd7d42dc530ce598969 (diff)
downloadsamba-4fec6356ea190d202783fe19013387462a22c441.tar.gz
samba-4fec6356ea190d202783fe19013387462a22c441.tar.bz2
samba-4fec6356ea190d202783fe19013387462a22c441.zip
r7558: added support in ldb for extended ldap search requests. These are
using to perform such things as bitop tests on integers. So far I have only added support for the 1.2.840.113556.1.4.803 and 1.2.840.113556.1.4.804 rules, which are for bitwise and/or (This used to be commit 5f773b065f1db959e59c02de68bcf30cef1a6c2c)
Diffstat (limited to 'source4/lib/ldb/include')
-rw-r--r--source4/lib/ldb/include/ldb.h9
-rw-r--r--source4/lib/ldb/include/ldb_private.h4
2 files changed, 12 insertions, 1 deletions
diff --git a/source4/lib/ldb/include/ldb.h b/source4/lib/ldb/include/ldb.h
index 02df0ae810..5773e39fa9 100644
--- a/source4/lib/ldb/include/ldb.h
+++ b/source4/lib/ldb/include/ldb.h
@@ -146,7 +146,8 @@ struct ldb_debug_ops {
/* structues for ldb_parse_tree handling code */
-enum ldb_parse_op {LDB_OP_SIMPLE=1, LDB_OP_AND='&', LDB_OP_OR='|', LDB_OP_NOT='!'};
+enum ldb_parse_op {LDB_OP_SIMPLE=1, LDB_OP_EXTENDED=2,
+ LDB_OP_AND='&', LDB_OP_OR='|', LDB_OP_NOT='!'};
struct ldb_parse_tree {
enum ldb_parse_op operation;
@@ -156,6 +157,12 @@ struct ldb_parse_tree {
struct ldb_val value;
} simple;
struct {
+ char *attr;
+ int dnAttributes;
+ char *rule_id;
+ struct ldb_val value;
+ } extended;
+ struct {
unsigned int num_elements;
struct ldb_parse_tree **elements;
} list;
diff --git a/source4/lib/ldb/include/ldb_private.h b/source4/lib/ldb/include/ldb_private.h
index 414d8c14a1..e022d68ec7 100644
--- a/source4/lib/ldb/include/ldb_private.h
+++ b/source4/lib/ldb/include/ldb_private.h
@@ -82,6 +82,10 @@ struct ldb_context {
/* the modules init function */
typedef struct ldb_module *(*ldb_module_init_function)(struct ldb_context *ldb, const char *options[]);
+#ifndef ARRAY_SIZE
+#define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))
+#endif
+
/* The following definitions come from lib/ldb/common/ldb_modules.c */
int ldb_load_modules(struct ldb_context *ldb, const char *options[]);