ldb.h whitespace
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Tue, 6 Jun 2017 23:29:23 +0000 (11:29 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 15 Jun 2017 15:33:10 +0000 (17:33 +0200)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/ldb/include/ldb.h

index 3fab929ff5e432eaf592754e4f4d4bac30a4fe9f..14cec0e0b93a9867185960c859940f733b355b2e 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
    ldb database library
 
    Copyright (C) Andrew Tridgell  2004
@@ -8,7 +8,7 @@
      ** 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
@@ -56,7 +56,7 @@
   major restrictions as compared to normal LDAP:
 
      - each record must have a unique key field
-     - the key must be representable as a NULL terminated C string and may not 
+     - the key must be representable as a NULL terminated C string and may not
        contain a comma or braces
 
   major restrictions as compared to tdb:
@@ -75,7 +75,7 @@
    blobs of arbitrary size.
 
    \note the data is null (0x00) terminated, but the length does not
-   include the terminator. 
+   include the terminator.
 */
 struct ldb_val {
        uint8_t *data; /*!< result data */
@@ -171,7 +171,7 @@ struct ldb_message_element {
 
 /**
   a ldb_message represents all or part of a record. It can contain an arbitrary
-  number of elements. 
+  number of elements.
 */
 struct ldb_message {
        struct ldb_dn *dn;
@@ -198,8 +198,8 @@ struct ldb_ldif {
        struct ldb_message *msg;  /*!< The changes */
 };
 
-enum ldb_scope {LDB_SCOPE_DEFAULT=-1, 
-               LDB_SCOPE_BASE=0, 
+enum ldb_scope {LDB_SCOPE_DEFAULT=-1,
+               LDB_SCOPE_BASE=0,
                LDB_SCOPE_ONELEVEL=1,
                LDB_SCOPE_SUBTREE=2};
 
@@ -207,7 +207,7 @@ struct ldb_context;
 struct tevent_context;
 
 /* debugging uses one of the following levels */
-enum ldb_debug_level {LDB_DEBUG_FATAL, LDB_DEBUG_ERROR, 
+enum ldb_debug_level {LDB_DEBUG_FATAL, LDB_DEBUG_ERROR,
                      LDB_DEBUG_WARNING, LDB_DEBUG_TRACE};
 
 /**
@@ -216,7 +216,7 @@ enum ldb_debug_level {LDB_DEBUG_FATAL, LDB_DEBUG_ERROR,
   of a severity level
 */
 struct ldb_debug_ops {
-       void (*debug)(void *context, enum ldb_debug_level level, 
+       void (*debug)(void *context, enum ldb_debug_level level,
                      const char *fmt, va_list ap) PRINTF_ATTRIBUTE(3,0);
        void *context;
 };
@@ -262,7 +262,7 @@ struct ldb_utf8_fns {
 
 /**
    Flag to tell ldif handlers not to force encoding of binary
-   structures in base64   
+   structures in base64
 */
 #define LDB_FLG_SHOW_BINARY 16
 
@@ -410,15 +410,15 @@ const struct ldb_dn_extended_syntax *ldb_dn_extended_syntax_by_name(struct ldb_c
 /**
    The attribute is not returned by default
 */
-#define LDB_ATTR_FLAG_HIDDEN       (1<<0) 
+#define LDB_ATTR_FLAG_HIDDEN       (1<<0)
 
 /* the attribute handler name should be freed when released */
-#define LDB_ATTR_FLAG_ALLOCATED    (1<<1) 
+#define LDB_ATTR_FLAG_ALLOCATED    (1<<1)
 
 /**
    The attribute is supplied by the application and should not be removed
 */
-#define LDB_ATTR_FLAG_FIXED        (1<<2) 
+#define LDB_ATTR_FLAG_FIXED        (1<<2)
 
 /*
   when this is set, attempts to create two records which have the same
@@ -451,7 +451,7 @@ const struct ldb_dn_extended_syntax *ldb_dn_extended_syntax_by_name(struct ldb_c
 
   This is the well-known LDAP attribute syntax for a DN.
 
-  See <a href="http://www.ietf.org/rfc/rfc2252.txt">RFC 2252</a>, Section 4.3.2 
+  See <a href="http://www.ietf.org/rfc/rfc2252.txt">RFC 2252</a>, Section 4.3.2
 */
 #define LDB_SYNTAX_DN                   "1.3.6.1.4.1.1466.115.121.1.12"
 
@@ -460,7 +460,7 @@ const struct ldb_dn_extended_syntax *ldb_dn_extended_syntax_by_name(struct ldb_c
 
   This is the well-known LDAP attribute syntax for a Directory String.
 
-  \sa <a href="http://www.ietf.org/rfc/rfc2252.txt">RFC 2252</a>, Section 4.3.2 
+  \sa <a href="http://www.ietf.org/rfc/rfc2252.txt">RFC 2252</a>, Section 4.3.2
 */
 #define LDB_SYNTAX_DIRECTORY_STRING     "1.3.6.1.4.1.1466.115.121.1.15"
 
@@ -469,7 +469,7 @@ const struct ldb_dn_extended_syntax *ldb_dn_extended_syntax_by_name(struct ldb_c
 
   This is the well-known LDAP attribute syntax for an integer.
 
-  See <a href="http://www.ietf.org/rfc/rfc2252.txt">RFC 2252</a>, Section 4.3.2 
+  See <a href="http://www.ietf.org/rfc/rfc2252.txt">RFC 2252</a>, Section 4.3.2
 */
 #define LDB_SYNTAX_INTEGER              "1.3.6.1.4.1.1466.115.121.1.27"
 
@@ -478,7 +478,7 @@ const struct ldb_dn_extended_syntax *ldb_dn_extended_syntax_by_name(struct ldb_c
 
   This is the well-known LDAP attribute syntax for a boolean.
 
-  See <a href="http://www.ietf.org/rfc/rfc2252.txt">RFC 2252</a>, Section 4.3.2 
+  See <a href="http://www.ietf.org/rfc/rfc2252.txt">RFC 2252</a>, Section 4.3.2
 */
 #define LDB_SYNTAX_BOOLEAN              "1.3.6.1.4.1.1466.115.121.1.7"
 
@@ -487,7 +487,7 @@ const struct ldb_dn_extended_syntax *ldb_dn_extended_syntax_by_name(struct ldb_c
 
   This is the well-known LDAP attribute syntax for an octet string.
 
-  See <a href="http://www.ietf.org/rfc/rfc2252.txt">RFC 2252</a>, Section 4.3.2 
+  See <a href="http://www.ietf.org/rfc/rfc2252.txt">RFC 2252</a>, Section 4.3.2
 */
 #define LDB_SYNTAX_OCTET_STRING         "1.3.6.1.4.1.1466.115.121.1.40"
 
@@ -496,7 +496,7 @@ const struct ldb_dn_extended_syntax *ldb_dn_extended_syntax_by_name(struct ldb_c
 
   This is the well-known LDAP attribute syntax for a UTC time.
 
-  See <a href="http://www.ietf.org/rfc/rfc2252.txt">RFC 2252</a>, Section 4.3.2 
+  See <a href="http://www.ietf.org/rfc/rfc2252.txt">RFC 2252</a>, Section 4.3.2
 */
 #define LDB_SYNTAX_UTC_TIME             "1.3.6.1.4.1.1466.115.121.1.53"
 #define LDB_SYNTAX_GENERALIZED_TIME     "1.3.6.1.4.1.1466.115.121.1.24"
@@ -511,7 +511,7 @@ typedef int (*ldb_qsort_cmp_fn_t) (void *v1, void *v2, void *opaque);
 /**
   OID for getting and manipulating attributes from the ldb
   without interception in the operational module.
-  It can be used to access attribute that used to be stored in the sam 
+  It can be used to access attribute that used to be stored in the sam
   and that are now calculated.
 */
 #define LDB_CONTROL_BYPASS_OPERATIONAL_OID "1.3.6.1.4.1.7165.4.3.13"
@@ -560,7 +560,7 @@ typedef int (*ldb_qsort_cmp_fn_t) (void *v1, void *v2, void *opaque);
    OID for the paged results control. This control is included in the
    searchRequest and searchResultDone messages as part of the controls
    field of the LDAPMessage, as defined in Section 4.1.12 of
-   LDAP v3. 
+   LDAP v3.
 
    \sa <a href="http://www.ietf.org/rfc/rfc2696.txt">RFC 2696</a>.
 */
@@ -676,7 +676,7 @@ typedef int (*ldb_qsort_cmp_fn_t) (void *v1, void *v2, void *opaque);
 #define LDB_CONTROL_ASQ_NAME   "asq"
 
 /**
-   OID for LDAP Directory Sync extension. 
+   OID for LDAP Directory Sync extension.
 
    This control is included in SearchRequest or SearchResponse
    messages as part of the controls field of the LDAPMessage.
@@ -714,8 +714,8 @@ typedef int (*ldb_qsort_cmp_fn_t) (void *v1, void *v2, void *opaque);
 #define LDB_CONTROL_PERMISSIVE_MODIFY_OID      "1.2.840.113556.1.4.1413"
 #define LDB_CONTROL_PERMISSIVE_MODIFY_NAME     "permissive_modify"
 
-/** 
-    OID to allow the server to be more 'fast and loose' with the data being added.  
+/**
+    OID to allow the server to be more 'fast and loose' with the data being added.
 
     \sa <a href="http://msdn.microsoft.com/en-us/library/aa366982(v=VS.85).aspx">Microsoft documentation of this OID</a>
 */
@@ -1132,7 +1132,7 @@ struct ldb_dn *ldb_get_schema_basedn(struct ldb_context *ldb);
 struct ldb_dn *ldb_get_default_basedn(struct ldb_context *ldb);
 
 /**
-  The default async search callback function 
+  The default async search callback function
 
   \param req the request we are callback of
   \param ares a single reply from the async core
@@ -1210,7 +1210,7 @@ int ldb_build_search_req_ex(struct ldb_request **ret_req,
   \param ret_req the request structure is returned here (talloced on mem_ctx)
   \param ldb the context associated with the database (from ldb_init())
   \param mem_ctx a talloc memory context (used as parent of ret_req)
-  \param message contains the entry to be added 
+  \param message contains the entry to be added
   \param controls an array of controls
   \param context the callback function context
   \param the callback function to handle the async replies
@@ -1327,27 +1327,27 @@ int ldb_request_add_control(struct ldb_request *req, const char *oid, bool criti
 int ldb_request_replace_control(struct ldb_request *req, const char *oid, bool critical, void *data);
 
 /**
-   check if a control with the specified "oid" exist and return it 
+   check if a control with the specified "oid" exist and return it
   \param req the request struct where to add the control
   \param oid the object identifier of the control as string
 
-  \return the control, NULL if not found 
+  \return the control, NULL if not found
 */
 struct ldb_control *ldb_request_get_control(struct ldb_request *req, const char *oid);
 
 /**
-   check if a control with the specified "oid" exist and return it 
+   check if a control with the specified "oid" exist and return it
   \param rep the reply struct where to add the control
   \param oid the object identifier of the control as string
 
-  \return the control, NULL if not found 
+  \return the control, NULL if not found
 */
 struct ldb_control *ldb_reply_get_control(struct ldb_reply *rep, const char *oid);
 
 /**
   Search the database
 
-  This function searches the database, and returns 
+  This function searches the database, and returns
   records that match an LDAP-like search expression
 
   \param ldb the context associated with the database (from ldb_init())
@@ -1372,7 +1372,7 @@ int ldb_search(struct ldb_context *ldb, TALLOC_CTX *mem_ctx,
 
   This function adds a record to the database. This function will fail
   if a record with the specified class and key already exists in the
-  database. 
+  database.
 
   \param ldb the context associated with the database (from
   ldb_init())
@@ -1381,7 +1381,7 @@ int ldb_search(struct ldb_context *ldb, TALLOC_CTX *mem_ctx,
   \return result code (LDB_SUCCESS if the record was added, otherwise
   a failure code)
 */
-int ldb_add(struct ldb_context *ldb, 
+int ldb_add(struct ldb_context *ldb,
            const struct ldb_message *message);
 
 /**
@@ -1396,7 +1396,7 @@ int ldb_add(struct ldb_context *ldb,
   \return result code (LDB_SUCCESS if the record was modified as
   requested, otherwise a failure code)
 */
-int ldb_modify(struct ldb_context *ldb, 
+int ldb_modify(struct ldb_context *ldb,
               const struct ldb_message *message);
 
 /**
@@ -1407,7 +1407,7 @@ int ldb_modify(struct ldb_context *ldb,
   \param ldb the context associated with the database (from
   ldb_init())
   \param olddn the DN for the record to be renamed.
-  \param newdn the new DN 
+  \param newdn the new DN
 
   \return result code (LDB_SUCCESS if the record was renamed as
   requested, otherwise a failure code)
@@ -1429,7 +1429,7 @@ int ldb_rename(struct ldb_context *ldb, struct ldb_dn *olddn, struct ldb_dn *new
 int ldb_delete(struct ldb_context *ldb, struct ldb_dn *dn);
 
 /**
-  The default async extended operation callback function 
+  The default async extended operation callback function
 
   \param req the request we are callback of
   \param ares a single reply from the async core
@@ -1456,7 +1456,7 @@ int ldb_extended_default_callback(struct ldb_request *req, struct ldb_reply *are
   \param mem_ctx a talloc memory context (used as parent of ret_req)
   \param oid the OID of the extended operation.
   \param data a void pointer a the extended operation specific parameters,
-  it needs to be NULL or a valid talloc pointer! talloc_get_type() will be used on it  
+  it needs to be NULL or a valid talloc pointer! talloc_get_type() will be used on it
   \param controls an array of controls
   \param context the callback function context
   \param the callback function to handle the async replies
@@ -1480,13 +1480,13 @@ int ldb_build_extended_req(struct ldb_request **ret_req,
   \param ldb the context associated with the database (from ldb_init())
   \param oid the OID of the extended operation.
   \param data a void pointer a the extended operation specific parameters,
-  it needs to be NULL or a valid talloc pointer! talloc_get_type() will be used on it  
+  it needs to be NULL or a valid talloc pointer! talloc_get_type() will be used on it
   \param res the result of the extended operation
 
   \return result code (LDB_SUCCESS if the extended operation returned fine,
   otherwise a failure code)
 */
-int ldb_extended(struct ldb_context *ldb, 
+int ldb_extended(struct ldb_context *ldb,
                 const char *oid,
                 void *data,/* NULL or a valid talloc pointer! talloc_get_type() will be used on it */
                 struct ldb_result **res);
@@ -1544,7 +1544,7 @@ void ldb_set_utf8_default(struct ldb_context *ldb);
 
    \param ldb the ldb context
    \param mem_ctx the memory context to allocate the result string
-   memory from. 
+   memory from.
    \param s the string that is to be folded
    \return a copy of the string, converted to upper case
 
@@ -1574,7 +1574,7 @@ int ldb_valid_attr_name(const char *s);
    \param ldb the ldb context (from ldb_init())
    \param fprintf_fn a function pointer for the write function. This must take
    a private data pointer, followed by a format string, and then a variable argument
-   list. 
+   list.
    \param private_data pointer that will be provided back to the write
    function. This is useful for maintaining state or context.
    \param ldif the message to write out
@@ -1588,7 +1588,7 @@ int ldb_valid_attr_name(const char *s);
    \sa ldb_ldif_read for the reader equivalent to this function.
 */
 int ldb_ldif_write(struct ldb_context *ldb,
-                  int (*fprintf_fn)(void *, const char *, ...) PRINTF_ATTRIBUTE(2,3), 
+                  int (*fprintf_fn)(void *, const char *, ...) PRINTF_ATTRIBUTE(2,3),
                   void *private_data,
                   const struct ldb_ldif *ldif);
 
@@ -1609,7 +1609,7 @@ void ldb_ldif_read_free(struct ldb_context *ldb, struct ldb_ldif *msg);
    Read an LDIF message
 
    This function creates an LDIF message using a caller supplied read
-   function. 
+   function.
 
    \param ldb the ldb context (from ldb_init())
    \param fgetc_fn a function pointer for the read function. This must
@@ -1632,7 +1632,7 @@ void ldb_ldif_read_free(struct ldb_context *ldb, struct ldb_ldif *msg);
 
    \sa ldb_ldif_write for the writer equivalent to this function.
 */
-struct ldb_ldif *ldb_ldif_read(struct ldb_context *ldb, 
+struct ldb_ldif *ldb_ldif_read(struct ldb_context *ldb,
                               int (*fgetc_fn)(void *), void *private_data);
 
 /**
@@ -1720,7 +1720,7 @@ int ldb_ldif_write_file(struct ldb_context *ldb, FILE *f, const struct ldb_ldif
 
    \sa ldb_ldif_read_string for the reader equivalent to this function.
 */
-char * ldb_ldif_write_string(struct ldb_context *ldb, TALLOC_CTX *mem_ctx, 
+char * ldb_ldif_write_string(struct ldb_context *ldb, TALLOC_CTX *mem_ctx,
                          const struct ldb_ldif *msg);
 
 
@@ -1730,7 +1730,7 @@ char * ldb_ldif_write_string(struct ldb_context *ldb, TALLOC_CTX *mem_ctx,
    convenient function to turn a ldb_message into a string. Useful for
    debugging
  */
-char *ldb_ldif_message_string(struct ldb_context *ldb, TALLOC_CTX *mem_ctx, 
+char *ldb_ldif_message_string(struct ldb_context *ldb, TALLOC_CTX *mem_ctx,
                              enum ldb_changetype changetype,
                              const struct ldb_message *msg);
 
@@ -1739,7 +1739,7 @@ char *ldb_ldif_message_string(struct ldb_context *ldb, TALLOC_CTX *mem_ctx,
    Base64 encode a buffer
 
    \param mem_ctx the memory context that the result is allocated
-   from. 
+   from.
    \param buf pointer to the array that is to be encoded
    \param len the number of elements in the array to be encoded
 
@@ -1767,15 +1767,15 @@ int ldb_base64_decode(char *s);
 
 /**
   Get the linear form of a DN (without any extended components)
-  
+
   \param dn The DN to linearize
 */
 
 const char *ldb_dn_get_linearized(struct ldb_dn *dn);
 
 /**
-  Allocate a copy of the linear form of a DN (without any extended components) onto the supplied memory context 
-  
+  Allocate a copy of the linear form of a DN (without any extended components) onto the supplied memory context
+
   \param dn The DN to linearize
   \param mem_ctx TALLOC context to return result on
 */
@@ -1784,7 +1784,7 @@ char *ldb_dn_alloc_linearized(TALLOC_CTX *mem_ctx, struct ldb_dn *dn);
 
 /**
   Get the linear form of a DN (with any extended components)
-  
+
   \param mem_ctx TALLOC context to return result on
   \param dn The DN to linearize
   \param mode Style of extended DN to return (0 is HEX representation of binary form, 1 is a string form)
@@ -1796,21 +1796,21 @@ void ldb_dn_extended_filter(struct ldb_dn *dn, const char * const *accept_list);
 void ldb_dn_remove_extended_components(struct ldb_dn *dn);
 bool ldb_dn_has_extended(struct ldb_dn *dn);
 
-int ldb_dn_extended_add_syntax(struct ldb_context *ldb, 
+int ldb_dn_extended_add_syntax(struct ldb_context *ldb,
                               unsigned flags,
                               const struct ldb_dn_extended_syntax *syntax);
 
-/** 
+/**
   Allocate a new DN from a string
 
   \param mem_ctx TALLOC context to return resulting ldb_dn structure on
-  \param dn The new DN 
+  \param dn The new DN
 
   \note The DN will not be parsed at this time.  Use ldb_dn_validate to tell if the DN is syntacticly correct
 */
 
 struct ldb_dn *ldb_dn_new(TALLOC_CTX *mem_ctx, struct ldb_context *ldb, const char *dn);
-/** 
+/**
   Allocate a new DN from a printf style format string and arguments
 
   \param mem_ctx TALLOC context to return resulting ldb_dn structure on
@@ -1820,11 +1820,11 @@ struct ldb_dn *ldb_dn_new(TALLOC_CTX *mem_ctx, struct ldb_context *ldb, const ch
 */
 
 struct ldb_dn *ldb_dn_new_fmt(TALLOC_CTX *mem_ctx, struct ldb_context *ldb, const char *new_fmt, ...) PRINTF_ATTRIBUTE(3,4);
-/** 
+/**
   Allocate a new DN from a struct ldb_val (useful to avoid buffer overrun)
 
   \param mem_ctx TALLOC context to return resulting ldb_dn structure on
-  \param dn The new DN 
+  \param dn The new DN
 
   \note The DN will not be parsed at this time.  Use ldb_dn_validate to tell if the DN is syntacticly correct
 */
@@ -1832,7 +1832,7 @@ struct ldb_dn *ldb_dn_new_fmt(TALLOC_CTX *mem_ctx, struct ldb_context *ldb, cons
 struct ldb_dn *ldb_dn_from_ldb_val(TALLOC_CTX *mem_ctx, struct ldb_context *ldb, const struct ldb_val *strdn);
 
 /**
-  Determine if this DN is syntactically valid 
+  Determine if this DN is syntactically valid
 
   \param dn The DN to validate
 */
@@ -1939,31 +1939,31 @@ int ldb_msg_add_empty(struct ldb_message *msg,
 /**
    add a element to a ldb_message
 */
-int ldb_msg_add(struct ldb_message *msg, 
-               const struct ldb_message_element *el, 
+int ldb_msg_add(struct ldb_message *msg,
+               const struct ldb_message_element *el,
                int flags);
-int ldb_msg_add_value(struct ldb_message *msg, 
+int ldb_msg_add_value(struct ldb_message *msg,
                const char *attr_name,
                const struct ldb_val *val,
                struct ldb_message_element **return_el);
-int ldb_msg_add_steal_value(struct ldb_message *msg, 
+int ldb_msg_add_steal_value(struct ldb_message *msg,
                      const char *attr_name,
                      struct ldb_val *val);
-int ldb_msg_add_steal_string(struct ldb_message *msg, 
+int ldb_msg_add_steal_string(struct ldb_message *msg,
                             const char *attr_name, char *str);
-int ldb_msg_add_string(struct ldb_message *msg, 
+int ldb_msg_add_string(struct ldb_message *msg,
                       const char *attr_name, const char *str);
 int ldb_msg_add_linearized_dn(struct ldb_message *msg, const char *attr_name,
                              struct ldb_dn *dn);
-int ldb_msg_add_fmt(struct ldb_message *msg, 
+int ldb_msg_add_fmt(struct ldb_message *msg,
                    const char *attr_name, const char *fmt, ...) PRINTF_ATTRIBUTE(3,4);
 
 /**
    compare two message elements - return 0 on match
 */
-int ldb_msg_element_compare(struct ldb_message_element *el1, 
+int ldb_msg_element_compare(struct ldb_message_element *el1,
                            struct ldb_message_element *el2);
-int ldb_msg_element_compare_name(struct ldb_message_element *el1, 
+int ldb_msg_element_compare_name(struct ldb_message_element *el1,
                                 struct ldb_message_element *el2);
 
 /**
@@ -1974,25 +1974,25 @@ int ldb_msg_element_compare_name(struct ldb_message_element *el1,
    single valued.
 */
 const struct ldb_val *ldb_msg_find_ldb_val(const struct ldb_message *msg, const char *attr_name);
-int ldb_msg_find_attr_as_int(const struct ldb_message *msg, 
+int ldb_msg_find_attr_as_int(const struct ldb_message *msg,
                             const char *attr_name,
                             int default_value);
-unsigned int ldb_msg_find_attr_as_uint(const struct ldb_message *msg, 
+unsigned int ldb_msg_find_attr_as_uint(const struct ldb_message *msg,
                                       const char *attr_name,
                                       unsigned int default_value);
-int64_t ldb_msg_find_attr_as_int64(const struct ldb_message *msg, 
+int64_t ldb_msg_find_attr_as_int64(const struct ldb_message *msg,
                                   const char *attr_name,
                                   int64_t default_value);
-uint64_t ldb_msg_find_attr_as_uint64(const struct ldb_message *msg, 
+uint64_t ldb_msg_find_attr_as_uint64(const struct ldb_message *msg,
                                     const char *attr_name,
                                     uint64_t default_value);
-double ldb_msg_find_attr_as_double(const struct ldb_message *msg, 
+double ldb_msg_find_attr_as_double(const struct ldb_message *msg,
                                   const char *attr_name,
                                   double default_value);
-int ldb_msg_find_attr_as_bool(const struct ldb_message *msg, 
+int ldb_msg_find_attr_as_bool(const struct ldb_message *msg,
                              const char *attr_name,
                              int default_value);
-const char *ldb_msg_find_attr_as_string(const struct ldb_message *msg, 
+const char *ldb_msg_find_attr_as_string(const struct ldb_message *msg,
                                        const char *attr_name,
                                        const char *default_value);
 
@@ -2003,9 +2003,9 @@ struct ldb_dn *ldb_msg_find_attr_as_dn(struct ldb_context *ldb,
 
 void ldb_msg_sort_elements(struct ldb_message *msg);
 
-struct ldb_message *ldb_msg_copy_shallow(TALLOC_CTX *mem_ctx, 
+struct ldb_message *ldb_msg_copy_shallow(TALLOC_CTX *mem_ctx,
                                         const struct ldb_message *msg);
-struct ldb_message *ldb_msg_copy(TALLOC_CTX *mem_ctx, 
+struct ldb_message *ldb_msg_copy(TALLOC_CTX *mem_ctx,
                                 const struct ldb_message *msg);
 
 /*
@@ -2017,7 +2017,7 @@ struct ldb_message *ldb_msg_copy(TALLOC_CTX *mem_ctx,
  * to steal the returned object into a TALLOC_CTX
  * with short lifetime.
  */
-struct ldb_message *ldb_msg_canonicalize(struct ldb_context *ldb, 
+struct ldb_message *ldb_msg_canonicalize(struct ldb_context *ldb,
                                         const struct ldb_message *msg) _DEPRECATED_;
 
 int ldb_msg_normalize(struct ldb_context *ldb,
@@ -2035,7 +2035,7 @@ int ldb_msg_normalize(struct ldb_context *ldb,
  * to steal the returned object into a TALLOC_CTX
  * with short lifetime.
  */
-struct ldb_message *ldb_msg_diff(struct ldb_context *ldb, 
+struct ldb_message *ldb_msg_diff(struct ldb_context *ldb,
                                 struct ldb_message *msg1,
                                 struct ldb_message *msg2) _DEPRECATED_;
 
@@ -2092,7 +2092,7 @@ int ldb_msg_sanity_check(struct ldb_context *ldb,
 /**
    Duplicate an ldb_val structure
 
-   This function copies an ldb value structure. 
+   This function copies an ldb value structure.
 
    \param mem_ctx the memory context that the duplicated value will be
    allocated from
@@ -2106,7 +2106,7 @@ struct ldb_val ldb_val_dup(TALLOC_CTX *mem_ctx, const struct ldb_val *v);
   this allows the user to set a debug function for error reporting
 */
 int ldb_set_debug(struct ldb_context *ldb,
-                 void (*debug)(void *context, enum ldb_debug_level level, 
+                 void (*debug)(void *context, enum ldb_debug_level level,
                                const char *fmt, va_list ap) PRINTF_ATTRIBUTE(3,0),
                  void *context);
 
@@ -2136,8 +2136,8 @@ void ldb_msg_remove_attr(struct ldb_message *msg, const char *attr);
 void ldb_msg_remove_element(struct ldb_message *msg, struct ldb_message_element *el);
 
 
-void ldb_parse_tree_attr_replace(struct ldb_parse_tree *tree, 
-                                const char *attr, 
+void ldb_parse_tree_attr_replace(struct ldb_parse_tree *tree,
+                                const char *attr,
                                 const char *replace);
 
 /*
@@ -2152,7 +2152,7 @@ struct ldb_parse_tree *ldb_parse_tree_copy_shallow(TALLOC_CTX *mem_ctx,
 
    This function converts a time_t structure to an LDAP formatted
    GeneralizedTime string.
-               
+
    \param mem_ctx the memory context to allocate the return string in
    \param t the time structure to convert
 
@@ -2184,7 +2184,7 @@ int ldb_val_to_time(const struct ldb_val *v, time_t *t);
 
    This function converts a time_t structure to an LDAP formatted
    UTCTime string.
-               
+
    \param mem_ctx the memory context to allocate the return string in
    \param t the time structure to convert
 
@@ -2240,16 +2240,16 @@ do { \
 
 /**
    Convert a control into its string representation.
-   
+
    \param mem_ctx TALLOC context to return result on, and to allocate error_string on
    \param control A struct ldb_control to convert
 
-   \return string representation of the control 
+   \return string representation of the control
 */
 char* ldb_control_to_string(TALLOC_CTX *mem_ctx, const struct ldb_control *control);
 /**
-   Convert a string representing a control into a ldb_control structure 
-   
+   Convert a string representing a control into a ldb_control structure
+
    \param ldb LDB context
    \param mem_ctx TALLOC context to return result on, and to allocate error_string on
    \param control_strings A string-formatted control
@@ -2258,8 +2258,8 @@ char* ldb_control_to_string(TALLOC_CTX *mem_ctx, const struct ldb_control *contr
 */
 struct ldb_control *ldb_parse_control_from_string(struct ldb_context *ldb, TALLOC_CTX *mem_ctx, const char *control_strings);
 /**
-   Convert an array of string represention of a control into an array of ldb_control structures 
-   
+   Convert an array of string represention of a control into an array of ldb_control structures
+
    \param ldb LDB context
    \param mem_ctx TALLOC context to return result on, and to allocate error_string on
    \param control_strings Array of string-formatted controls
@@ -2269,7 +2269,7 @@ struct ldb_control *ldb_parse_control_from_string(struct ldb_context *ldb, TALLO
 struct ldb_control **ldb_parse_control_strings(struct ldb_context *ldb, TALLOC_CTX *mem_ctx, const char **control_strings);
 
 /**
-   return the ldb flags 
+   return the ldb flags
 */
 unsigned int ldb_get_flags(struct ldb_context *ldb);