-/*
+/*
ldb database library
Copyright (C) Simo Sorce 2005
** NOTE! The following LGPL license applies to the ldb
** library. This does NOT imply that all of Samba is released
** under the LGPL
-
+
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
*
* Returns NULL on error (OOM) or an empty control list.
*/
-struct ldb_control **ldb_controls_except_specified(struct ldb_control **controls_in,
- TALLOC_CTX *mem_ctx,
+struct ldb_control **ldb_controls_except_specified(struct ldb_control **controls_in,
+ TALLOC_CTX *mem_ctx,
struct ldb_control *exclude)
{
struct ldb_control **lcs = NULL;
struct ldb_control **ctrls;
struct ldb_control *ctrl;
- for (n=0; req->controls && req->controls[n];n++) {
+ for (n=0; req->controls && req->controls[n];n++) {
/* having two controls of the same OID makes no sense */
if (req->controls[n]->oid && strcmp(oid, req->controls[n]->oid) == 0) {
return LDB_ERR_ATTRIBUTE_OR_VALUE_EXISTS;
struct ldb_control **ctrls;
struct ldb_control *ctrl;
- for (n=0; ares->controls && ares->controls[n];) {
+ for (n=0; ares->controls && ares->controls[n];) {
/* having two controls of the same OID makes no sense */
if (ares->controls[n]->oid && strcmp(oid, ares->controls[n]->oid) == 0) {
return LDB_ERR_ATTRIBUTE_OR_VALUE_EXISTS;
}
- n++;
+ n++;
}
ctrls = talloc_realloc(ares, ares->controls,
return ctrl;
}
-
-
/* The following definitions come from lib/ldb/common/ldb_debug.c */
void ldb_debug(struct ldb_context *ldb, enum ldb_debug_level level, const char *fmt, ...) PRINTF_ATTRIBUTE(3, 4);
-void ldb_debug_set(struct ldb_context *ldb, enum ldb_debug_level level,
+void ldb_debug_set(struct ldb_context *ldb, enum ldb_debug_level level,
const char *fmt, ...) PRINTF_ATTRIBUTE(3, 4);
void ldb_debug_add(struct ldb_context *ldb, const char *fmt, ...) PRINTF_ATTRIBUTE(2, 3);
void ldb_debug_end(struct ldb_context *ldb, enum ldb_debug_level level);
const char *name,
unsigned flags,
const struct ldb_schema_syntax *syntax);
-int ldb_schema_attribute_add(struct ldb_context *ldb,
+int ldb_schema_attribute_add(struct ldb_context *ldb,
const char *name,
unsigned flags,
const char *syntax);
const char *GUID_index_dn_component);
/* A useful function to build comparison functions with */
-int ldb_any_comparison(struct ldb_context *ldb, void *mem_ctx,
- ldb_attr_handler_t canonicalise_fn,
+int ldb_any_comparison(struct ldb_context *ldb, void *mem_ctx,
+ ldb_attr_handler_t canonicalise_fn,
const struct ldb_val *v1,
const struct ldb_val *v2);
/* Returns a list of controls, except the one specified. Included
* controls become a child of returned list if they were children of
* controls_in */
-struct ldb_control **ldb_controls_except_specified(struct ldb_control **controls_in,
- TALLOC_CTX *mem_ctx,
+struct ldb_control **ldb_controls_except_specified(struct ldb_control **controls_in,
+ TALLOC_CTX *mem_ctx,
struct ldb_control *exclude);
int ldb_check_critical_controls(struct ldb_control **controls);