diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-05-05 18:50:56 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:52:00 -0500 |
commit | 52fb06edc25e8538c413df1aaabba18c859a00cf (patch) | |
tree | 20c409c9930232a023ad73672da38f50e29f61c1 /source4/lib/ldb/modules | |
parent | be7eb080fe0a2c44187e693681d3478a3dc0c0ee (diff) | |
download | samba-52fb06edc25e8538c413df1aaabba18c859a00cf.tar.gz samba-52fb06edc25e8538c413df1aaabba18c859a00cf.tar.bz2 samba-52fb06edc25e8538c413df1aaabba18c859a00cf.zip |
r22681: Fix standalone ldb build when parent directory name != ldb.
(This used to be commit 1093875d59f1ea9b8bd82277d4f9d8366e584952)
Diffstat (limited to 'source4/lib/ldb/modules')
-rw-r--r-- | source4/lib/ldb/modules/asq.c | 3 | ||||
-rw-r--r-- | source4/lib/ldb/modules/ldb_map.c | 33 | ||||
-rw-r--r-- | source4/lib/ldb/modules/ldb_map_inbound.c | 13 | ||||
-rw-r--r-- | source4/lib/ldb/modules/ldb_map_outbound.c | 15 | ||||
-rw-r--r-- | source4/lib/ldb/modules/ldb_map_private.h | 6 | ||||
-rw-r--r-- | source4/lib/ldb/modules/objectclass.c | 3 | ||||
-rw-r--r-- | source4/lib/ldb/modules/operational.c | 3 | ||||
-rw-r--r-- | source4/lib/ldb/modules/paged_results.c | 3 | ||||
-rw-r--r-- | source4/lib/ldb/modules/paged_searches.c | 2 | ||||
-rw-r--r-- | source4/lib/ldb/modules/rdn_name.c | 3 | ||||
-rw-r--r-- | source4/lib/ldb/modules/skel.c | 3 | ||||
-rw-r--r-- | source4/lib/ldb/modules/sort.c | 3 |
12 files changed, 42 insertions, 48 deletions
diff --git a/source4/lib/ldb/modules/asq.c b/source4/lib/ldb/modules/asq.c index 0c31727909..f8438d98b8 100644 --- a/source4/lib/ldb/modules/asq.c +++ b/source4/lib/ldb/modules/asq.c @@ -33,8 +33,7 @@ * Author: Simo Sorce */ -#include "includes.h" -#include "ldb/include/includes.h" +#include "ldb_includes.h" struct asq_context { diff --git a/source4/lib/ldb/modules/ldb_map.c b/source4/lib/ldb/modules/ldb_map.c index 6387ffc5b7..0fccbba702 100644 --- a/source4/lib/ldb/modules/ldb_map.c +++ b/source4/lib/ldb/modules/ldb_map.c @@ -34,11 +34,14 @@ * Author: Jelmer Vernooij, Martin Kuehl */ -#include "includes.h" -#include "ldb/include/includes.h" +#include "ldb_includes.h" -#include "ldb/modules/ldb_map.h" -#include "ldb/modules/ldb_map_private.h" +#include "ldb_map.h" +#include "ldb_map_private.h" + +#ifndef _PUBLIC_ +#define _PUBLIC_ +#endif /* Description of the provided ldb requests: - special attribute 'isMapped' @@ -170,15 +173,15 @@ struct ldb_handle *map_init_handle(struct ldb_request *req, struct ldb_module *m * ========================================= */ /* Check whether any data should be stored in the local partition. */ -BOOL map_check_local_db(struct ldb_module *module) +bool map_check_local_db(struct ldb_module *module) { const struct ldb_map_context *data = map_get_context(module); if (!data->remote_base_dn || !data->local_base_dn) { - return False; + return false; } - return True; + return true; } /* Copy a DN with the base DN of the local partition. */ @@ -386,18 +389,18 @@ const struct ldb_map_attribute *map_attr_find_remote(const struct ldb_map_contex * ================== */ /* Check whether an attribute will be mapped into the remote partition. */ -BOOL map_attr_check_remote(const struct ldb_map_context *data, const char *attr) +bool map_attr_check_remote(const struct ldb_map_context *data, const char *attr) { const struct ldb_map_attribute *map = map_attr_find_local(data, attr); if (map == NULL) { - return False; + return false; } if (map->type == MAP_IGNORE) { - return False; + return false; } - return True; + return true; } /* Map an attribute name into the remote partition. */ @@ -489,12 +492,12 @@ struct ldb_val ldb_val_map_remote(struct ldb_module *module, void *mem_ctx, * =========== */ /* Check whether a DN is below the local baseDN. */ -BOOL ldb_dn_check_local(struct ldb_module *module, struct ldb_dn *dn) +bool ldb_dn_check_local(struct ldb_module *module, struct ldb_dn *dn) { const struct ldb_map_context *data = map_get_context(module); if (!data->local_base_dn) { - return True; + return true; } return ldb_dn_compare_base(data->local_base_dn, dn) == 0; @@ -736,7 +739,7 @@ static void map_objectclass_generate_remote(struct ldb_module *module, const cha { struct ldb_message_element *el, *oc; struct ldb_val val; - BOOL found_extensibleObject = False; + bool found_extensibleObject = false; int i; /* Find old local objectClass */ @@ -768,7 +771,7 @@ static void map_objectclass_generate_remote(struct ldb_module *module, const cha for (i = 0; i < el->num_values - 1; i++) { el->values[i] = map_objectclass_convert_local(module, el->values, &oc->values[i]); if (ldb_attr_cmp((char *)el->values[i].data, "extensibleObject") == 0) { - found_extensibleObject = True; + found_extensibleObject = true; } } diff --git a/source4/lib/ldb/modules/ldb_map_inbound.c b/source4/lib/ldb/modules/ldb_map_inbound.c index 7e5583c9e2..9cc1b4e89f 100644 --- a/source4/lib/ldb/modules/ldb_map_inbound.c +++ b/source4/lib/ldb/modules/ldb_map_inbound.c @@ -23,11 +23,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include "includes.h" -#include "ldb/include/includes.h" +#include "ldb_includes.h" -#include "ldb/modules/ldb_map.h" -#include "ldb/modules/ldb_map_private.h" +#include "ldb_map.h" +#include "ldb_map_private.h" /* Mapping message elements @@ -137,10 +136,10 @@ local: * ================ */ /* Check whether a message will be (partially) mapped into the remote partition. */ -static BOOL ldb_msg_check_remote(struct ldb_module *module, const struct ldb_message *msg) +static bool ldb_msg_check_remote(struct ldb_module *module, const struct ldb_message *msg) { const struct ldb_map_context *data = map_get_context(module); - BOOL ret; + bool ret; int i; for (i = 0; i < msg->num_elements; i++) { @@ -150,7 +149,7 @@ static BOOL ldb_msg_check_remote(struct ldb_module *module, const struct ldb_mes } } - return False; + return false; } /* Split message elements that stay in the local partition from those diff --git a/source4/lib/ldb/modules/ldb_map_outbound.c b/source4/lib/ldb/modules/ldb_map_outbound.c index 615cdc40ca..1ef1b36b20 100644 --- a/source4/lib/ldb/modules/ldb_map_outbound.c +++ b/source4/lib/ldb/modules/ldb_map_outbound.c @@ -24,11 +24,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include "includes.h" -#include "ldb/include/includes.h" +#include "ldb_includes.h" -#include "ldb/modules/ldb_map.h" -#include "ldb/modules/ldb_map_private.h" +#include "ldb_map.h" +#include "ldb_map_private.h" /* Mapping attributes @@ -488,10 +487,10 @@ static int map_reply_remote(struct map_context *ac, struct ldb_reply *ares) * =================== */ /* Check whether a parse tree can safely be split in two. */ -static BOOL ldb_parse_tree_check_splittable(const struct ldb_parse_tree *tree) +static bool ldb_parse_tree_check_splittable(const struct ldb_parse_tree *tree) { const struct ldb_parse_tree *subtree = tree; - BOOL negate = False; + bool negate = false; while (subtree) { switch (subtree->operation) { @@ -507,11 +506,11 @@ static BOOL ldb_parse_tree_check_splittable(const struct ldb_parse_tree *tree) return negate; /* if negate: True */ default: - return True; /* simple parse tree */ + return true; /* simple parse tree */ } } - return True; /* no parse tree */ + return true; /* no parse tree */ } /* Collect a list of attributes required to match a given parse tree. */ diff --git a/source4/lib/ldb/modules/ldb_map_private.h b/source4/lib/ldb/modules/ldb_map_private.h index 1f4fecee8b..2c35097069 100644 --- a/source4/lib/ldb/modules/ldb_map_private.h +++ b/source4/lib/ldb/modules/ldb_map_private.h @@ -68,9 +68,9 @@ struct ldb_handle *map_init_handle(struct ldb_request *req, struct ldb_module *m int ldb_next_remote_request(struct ldb_module *module, struct ldb_request *request); -BOOL map_check_local_db(struct ldb_module *module); -BOOL map_attr_check_remote(const struct ldb_map_context *data, const char *attr); -BOOL ldb_dn_check_local(struct ldb_module *module, struct ldb_dn *dn); +bool map_check_local_db(struct ldb_module *module); +bool map_attr_check_remote(const struct ldb_map_context *data, const char *attr); +bool ldb_dn_check_local(struct ldb_module *module, struct ldb_dn *dn); const struct ldb_map_attribute *map_attr_find_local(const struct ldb_map_context *data, const char *name); const struct ldb_map_attribute *map_attr_find_remote(const struct ldb_map_context *data, const char *name); diff --git a/source4/lib/ldb/modules/objectclass.c b/source4/lib/ldb/modules/objectclass.c index 191238f9c9..1690af644c 100644 --- a/source4/lib/ldb/modules/objectclass.c +++ b/source4/lib/ldb/modules/objectclass.c @@ -33,8 +33,7 @@ * Author: Andrew Bartlett */ -#include "includes.h" -#include "ldb/include/includes.h" +#include "ldb_includes.h" struct oc_context { diff --git a/source4/lib/ldb/modules/operational.c b/source4/lib/ldb/modules/operational.c index 4fa572501f..96590a49a9 100644 --- a/source4/lib/ldb/modules/operational.c +++ b/source4/lib/ldb/modules/operational.c @@ -74,8 +74,7 @@ modifiersName: not supported by w2k3? */ -#include "includes.h" -#include "ldb/include/includes.h" +#include "ldb_includes.h" /* construct a canonical name from a message diff --git a/source4/lib/ldb/modules/paged_results.c b/source4/lib/ldb/modules/paged_results.c index 8ad1f01c8c..2f54d9bf8c 100644 --- a/source4/lib/ldb/modules/paged_results.c +++ b/source4/lib/ldb/modules/paged_results.c @@ -33,8 +33,7 @@ * Author: Simo Sorce */ -#include "includes.h" -#include "ldb/include/includes.h" +#include "ldb_includes.h" struct message_store { /* keep the whole ldb_reply as an optimization diff --git a/source4/lib/ldb/modules/paged_searches.c b/source4/lib/ldb/modules/paged_searches.c index 02d85e4c23..f4a06e841f 100644 --- a/source4/lib/ldb/modules/paged_searches.c +++ b/source4/lib/ldb/modules/paged_searches.c @@ -34,7 +34,7 @@ */ #include "includes.h" -#include "ldb/include/includes.h" +#include "ldb_includes.h" #define PS_DEFAULT_PAGE_SIZE 500 /* 500 objects per query seem to be a decent compromise diff --git a/source4/lib/ldb/modules/rdn_name.c b/source4/lib/ldb/modules/rdn_name.c index cb5add2875..322f05c00e 100644 --- a/source4/lib/ldb/modules/rdn_name.c +++ b/source4/lib/ldb/modules/rdn_name.c @@ -37,8 +37,7 @@ * Simo Sorce Mar 2006 */ -#include "includes.h" -#include "ldb/include/includes.h" +#include "ldb_includes.h" static struct ldb_message_element *rdn_name_find_attribute(const struct ldb_message *msg, const char *name) { diff --git a/source4/lib/ldb/modules/skel.c b/source4/lib/ldb/modules/skel.c index 8622a22638..3496142419 100644 --- a/source4/lib/ldb/modules/skel.c +++ b/source4/lib/ldb/modules/skel.c @@ -32,8 +32,7 @@ * Author: Simo Sorce */ -#include "includes.h" -#include "ldb/include/includes.h" +#include "ldb_includes.h" struct private_data { diff --git a/source4/lib/ldb/modules/sort.c b/source4/lib/ldb/modules/sort.c index f8ee788d6c..dcd979fd20 100644 --- a/source4/lib/ldb/modules/sort.c +++ b/source4/lib/ldb/modules/sort.c @@ -32,8 +32,7 @@ * Author: Simo Sorce */ -#include "includes.h" -#include "ldb/include/includes.h" +#include "ldb_includes.h" struct opaque { struct ldb_context *ldb; |