Hello community,

here is the log from the commit of package ldb for openSUSE:Factory checked in 
at 2016-02-03 10:17:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ldb (Old)
 and      /work/SRC/openSUSE:Factory/.ldb.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ldb"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ldb/ldb.changes  2015-12-18 21:51:13.000000000 
+0100
+++ /work/SRC/openSUSE:Factory/.ldb.new/ldb.changes     2016-02-03 
10:17:32.000000000 +0100
@@ -1,0 +2,8 @@
+Wed Jan 27 13:35:11 UTC 2016 - lmue...@suse.com
+
+- Update to 1.1.25; (bsc#954658).
+  + torture: test ldb_unpack_data_only_attr_list
+  + increment version due to added ldb_unpack_data_only_attr_list
+  + introduce ldb_unpack_data_withlist to unpack partial list of attributes
+
+-------------------------------------------------------------------

Old:
----
  ldb-1.1.24.tar.asc
  ldb-1.1.24.tar.gz

New:
----
  ldb-1.1.25.tar.asc
  ldb-1.1.25.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ldb.spec ++++++
--- /var/tmp/diff_new_pack.QoBZfh/_old  2016-02-03 10:17:32.000000000 +0100
+++ /var/tmp/diff_new_pack.QoBZfh/_new  2016-02-03 10:17:32.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package ldb
 #
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -50,7 +50,7 @@
 %define        build_make_smp_mflags %{?jobs:-j%jobs}
 %endif
 Url:            https://ldb.samba.org/
-Version:        1.1.24
+Version:        1.1.25
 Release:        0
 Summary:        An LDAP-like embedded database
 License:        GPL-3.0+

++++++ ldb-1.1.24.tar.gz -> ldb-1.1.25.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ldb-1.1.24/ABI/ldb-1.1.25.sigs 
new/ldb-1.1.25/ABI/ldb-1.1.25.sigs
--- old/ldb-1.1.24/ABI/ldb-1.1.25.sigs  1970-01-01 01:00:00.000000000 +0100
+++ new/ldb-1.1.25/ABI/ldb-1.1.25.sigs  2015-12-17 08:18:20.000000000 +0100
@@ -0,0 +1,265 @@
+ldb_add: int (struct ldb_context *, const struct ldb_message *)
+ldb_any_comparison: int (struct ldb_context *, void *, ldb_attr_handler_t, 
const struct ldb_val *, const struct ldb_val *)
+ldb_asprintf_errstring: void (struct ldb_context *, const char *, ...)
+ldb_attr_casefold: char *(TALLOC_CTX *, const char *)
+ldb_attr_dn: int (const char *)
+ldb_attr_in_list: int (const char * const *, const char *)
+ldb_attr_list_copy: const char **(TALLOC_CTX *, const char * const *)
+ldb_attr_list_copy_add: const char **(TALLOC_CTX *, const char * const *, 
const char *)
+ldb_base64_decode: int (char *)
+ldb_base64_encode: char *(TALLOC_CTX *, const char *, int)
+ldb_binary_decode: struct ldb_val (TALLOC_CTX *, const char *)
+ldb_binary_encode: char *(TALLOC_CTX *, struct ldb_val)
+ldb_binary_encode_string: char *(TALLOC_CTX *, const char *)
+ldb_build_add_req: int (struct ldb_request **, struct ldb_context *, 
TALLOC_CTX *, const struct ldb_message *, struct ldb_control **, void *, 
ldb_request_callback_t, struct ldb_request *)
+ldb_build_del_req: int (struct ldb_request **, struct ldb_context *, 
TALLOC_CTX *, struct ldb_dn *, struct ldb_control **, void *, 
ldb_request_callback_t, struct ldb_request *)
+ldb_build_extended_req: int (struct ldb_request **, struct ldb_context *, 
TALLOC_CTX *, const char *, void *, struct ldb_control **, void *, 
ldb_request_callback_t, struct ldb_request *)
+ldb_build_mod_req: int (struct ldb_request **, struct ldb_context *, 
TALLOC_CTX *, const struct ldb_message *, struct ldb_control **, void *, 
ldb_request_callback_t, struct ldb_request *)
+ldb_build_rename_req: int (struct ldb_request **, struct ldb_context *, 
TALLOC_CTX *, struct ldb_dn *, struct ldb_dn *, struct ldb_control **, void *, 
ldb_request_callback_t, struct ldb_request *)
+ldb_build_search_req: int (struct ldb_request **, struct ldb_context *, 
TALLOC_CTX *, struct ldb_dn *, enum ldb_scope, const char *, const char * const 
*, struct ldb_control **, void *, ldb_request_callback_t, struct ldb_request *)
+ldb_build_search_req_ex: int (struct ldb_request **, struct ldb_context *, 
TALLOC_CTX *, struct ldb_dn *, enum ldb_scope, struct ldb_parse_tree *, const 
char * const *, struct ldb_control **, void *, ldb_request_callback_t, struct 
ldb_request *)
+ldb_casefold: char *(struct ldb_context *, TALLOC_CTX *, const char *, size_t)
+ldb_casefold_default: char *(void *, TALLOC_CTX *, const char *, size_t)
+ldb_check_critical_controls: int (struct ldb_control **)
+ldb_comparison_binary: int (struct ldb_context *, void *, const struct ldb_val 
*, const struct ldb_val *)
+ldb_comparison_fold: int (struct ldb_context *, void *, const struct ldb_val 
*, const struct ldb_val *)
+ldb_connect: int (struct ldb_context *, const char *, unsigned int, const char 
**)
+ldb_control_to_string: char *(TALLOC_CTX *, const struct ldb_control *)
+ldb_controls_except_specified: struct ldb_control **(struct ldb_control **, 
TALLOC_CTX *, struct ldb_control *)
+ldb_debug: void (struct ldb_context *, enum ldb_debug_level, const char *, ...)
+ldb_debug_add: void (struct ldb_context *, const char *, ...)
+ldb_debug_end: void (struct ldb_context *, enum ldb_debug_level)
+ldb_debug_set: void (struct ldb_context *, enum ldb_debug_level, const char *, 
...)
+ldb_delete: int (struct ldb_context *, struct ldb_dn *)
+ldb_dn_add_base: bool (struct ldb_dn *, struct ldb_dn *)
+ldb_dn_add_base_fmt: bool (struct ldb_dn *, const char *, ...)
+ldb_dn_add_child: bool (struct ldb_dn *, struct ldb_dn *)
+ldb_dn_add_child_fmt: bool (struct ldb_dn *, const char *, ...)
+ldb_dn_alloc_casefold: char *(TALLOC_CTX *, struct ldb_dn *)
+ldb_dn_alloc_linearized: char *(TALLOC_CTX *, struct ldb_dn *)
+ldb_dn_canonical_ex_string: char *(TALLOC_CTX *, struct ldb_dn *)
+ldb_dn_canonical_string: char *(TALLOC_CTX *, struct ldb_dn *)
+ldb_dn_check_local: bool (struct ldb_module *, struct ldb_dn *)
+ldb_dn_check_special: bool (struct ldb_dn *, const char *)
+ldb_dn_compare: int (struct ldb_dn *, struct ldb_dn *)
+ldb_dn_compare_base: int (struct ldb_dn *, struct ldb_dn *)
+ldb_dn_copy: struct ldb_dn *(TALLOC_CTX *, struct ldb_dn *)
+ldb_dn_escape_value: char *(TALLOC_CTX *, struct ldb_val)
+ldb_dn_extended_add_syntax: int (struct ldb_context *, unsigned int, const 
struct ldb_dn_extended_syntax *)
+ldb_dn_extended_filter: void (struct ldb_dn *, const char * const *)
+ldb_dn_extended_syntax_by_name: const struct ldb_dn_extended_syntax *(struct 
ldb_context *, const char *)
+ldb_dn_from_ldb_val: struct ldb_dn *(TALLOC_CTX *, struct ldb_context *, const 
struct ldb_val *)
+ldb_dn_get_casefold: const char *(struct ldb_dn *)
+ldb_dn_get_comp_num: int (struct ldb_dn *)
+ldb_dn_get_component_name: const char *(struct ldb_dn *, unsigned int)
+ldb_dn_get_component_val: const struct ldb_val *(struct ldb_dn *, unsigned int)
+ldb_dn_get_extended_comp_num: int (struct ldb_dn *)
+ldb_dn_get_extended_component: const struct ldb_val *(struct ldb_dn *, const 
char *)
+ldb_dn_get_extended_linearized: char *(TALLOC_CTX *, struct ldb_dn *, int)
+ldb_dn_get_ldb_context: struct ldb_context *(struct ldb_dn *)
+ldb_dn_get_linearized: const char *(struct ldb_dn *)
+ldb_dn_get_parent: struct ldb_dn *(TALLOC_CTX *, struct ldb_dn *)
+ldb_dn_get_rdn_name: const char *(struct ldb_dn *)
+ldb_dn_get_rdn_val: const struct ldb_val *(struct ldb_dn *)
+ldb_dn_has_extended: bool (struct ldb_dn *)
+ldb_dn_is_null: bool (struct ldb_dn *)
+ldb_dn_is_special: bool (struct ldb_dn *)
+ldb_dn_is_valid: bool (struct ldb_dn *)
+ldb_dn_map_local: struct ldb_dn *(struct ldb_module *, void *, struct ldb_dn *)
+ldb_dn_map_rebase_remote: struct ldb_dn *(struct ldb_module *, void *, struct 
ldb_dn *)
+ldb_dn_map_remote: struct ldb_dn *(struct ldb_module *, void *, struct ldb_dn 
*)
+ldb_dn_minimise: bool (struct ldb_dn *)
+ldb_dn_new: struct ldb_dn *(TALLOC_CTX *, struct ldb_context *, const char *)
+ldb_dn_new_fmt: struct ldb_dn *(TALLOC_CTX *, struct ldb_context *, const char 
*, ...)
+ldb_dn_remove_base_components: bool (struct ldb_dn *, unsigned int)
+ldb_dn_remove_child_components: bool (struct ldb_dn *, unsigned int)
+ldb_dn_remove_extended_components: void (struct ldb_dn *)
+ldb_dn_replace_components: bool (struct ldb_dn *, struct ldb_dn *)
+ldb_dn_set_component: int (struct ldb_dn *, int, const char *, const struct 
ldb_val)
+ldb_dn_set_extended_component: int (struct ldb_dn *, const char *, const 
struct ldb_val *)
+ldb_dn_update_components: int (struct ldb_dn *, const struct ldb_dn *)
+ldb_dn_validate: bool (struct ldb_dn *)
+ldb_dump_results: void (struct ldb_context *, struct ldb_result *, FILE *)
+ldb_error_at: int (struct ldb_context *, int, const char *, const char *, int)
+ldb_errstring: const char *(struct ldb_context *)
+ldb_extended: int (struct ldb_context *, const char *, void *, struct 
ldb_result **)
+ldb_extended_default_callback: int (struct ldb_request *, struct ldb_reply *)
+ldb_filter_from_tree: char *(TALLOC_CTX *, const struct ldb_parse_tree *)
+ldb_get_config_basedn: struct ldb_dn *(struct ldb_context *)
+ldb_get_create_perms: unsigned int (struct ldb_context *)
+ldb_get_default_basedn: struct ldb_dn *(struct ldb_context *)
+ldb_get_event_context: struct tevent_context *(struct ldb_context *)
+ldb_get_flags: unsigned int (struct ldb_context *)
+ldb_get_opaque: void *(struct ldb_context *, const char *)
+ldb_get_root_basedn: struct ldb_dn *(struct ldb_context *)
+ldb_get_schema_basedn: struct ldb_dn *(struct ldb_context *)
+ldb_global_init: int (void)
+ldb_handle_new: struct ldb_handle *(TALLOC_CTX *, struct ldb_context *)
+ldb_handler_copy: int (struct ldb_context *, void *, const struct ldb_val *, 
struct ldb_val *)
+ldb_handler_fold: int (struct ldb_context *, void *, const struct ldb_val *, 
struct ldb_val *)
+ldb_init: struct ldb_context *(TALLOC_CTX *, struct tevent_context *)
+ldb_ldif_message_string: char *(struct ldb_context *, TALLOC_CTX *, enum 
ldb_changetype, const struct ldb_message *)
+ldb_ldif_parse_modrdn: int (struct ldb_context *, const struct ldb_ldif *, 
TALLOC_CTX *, struct ldb_dn **, struct ldb_dn **, bool *, struct ldb_dn **, 
struct ldb_dn **)
+ldb_ldif_read: struct ldb_ldif *(struct ldb_context *, int (*)(void *), void *)
+ldb_ldif_read_file: struct ldb_ldif *(struct ldb_context *, FILE *)
+ldb_ldif_read_file_state: struct ldb_ldif *(struct ldb_context *, struct 
ldif_read_file_state *)
+ldb_ldif_read_free: void (struct ldb_context *, struct ldb_ldif *)
+ldb_ldif_read_string: struct ldb_ldif *(struct ldb_context *, const char **)
+ldb_ldif_write: int (struct ldb_context *, int (*)(void *, const char *, ...), 
void *, const struct ldb_ldif *)
+ldb_ldif_write_file: int (struct ldb_context *, FILE *, const struct ldb_ldif 
*)
+ldb_ldif_write_redacted_trace_string: char *(struct ldb_context *, TALLOC_CTX 
*, const struct ldb_ldif *)
+ldb_ldif_write_string: char *(struct ldb_context *, TALLOC_CTX *, const struct 
ldb_ldif *)
+ldb_load_modules: int (struct ldb_context *, const char **)
+ldb_map_add: int (struct ldb_module *, struct ldb_request *)
+ldb_map_delete: int (struct ldb_module *, struct ldb_request *)
+ldb_map_init: int (struct ldb_module *, const struct ldb_map_attribute *, 
const struct ldb_map_objectclass *, const char * const *, const char *, const 
char *)
+ldb_map_modify: int (struct ldb_module *, struct ldb_request *)
+ldb_map_rename: int (struct ldb_module *, struct ldb_request *)
+ldb_map_search: int (struct ldb_module *, struct ldb_request *)
+ldb_match_msg: int (struct ldb_context *, const struct ldb_message *, const 
struct ldb_parse_tree *, struct ldb_dn *, enum ldb_scope)
+ldb_match_msg_error: int (struct ldb_context *, const struct ldb_message *, 
const struct ldb_parse_tree *, struct ldb_dn *, enum ldb_scope, bool *)
+ldb_match_msg_objectclass: int (const struct ldb_message *, const char *)
+ldb_mod_register_control: int (struct ldb_module *, const char *)
+ldb_modify: int (struct ldb_context *, const struct ldb_message *)
+ldb_modify_default_callback: int (struct ldb_request *, struct ldb_reply *)
+ldb_module_call_chain: char *(struct ldb_request *, TALLOC_CTX *)
+ldb_module_connect_backend: int (struct ldb_context *, const char *, const 
char **, struct ldb_module **)
+ldb_module_done: int (struct ldb_request *, struct ldb_control **, struct 
ldb_extended *, int)
+ldb_module_flags: uint32_t (struct ldb_context *)
+ldb_module_get_ctx: struct ldb_context *(struct ldb_module *)
+ldb_module_get_name: const char *(struct ldb_module *)
+ldb_module_get_ops: const struct ldb_module_ops *(struct ldb_module *)
+ldb_module_get_private: void *(struct ldb_module *)
+ldb_module_init_chain: int (struct ldb_context *, struct ldb_module *)
+ldb_module_load_list: int (struct ldb_context *, const char **, struct 
ldb_module *, struct ldb_module **)
+ldb_module_new: struct ldb_module *(TALLOC_CTX *, struct ldb_context *, const 
char *, const struct ldb_module_ops *)
+ldb_module_next: struct ldb_module *(struct ldb_module *)
+ldb_module_popt_options: struct poptOption **(struct ldb_context *)
+ldb_module_send_entry: int (struct ldb_request *, struct ldb_message *, struct 
ldb_control **)
+ldb_module_send_referral: int (struct ldb_request *, char *)
+ldb_module_set_next: void (struct ldb_module *, struct ldb_module *)
+ldb_module_set_private: void (struct ldb_module *, void *)
+ldb_modules_hook: int (struct ldb_context *, enum ldb_module_hook_type)
+ldb_modules_list_from_string: const char **(struct ldb_context *, TALLOC_CTX 
*, const char *)
+ldb_modules_load: int (const char *, const char *)
+ldb_msg_add: int (struct ldb_message *, const struct ldb_message_element *, 
int)
+ldb_msg_add_empty: int (struct ldb_message *, const char *, int, struct 
ldb_message_element **)
+ldb_msg_add_fmt: int (struct ldb_message *, const char *, const char *, ...)
+ldb_msg_add_linearized_dn: int (struct ldb_message *, const char *, struct 
ldb_dn *)
+ldb_msg_add_steal_string: int (struct ldb_message *, const char *, char *)
+ldb_msg_add_steal_value: int (struct ldb_message *, const char *, struct 
ldb_val *)
+ldb_msg_add_string: int (struct ldb_message *, const char *, const char *)
+ldb_msg_add_value: int (struct ldb_message *, const char *, const struct 
ldb_val *, struct ldb_message_element **)
+ldb_msg_canonicalize: struct ldb_message *(struct ldb_context *, const struct 
ldb_message *)
+ldb_msg_check_string_attribute: int (const struct ldb_message *, const char *, 
const char *)
+ldb_msg_copy: struct ldb_message *(TALLOC_CTX *, const struct ldb_message *)
+ldb_msg_copy_attr: int (struct ldb_message *, const char *, const char *)
+ldb_msg_copy_shallow: struct ldb_message *(TALLOC_CTX *, const struct 
ldb_message *)
+ldb_msg_diff: struct ldb_message *(struct ldb_context *, struct ldb_message *, 
struct ldb_message *)
+ldb_msg_difference: int (struct ldb_context *, TALLOC_CTX *, struct 
ldb_message *, struct ldb_message *, struct ldb_message **)
+ldb_msg_element_compare: int (struct ldb_message_element *, struct 
ldb_message_element *)
+ldb_msg_element_compare_name: int (struct ldb_message_element *, struct 
ldb_message_element *)
+ldb_msg_element_equal_ordered: bool (const struct ldb_message_element *, const 
struct ldb_message_element *)
+ldb_msg_find_attr_as_bool: int (const struct ldb_message *, const char *, int)
+ldb_msg_find_attr_as_dn: struct ldb_dn *(struct ldb_context *, TALLOC_CTX *, 
const struct ldb_message *, const char *)
+ldb_msg_find_attr_as_double: double (const struct ldb_message *, const char *, 
double)
+ldb_msg_find_attr_as_int: int (const struct ldb_message *, const char *, int)
+ldb_msg_find_attr_as_int64: int64_t (const struct ldb_message *, const char *, 
int64_t)
+ldb_msg_find_attr_as_string: const char *(const struct ldb_message *, const 
char *, const char *)
+ldb_msg_find_attr_as_uint: unsigned int (const struct ldb_message *, const 
char *, unsigned int)
+ldb_msg_find_attr_as_uint64: uint64_t (const struct ldb_message *, const char 
*, uint64_t)
+ldb_msg_find_element: struct ldb_message_element *(const struct ldb_message *, 
const char *)
+ldb_msg_find_ldb_val: const struct ldb_val *(const struct ldb_message *, const 
char *)
+ldb_msg_find_val: struct ldb_val *(const struct ldb_message_element *, struct 
ldb_val *)
+ldb_msg_new: struct ldb_message *(TALLOC_CTX *)
+ldb_msg_normalize: int (struct ldb_context *, TALLOC_CTX *, const struct 
ldb_message *, struct ldb_message **)
+ldb_msg_remove_attr: void (struct ldb_message *, const char *)
+ldb_msg_remove_element: void (struct ldb_message *, struct ldb_message_element 
*)
+ldb_msg_rename_attr: int (struct ldb_message *, const char *, const char *)
+ldb_msg_sanity_check: int (struct ldb_context *, const struct ldb_message *)
+ldb_msg_sort_elements: void (struct ldb_message *)
+ldb_next_del_trans: int (struct ldb_module *)
+ldb_next_end_trans: int (struct ldb_module *)
+ldb_next_init: int (struct ldb_module *)
+ldb_next_prepare_commit: int (struct ldb_module *)
+ldb_next_remote_request: int (struct ldb_module *, struct ldb_request *)
+ldb_next_request: int (struct ldb_module *, struct ldb_request *)
+ldb_next_start_trans: int (struct ldb_module *)
+ldb_op_default_callback: int (struct ldb_request *, struct ldb_reply *)
+ldb_options_find: const char *(struct ldb_context *, const char **, const char 
*)
+ldb_pack_data: int (struct ldb_context *, const struct ldb_message *, struct 
ldb_val *)
+ldb_parse_control_from_string: struct ldb_control *(struct ldb_context *, 
TALLOC_CTX *, const char *)
+ldb_parse_control_strings: struct ldb_control **(struct ldb_context *, 
TALLOC_CTX *, const char **)
+ldb_parse_tree: struct ldb_parse_tree *(TALLOC_CTX *, const char *)
+ldb_parse_tree_attr_replace: void (struct ldb_parse_tree *, const char *, 
const char *)
+ldb_parse_tree_copy_shallow: struct ldb_parse_tree *(TALLOC_CTX *, const 
struct ldb_parse_tree *)
+ldb_parse_tree_walk: int (struct ldb_parse_tree *, int (*)(struct 
ldb_parse_tree *, void *), void *)
+ldb_qsort: void (void * const, size_t, size_t, void *, ldb_qsort_cmp_fn_t)
+ldb_register_backend: int (const char *, ldb_connect_fn, bool)
+ldb_register_extended_match_rule: int (struct ldb_context *, const struct 
ldb_extended_match_rule *)
+ldb_register_hook: int (ldb_hook_fn)
+ldb_register_module: int (const struct ldb_module_ops *)
+ldb_rename: int (struct ldb_context *, struct ldb_dn *, struct ldb_dn *)
+ldb_reply_add_control: int (struct ldb_reply *, const char *, bool, void *)
+ldb_reply_get_control: struct ldb_control *(struct ldb_reply *, const char *)
+ldb_req_get_custom_flags: uint32_t (struct ldb_request *)
+ldb_req_is_untrusted: bool (struct ldb_request *)
+ldb_req_location: const char *(struct ldb_request *)
+ldb_req_mark_trusted: void (struct ldb_request *)
+ldb_req_mark_untrusted: void (struct ldb_request *)
+ldb_req_set_custom_flags: void (struct ldb_request *, uint32_t)
+ldb_req_set_location: void (struct ldb_request *, const char *)
+ldb_request: int (struct ldb_context *, struct ldb_request *)
+ldb_request_add_control: int (struct ldb_request *, const char *, bool, void *)
+ldb_request_done: int (struct ldb_request *, int)
+ldb_request_get_control: struct ldb_control *(struct ldb_request *, const char 
*)
+ldb_request_get_status: int (struct ldb_request *)
+ldb_request_replace_control: int (struct ldb_request *, const char *, bool, 
void *)
+ldb_request_set_state: void (struct ldb_request *, int)
+ldb_reset_err_string: void (struct ldb_context *)
+ldb_save_controls: int (struct ldb_control *, struct ldb_request *, struct 
ldb_control ***)
+ldb_schema_attribute_add: int (struct ldb_context *, const char *, unsigned 
int, const char *)
+ldb_schema_attribute_add_with_syntax: int (struct ldb_context *, const char *, 
unsigned int, const struct ldb_schema_syntax *)
+ldb_schema_attribute_by_name: const struct ldb_schema_attribute *(struct 
ldb_context *, const char *)
+ldb_schema_attribute_remove: void (struct ldb_context *, const char *)
+ldb_schema_attribute_set_override_handler: void (struct ldb_context *, 
ldb_attribute_handler_override_fn_t, void *)
+ldb_search: int (struct ldb_context *, TALLOC_CTX *, struct ldb_result **, 
struct ldb_dn *, enum ldb_scope, const char * const *, const char *, ...)
+ldb_search_default_callback: int (struct ldb_request *, struct ldb_reply *)
+ldb_sequence_number: int (struct ldb_context *, enum ldb_sequence_type, 
uint64_t *)
+ldb_set_create_perms: void (struct ldb_context *, unsigned int)
+ldb_set_debug: int (struct ldb_context *, void (*)(void *, enum 
ldb_debug_level, const char *, va_list), void *)
+ldb_set_debug_stderr: int (struct ldb_context *)
+ldb_set_default_dns: void (struct ldb_context *)
+ldb_set_errstring: void (struct ldb_context *, const char *)
+ldb_set_event_context: void (struct ldb_context *, struct tevent_context *)
+ldb_set_flags: void (struct ldb_context *, unsigned int)
+ldb_set_modules_dir: void (struct ldb_context *, const char *)
+ldb_set_opaque: int (struct ldb_context *, const char *, void *)
+ldb_set_timeout: int (struct ldb_context *, struct ldb_request *, int)
+ldb_set_timeout_from_prev_req: int (struct ldb_context *, struct ldb_request 
*, struct ldb_request *)
+ldb_set_utf8_default: void (struct ldb_context *)
+ldb_set_utf8_fns: void (struct ldb_context *, void *, char *(*)(void *, void 
*, const char *, size_t))
+ldb_setup_wellknown_attributes: int (struct ldb_context *)
+ldb_should_b64_encode: int (struct ldb_context *, const struct ldb_val *)
+ldb_standard_syntax_by_name: const struct ldb_schema_syntax *(struct 
ldb_context *, const char *)
+ldb_strerror: const char *(int)
+ldb_string_to_time: time_t (const char *)
+ldb_string_utc_to_time: time_t (const char *)
+ldb_timestring: char *(TALLOC_CTX *, time_t)
+ldb_timestring_utc: char *(TALLOC_CTX *, time_t)
+ldb_transaction_cancel: int (struct ldb_context *)
+ldb_transaction_cancel_noerr: int (struct ldb_context *)
+ldb_transaction_commit: int (struct ldb_context *)
+ldb_transaction_prepare_commit: int (struct ldb_context *)
+ldb_transaction_start: int (struct ldb_context *)
+ldb_unpack_data: int (struct ldb_context *, const struct ldb_val *, struct 
ldb_message *)
+ldb_unpack_data_only_attr_list: int (struct ldb_context *, const struct 
ldb_val *, struct ldb_message *, const char * const *, unsigned int, unsigned 
int *)
+ldb_val_dup: struct ldb_val (TALLOC_CTX *, const struct ldb_val *)
+ldb_val_equal_exact: int (const struct ldb_val *, const struct ldb_val *)
+ldb_val_map_local: struct ldb_val (struct ldb_module *, void *, const struct 
ldb_map_attribute *, const struct ldb_val *)
+ldb_val_map_remote: struct ldb_val (struct ldb_module *, void *, const struct 
ldb_map_attribute *, const struct ldb_val *)
+ldb_val_string_cmp: int (const struct ldb_val *, const char *)
+ldb_val_to_time: int (const struct ldb_val *, time_t *)
+ldb_valid_attr_name: int (const char *)
+ldb_vdebug: void (struct ldb_context *, enum ldb_debug_level, const char *, 
va_list)
+ldb_wait: int (struct ldb_handle *, enum ldb_wait_type)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ldb-1.1.24/ABI/pyldb-util-1.1.25.sigs 
new/ldb-1.1.25/ABI/pyldb-util-1.1.25.sigs
--- old/ldb-1.1.24/ABI/pyldb-util-1.1.25.sigs   1970-01-01 01:00:00.000000000 
+0100
+++ new/ldb-1.1.25/ABI/pyldb-util-1.1.25.sigs   2015-12-17 08:18:20.000000000 
+0100
@@ -0,0 +1,2 @@
+pyldb_Dn_FromDn: PyObject *(struct ldb_dn *)
+pyldb_Object_AsDn: bool (TALLOC_CTX *, PyObject *, struct ldb_context *, 
struct ldb_dn **)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ldb-1.1.24/common/ldb_pack.c 
new/ldb-1.1.25/common/ldb_pack.c
--- old/ldb-1.1.24/common/ldb_pack.c    2014-09-16 20:04:31.000000000 +0200
+++ new/ldb-1.1.25/common/ldb_pack.c    2015-12-17 08:18:20.000000000 +0100
@@ -77,7 +77,7 @@
                  struct ldb_val *data)
 {
        unsigned int i, j, real_elements=0;
-       size_t size;
+       size_t size, dn_len, attr_len, value_len;
        const char *dn;
        uint8_t *p;
        size_t len;
@@ -91,8 +91,19 @@
        /* work out how big it needs to be */
        size = 8;
 
-       size += 1 + strlen(dn);
+       size += 1;
 
+       dn_len = strlen(dn);
+       if (size + dn_len < size) {
+               errno = ENOMEM;
+               return -1;
+       }
+       size += dn_len;
+
+       /*
+        * First calcuate the buffer size we need, and check for
+        * overflows
+        */
        for (i=0;i<message->num_elements;i++) {
                if (attribute_storable_values(&message->elements[i]) == 0) {
                        continue;
@@ -100,9 +111,32 @@
 
                real_elements++;
 
-               size += 1 + strlen(message->elements[i].name) + 4;
+               if (size + 5 < size) {
+                       errno = ENOMEM;
+                       return -1;
+               }
+               size += 5;
+
+               attr_len = strlen(message->elements[i].name);
+               if (size + attr_len < size) {
+                       errno = ENOMEM;
+                       return -1;
+               }
+               size += attr_len;
+
                for (j=0;j<message->elements[i].num_values;j++) {
-                       size += 4 + message->elements[i].values[j].length + 1;
+                       if (size + 5 < size) {
+                               errno = ENOMEM;
+                               return -1;
+                       }
+                       size += 5;
+
+                       value_len = message->elements[i].values[j].length;
+                       if (size + value_len < size) {
+                               errno = ENOMEM;
+                               return -1;
+                       }
+                       size += value_len;
                }
        }
 
@@ -121,7 +155,7 @@
 
        /* the dn needs to be packed so we can be case preserving
           while hashing on a case folded dn */
-       len = strlen(dn);
+       len = dn_len;
        memcpy(p, dn, len+1);
        p += len + 1;
 
@@ -146,20 +180,64 @@
        return 0;
 }
 
-/*
-  unpack a ldb message from a linear buffer in ldb_val
+static bool ldb_consume_element_data(uint8_t **pp, size_t *premaining)
+{
+       unsigned int remaining = *premaining;
+       uint8_t *p = *pp;
+       uint32_t num_values = pull_uint32(p, 0);
+       uint32_t len;
+       int j;
+
+       p += 4;
+       if (remaining < 4) {
+               return false;
+       }
+       remaining -= 4;
+       for (j = 0; j < num_values; j++) {
+               len = pull_uint32(p, 0);
+               if (remaining < 5) {
+                       return false;
+               }
+               remaining -= 5;
+               if (len > remaining) {
+                       return false;
+               }
+               remaining -= len;
+               p += len + 4 + 1;
+       }
+
+       *premaining = remaining;
+       *pp = p;
+       return true;
+}
 
-  Free with ldb_unpack_data_free()
-*/
-int ldb_unpack_data(struct ldb_context *ldb,
-                   const struct ldb_val *data,
-                   struct ldb_message *message)
+/*
+ * Unpack a ldb message from a linear buffer in ldb_val
+ *
+ * Providing a list of attributes to this function allows selective unpacking.
+ * Giving a NULL list (or a list_size of 0) unpacks all the attributes.
+ *
+ * Free with ldb_unpack_data_free()
+ */
+int ldb_unpack_data_only_attr_list(struct ldb_context *ldb,
+                                  const struct ldb_val *data,
+                                  struct ldb_message *message,
+                                  const char * const *list,
+                                  unsigned int list_size,
+                                  unsigned int *nb_elements_in_db)
 {
        uint8_t *p;
-       unsigned int remaining;
+       size_t remaining;
+       size_t dn_len;
        unsigned int i, j;
        unsigned format;
+       unsigned int nelem = 0;
        size_t len;
+       unsigned int found = 0;
+
+       if (list == NULL) {
+               list_size = 0;
+       }
 
        message->elements = NULL;
 
@@ -172,6 +250,9 @@
        format = pull_uint32(p, 0);
        message->num_elements = pull_uint32(p, 4);
        p += 8;
+       if (nb_elements_in_db) {
+               *nb_elements_in_db = message->num_elements;
+       }
 
        remaining = data->length - 8;
 
@@ -181,8 +262,12 @@
                break;
 
        case LDB_PACKING_FORMAT:
-               len = strnlen((char *)p, remaining);
-               if (len == remaining) {
+               /*
+                * With this check, we know that the DN at p is \0
+                * terminated.
+                */
+               dn_len = strnlen((char *)p, remaining);
+               if (dn_len == remaining) {
                        errno = EIO;
                        goto failed;
                }
@@ -191,8 +276,17 @@
                        errno = ENOMEM;
                        goto failed;
                }
-               remaining -= len + 1;
-               p += len + 1;
+               /*
+                * Redundant: by definition, remaining must be more
+                * than one less than dn_len, as otherwise it would be
+                * == dn_len
+                */
+               if (remaining < dn_len + 1) {
+                       errno = EIO;
+                       goto failed;
+               }
+               remaining -= dn_len + 1;
+               p += dn_len + 1;
                break;
 
        default:
@@ -209,74 +303,157 @@
                goto failed;
        }
 
-       message->elements = talloc_array(message, struct ldb_message_element, 
message->num_elements);
+       message->elements = talloc_zero_array(message, struct 
ldb_message_element,
+                                             message->num_elements);
        if (!message->elements) {
                errno = ENOMEM;
                goto failed;
        }
 
-       memset(message->elements, 0,
-              message->num_elements * sizeof(struct ldb_message_element));
-
        for (i=0;i<message->num_elements;i++) {
+               const char *attr = NULL;
+               size_t attr_len;
+               struct ldb_message_element *element = NULL;
+
                if (remaining < 10) {
                        errno = EIO;
                        goto failed;
                }
-               len = strnlen((char *)p, remaining-6);
-               if (len == remaining-6) {
+               /*
+                * With this check, we know that the attribute name at
+                * p is \0 terminated.
+                */
+               attr_len = strnlen((char *)p, remaining-6);
+               if (attr_len == remaining-6) {
                        errno = EIO;
                        goto failed;
                }
-               if (len == 0) {
+               if (attr_len == 0) {
                        errno = EIO;
                        goto failed;
                }
-               message->elements[i].flags = 0;
-               message->elements[i].name = talloc_strndup(message->elements, 
(char *)p, len);
-               if (message->elements[i].name == NULL) {
+               attr = (char *)p;
+
+               /*
+                * The general idea is to reduce allocations by skipping over
+                * attributes that we do not actually care about.
+                *
+                * This is a bit expensive but normally the list is pretty small
+                * also the cost of freeing unused attributes is quite important
+                * and can dwarf the cost of looping.
+                */
+               if (list_size != 0) {
+                       bool keep = false;
+                       int h;
+
+                       /*
+                        * We know that p has a \0 terminator before the
+                        * end of the buffer due to the check above.
+                        */
+                       for (h = 0; h < list_size && found < list_size; h++) {
+                               if (ldb_attr_cmp(attr, list[h]) == 0) {
+                                       keep = true;
+                                       found++;
+                                       break;
+                               }
+                       }
+
+                       if (!keep) {
+                               if (remaining < (attr_len + 1)) {
+                                       errno = EIO;
+                                       goto failed;
+                               }
+                               remaining -= attr_len + 1;
+                               p += attr_len + 1;
+                               if (!ldb_consume_element_data(&p, &remaining)) {
+                                       errno = EIO;
+                                       goto failed;
+                               }
+                               continue;
+                       }
+               }
+               element = &message->elements[nelem];
+               element->name = talloc_memdup(message->elements, attr, 
attr_len+1);
+
+               if (element->name == NULL) {
                        errno = ENOMEM;
                        goto failed;
                }
-               remaining -= len + 1;
-               p += len + 1;
-               message->elements[i].num_values = pull_uint32(p, 0);
-               message->elements[i].values = NULL;
-               if (message->elements[i].num_values != 0) {
-                       message->elements[i].values = 
talloc_array(message->elements,
-                                                                    struct 
ldb_val,
-                                                                    
message->elements[i].num_values);
-                       if (!message->elements[i].values) {
+               element->flags = 0;
+
+               if (remaining < (attr_len + 1)) {
+                       errno = EIO;
+                       goto failed;
+               }
+               remaining -= attr_len + 1;
+               p += attr_len + 1;
+               element->num_values = pull_uint32(p, 0);
+               element->values = NULL;
+               if (element->num_values != 0) {
+                       element->values = talloc_array(message->elements,
+                                                      struct ldb_val,
+                                                      element->num_values);
+                       if (!element->values) {
                                errno = ENOMEM;
                                goto failed;
                        }
                }
                p += 4;
+               if (remaining < 4) {
+                       errno = EIO;
+                       goto failed;
+               }
                remaining -= 4;
-               for (j=0;j<message->elements[i].num_values;j++) {
+               for (j = 0; j < element->num_values; j++) {
+                       if (remaining < 5) {
+                               errno = EIO;
+                               goto failed;
+                       }
+                       remaining -= 5;
+
                        len = pull_uint32(p, 0);
-                       if (len > remaining-5) {
+                       if (remaining < len) {
+                               errno = EIO;
+                               goto failed;
+                       }
+                       if (len + 1 < len) {
                                errno = EIO;
                                goto failed;
                        }
 
-                       message->elements[i].values[j].length = len;
-                       message->elements[i].values[j].data = 
talloc_size(message->elements[i].values, len+1);
-                       if (message->elements[i].values[j].data == NULL) {
+                       element->values[j].length = len;
+                       element->values[j].data = talloc_size(element->values, 
len+1);
+                       if (element->values[j].data == NULL) {
                                errno = ENOMEM;
                                goto failed;
                        }
-                       memcpy(message->elements[i].values[j].data, p+4, len);
-                       message->elements[i].values[j].data[len] = 0;
+                       memcpy(element->values[j].data, p + 4,
+                              len);
+                       element->values[j].data[len] = 0;
 
-                       remaining -= len+4+1;
+                       remaining -= len;
                        p += len+4+1;
                }
+               nelem++;
        }
+       /*
+        * Adapt the number of elements to the real number of unpacked elements,
+        * it means that we overallocated elements array.
+        */
+       message->num_elements = nelem;
+
+       /*
+        * Shrink the allocated size.  On current talloc behaviour
+        * this will help if we skipped 32 or more attributes.
+        */
+       message->elements = talloc_realloc(message, message->elements,
+                                          struct ldb_message_element,
+                                          message->num_elements);
 
        if (remaining != 0) {
                ldb_debug(ldb, LDB_DEBUG_ERROR,
-                         "Error: %d bytes unread in ldb_unpack_data", 
remaining);
+                         "Error: %zu bytes unread in 
ldb_unpack_data_only_attr_list",
+                         remaining);
        }
 
        return 0;
@@ -285,3 +462,10 @@
        talloc_free(message->elements);
        return -1;
 }
+
+int ldb_unpack_data(struct ldb_context *ldb,
+                   const struct ldb_val *data,
+                   struct ldb_message *message)
+{
+       return ldb_unpack_data_only_attr_list(ldb, data, message, NULL, 0, 
NULL);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ldb-1.1.24/include/ldb_module.h 
new/ldb-1.1.25/include/ldb_module.h
--- old/ldb-1.1.24/include/ldb_module.h 2015-12-10 12:01:40.000000000 +0100
+++ new/ldb-1.1.25/include/ldb_module.h 2015-12-17 08:18:20.000000000 +0100
@@ -390,6 +390,12 @@
 int ldb_pack_data(struct ldb_context *ldb,
                  const struct ldb_message *message,
                  struct ldb_val *data);
+int ldb_unpack_data_only_attr_list(struct ldb_context *ldb,
+                                  const struct ldb_val *data,
+                                  struct ldb_message *message,
+                                  const char* const * list,
+                                  unsigned int list_size,
+                                  unsigned int *nb_attributes_indb);
 int ldb_unpack_data(struct ldb_context *ldb,
                    const struct ldb_val *data,
                    struct ldb_message *message);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ldb-1.1.24/wscript new/ldb-1.1.25/wscript
--- old/ldb-1.1.24/wscript      2015-12-10 12:01:40.000000000 +0100
+++ new/ldb-1.1.25/wscript      2015-12-17 08:18:20.000000000 +0100
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 
 APPNAME = 'ldb'
-VERSION = '1.1.24'
+VERSION = '1.1.25'
 
 blddir = 'bin'
 



Reply via email to