diff -pruN 2:2.2.3-2/ABI/ldb-2.2.1.sigs 2:2.4.2-0ubuntu1/ABI/ldb-2.2.1.sigs
--- 2:2.2.3-2/ABI/ldb-2.2.1.sigs	2021-11-02 22:53:09.467799200 +0000
+++ 2:2.4.2-0ubuntu1/ABI/ldb-2.2.1.sigs	1970-01-01 00:00:00.000000000 +0000
@@ -1,283 +0,0 @@
-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_add_child_val: bool (struct ldb_dn *, const char *, struct ldb_val)
-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_attrs: int (struct ldb_context *, const struct ldb_message *, const char * const *, struct ldb_message *)
-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_get_event_context: struct tevent_context *(struct ldb_handle *)
-ldb_handle_new: struct ldb_handle *(TALLOC_CTX *, struct ldb_context *)
-ldb_handle_use_global_event_context: void (struct ldb_handle *)
-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_redacted_string: char *(struct ldb_context *, TALLOC_CTX *, enum ldb_changetype, const struct ldb_message *)
-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_message: int (struct ldb_context *, const struct ldb_message *, const struct ldb_parse_tree *, enum ldb_scope, bool *)
-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_common_values: int (struct ldb_context *, TALLOC_CTX *, struct ldb_message_element *, struct ldb_message_element *, uint32_t)
-ldb_msg_find_duplicate_val: int (struct ldb_context *, TALLOC_CTX *, const struct ldb_message_element *, struct ldb_val **, uint32_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_read_lock: int (struct ldb_module *)
-ldb_next_read_unlock: 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_copy: const char **(TALLOC_CTX *, const char **)
-ldb_options_find: const char *(struct ldb_context *, const char **, const char *)
-ldb_options_get: const char **(struct ldb_context *)
-ldb_pack_data: int (struct ldb_context *, const struct ldb_message *, struct ldb_val *, uint32_t)
-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_fill_with_syntax: int (struct ldb_context *, TALLOC_CTX *, const char *, unsigned int, const struct ldb_schema_syntax *, struct ldb_schema_attribute *)
-ldb_schema_attribute_remove: void (struct ldb_context *, const char *)
-ldb_schema_attribute_remove_flagged: void (struct ldb_context *, unsigned int)
-ldb_schema_attribute_set_override_handler: void (struct ldb_context *, ldb_attribute_handler_override_fn_t, void *)
-ldb_schema_set_override_GUID_index: void (struct ldb_context *, const char *, const char *)
-ldb_schema_set_override_indexlist: void (struct ldb_context *, bool)
-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_require_private_event_context: void (struct ldb_context *)
-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_flags: int (struct ldb_context *, const struct ldb_val *, struct ldb_message *, unsigned int)
-ldb_unpack_get_format: int (const struct ldb_val *, uint32_t *)
-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 -pruN 2:2.2.3-2/ABI/ldb-2.2.2.sigs 2:2.4.2-0ubuntu1/ABI/ldb-2.2.2.sigs
--- 2:2.2.3-2/ABI/ldb-2.2.2.sigs	2021-11-02 22:53:09.467799200 +0000
+++ 2:2.4.2-0ubuntu1/ABI/ldb-2.2.2.sigs	1970-01-01 00:00:00.000000000 +0000
@@ -1,283 +0,0 @@
-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_add_child_val: bool (struct ldb_dn *, const char *, struct ldb_val)
-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_attrs: int (struct ldb_context *, const struct ldb_message *, const char * const *, struct ldb_message *)
-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_get_event_context: struct tevent_context *(struct ldb_handle *)
-ldb_handle_new: struct ldb_handle *(TALLOC_CTX *, struct ldb_context *)
-ldb_handle_use_global_event_context: void (struct ldb_handle *)
-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_redacted_string: char *(struct ldb_context *, TALLOC_CTX *, enum ldb_changetype, const struct ldb_message *)
-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_message: int (struct ldb_context *, const struct ldb_message *, const struct ldb_parse_tree *, enum ldb_scope, bool *)
-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_common_values: int (struct ldb_context *, TALLOC_CTX *, struct ldb_message_element *, struct ldb_message_element *, uint32_t)
-ldb_msg_find_duplicate_val: int (struct ldb_context *, TALLOC_CTX *, const struct ldb_message_element *, struct ldb_val **, uint32_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_read_lock: int (struct ldb_module *)
-ldb_next_read_unlock: 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_copy: const char **(TALLOC_CTX *, const char **)
-ldb_options_find: const char *(struct ldb_context *, const char **, const char *)
-ldb_options_get: const char **(struct ldb_context *)
-ldb_pack_data: int (struct ldb_context *, const struct ldb_message *, struct ldb_val *, uint32_t)
-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_fill_with_syntax: int (struct ldb_context *, TALLOC_CTX *, const char *, unsigned int, const struct ldb_schema_syntax *, struct ldb_schema_attribute *)
-ldb_schema_attribute_remove: void (struct ldb_context *, const char *)
-ldb_schema_attribute_remove_flagged: void (struct ldb_context *, unsigned int)
-ldb_schema_attribute_set_override_handler: void (struct ldb_context *, ldb_attribute_handler_override_fn_t, void *)
-ldb_schema_set_override_GUID_index: void (struct ldb_context *, const char *, const char *)
-ldb_schema_set_override_indexlist: void (struct ldb_context *, bool)
-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_require_private_event_context: void (struct ldb_context *)
-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_flags: int (struct ldb_context *, const struct ldb_val *, struct ldb_message *, unsigned int)
-ldb_unpack_get_format: int (const struct ldb_val *, uint32_t *)
-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 -pruN 2:2.2.3-2/ABI/ldb-2.2.3.sigs 2:2.4.2-0ubuntu1/ABI/ldb-2.2.3.sigs
--- 2:2.2.3-2/ABI/ldb-2.2.3.sigs	2021-11-02 22:53:09.467799200 +0000
+++ 2:2.4.2-0ubuntu1/ABI/ldb-2.2.3.sigs	1970-01-01 00:00:00.000000000 +0000
@@ -1,283 +0,0 @@
-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_add_child_val: bool (struct ldb_dn *, const char *, struct ldb_val)
-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_attrs: int (struct ldb_context *, const struct ldb_message *, const char * const *, struct ldb_message *)
-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_get_event_context: struct tevent_context *(struct ldb_handle *)
-ldb_handle_new: struct ldb_handle *(TALLOC_CTX *, struct ldb_context *)
-ldb_handle_use_global_event_context: void (struct ldb_handle *)
-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_redacted_string: char *(struct ldb_context *, TALLOC_CTX *, enum ldb_changetype, const struct ldb_message *)
-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_message: int (struct ldb_context *, const struct ldb_message *, const struct ldb_parse_tree *, enum ldb_scope, bool *)
-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_common_values: int (struct ldb_context *, TALLOC_CTX *, struct ldb_message_element *, struct ldb_message_element *, uint32_t)
-ldb_msg_find_duplicate_val: int (struct ldb_context *, TALLOC_CTX *, const struct ldb_message_element *, struct ldb_val **, uint32_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_read_lock: int (struct ldb_module *)
-ldb_next_read_unlock: 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_copy: const char **(TALLOC_CTX *, const char **)
-ldb_options_find: const char *(struct ldb_context *, const char **, const char *)
-ldb_options_get: const char **(struct ldb_context *)
-ldb_pack_data: int (struct ldb_context *, const struct ldb_message *, struct ldb_val *, uint32_t)
-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_fill_with_syntax: int (struct ldb_context *, TALLOC_CTX *, const char *, unsigned int, const struct ldb_schema_syntax *, struct ldb_schema_attribute *)
-ldb_schema_attribute_remove: void (struct ldb_context *, const char *)
-ldb_schema_attribute_remove_flagged: void (struct ldb_context *, unsigned int)
-ldb_schema_attribute_set_override_handler: void (struct ldb_context *, ldb_attribute_handler_override_fn_t, void *)
-ldb_schema_set_override_GUID_index: void (struct ldb_context *, const char *, const char *)
-ldb_schema_set_override_indexlist: void (struct ldb_context *, bool)
-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_require_private_event_context: void (struct ldb_context *)
-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_flags: int (struct ldb_context *, const struct ldb_val *, struct ldb_message *, unsigned int)
-ldb_unpack_get_format: int (const struct ldb_val *, uint32_t *)
-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 -pruN 2:2.2.3-2/ABI/ldb-2.4.0.sigs 2:2.4.2-0ubuntu1/ABI/ldb-2.4.0.sigs
--- 2:2.2.3-2/ABI/ldb-2.4.0.sigs	1970-01-01 00:00:00.000000000 +0000
+++ 2:2.4.2-0ubuntu1/ABI/ldb-2.4.0.sigs	2022-01-24 12:18:16.322473500 +0000
@@ -0,0 +1,283 @@
+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_add_child_val: bool (struct ldb_dn *, const char *, struct ldb_val)
+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_attrs: int (struct ldb_context *, const struct ldb_message *, const char * const *, struct ldb_message *)
+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_get_event_context: struct tevent_context *(struct ldb_handle *)
+ldb_handle_new: struct ldb_handle *(TALLOC_CTX *, struct ldb_context *)
+ldb_handle_use_global_event_context: void (struct ldb_handle *)
+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_redacted_string: char *(struct ldb_context *, TALLOC_CTX *, enum ldb_changetype, const struct ldb_message *)
+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_message: int (struct ldb_context *, const struct ldb_message *, const struct ldb_parse_tree *, enum ldb_scope, bool *)
+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_common_values: int (struct ldb_context *, TALLOC_CTX *, struct ldb_message_element *, struct ldb_message_element *, uint32_t)
+ldb_msg_find_duplicate_val: int (struct ldb_context *, TALLOC_CTX *, const struct ldb_message_element *, struct ldb_val **, uint32_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_read_lock: int (struct ldb_module *)
+ldb_next_read_unlock: 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_copy: const char **(TALLOC_CTX *, const char **)
+ldb_options_find: const char *(struct ldb_context *, const char **, const char *)
+ldb_options_get: const char **(struct ldb_context *)
+ldb_pack_data: int (struct ldb_context *, const struct ldb_message *, struct ldb_val *, uint32_t)
+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_fill_with_syntax: int (struct ldb_context *, TALLOC_CTX *, const char *, unsigned int, const struct ldb_schema_syntax *, struct ldb_schema_attribute *)
+ldb_schema_attribute_remove: void (struct ldb_context *, const char *)
+ldb_schema_attribute_remove_flagged: void (struct ldb_context *, unsigned int)
+ldb_schema_attribute_set_override_handler: void (struct ldb_context *, ldb_attribute_handler_override_fn_t, void *)
+ldb_schema_set_override_GUID_index: void (struct ldb_context *, const char *, const char *)
+ldb_schema_set_override_indexlist: void (struct ldb_context *, bool)
+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_require_private_event_context: void (struct ldb_context *)
+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_flags: int (struct ldb_context *, const struct ldb_val *, struct ldb_message *, unsigned int)
+ldb_unpack_get_format: int (const struct ldb_val *, uint32_t *)
+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 -pruN 2:2.2.3-2/ABI/ldb-2.4.1.sigs 2:2.4.2-0ubuntu1/ABI/ldb-2.4.1.sigs
--- 2:2.2.3-2/ABI/ldb-2.4.1.sigs	1970-01-01 00:00:00.000000000 +0000
+++ 2:2.4.2-0ubuntu1/ABI/ldb-2.4.1.sigs	2022-01-24 12:18:16.322473500 +0000
@@ -0,0 +1,283 @@
+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_add_child_val: bool (struct ldb_dn *, const char *, struct ldb_val)
+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_attrs: int (struct ldb_context *, const struct ldb_message *, const char * const *, struct ldb_message *)
+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_get_event_context: struct tevent_context *(struct ldb_handle *)
+ldb_handle_new: struct ldb_handle *(TALLOC_CTX *, struct ldb_context *)
+ldb_handle_use_global_event_context: void (struct ldb_handle *)
+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_redacted_string: char *(struct ldb_context *, TALLOC_CTX *, enum ldb_changetype, const struct ldb_message *)
+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_message: int (struct ldb_context *, const struct ldb_message *, const struct ldb_parse_tree *, enum ldb_scope, bool *)
+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_common_values: int (struct ldb_context *, TALLOC_CTX *, struct ldb_message_element *, struct ldb_message_element *, uint32_t)
+ldb_msg_find_duplicate_val: int (struct ldb_context *, TALLOC_CTX *, const struct ldb_message_element *, struct ldb_val **, uint32_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_read_lock: int (struct ldb_module *)
+ldb_next_read_unlock: 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_copy: const char **(TALLOC_CTX *, const char **)
+ldb_options_find: const char *(struct ldb_context *, const char **, const char *)
+ldb_options_get: const char **(struct ldb_context *)
+ldb_pack_data: int (struct ldb_context *, const struct ldb_message *, struct ldb_val *, uint32_t)
+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_fill_with_syntax: int (struct ldb_context *, TALLOC_CTX *, const char *, unsigned int, const struct ldb_schema_syntax *, struct ldb_schema_attribute *)
+ldb_schema_attribute_remove: void (struct ldb_context *, const char *)
+ldb_schema_attribute_remove_flagged: void (struct ldb_context *, unsigned int)
+ldb_schema_attribute_set_override_handler: void (struct ldb_context *, ldb_attribute_handler_override_fn_t, void *)
+ldb_schema_set_override_GUID_index: void (struct ldb_context *, const char *, const char *)
+ldb_schema_set_override_indexlist: void (struct ldb_context *, bool)
+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_require_private_event_context: void (struct ldb_context *)
+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_flags: int (struct ldb_context *, const struct ldb_val *, struct ldb_message *, unsigned int)
+ldb_unpack_get_format: int (const struct ldb_val *, uint32_t *)
+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 -pruN 2:2.2.3-2/ABI/ldb-2.4.2.sigs 2:2.4.2-0ubuntu1/ABI/ldb-2.4.2.sigs
--- 2:2.2.3-2/ABI/ldb-2.4.2.sigs	1970-01-01 00:00:00.000000000 +0000
+++ 2:2.4.2-0ubuntu1/ABI/ldb-2.4.2.sigs	2022-01-24 12:47:34.956465700 +0000
@@ -0,0 +1,283 @@
+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_add_child_val: bool (struct ldb_dn *, const char *, struct ldb_val)
+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_attrs: int (struct ldb_context *, const struct ldb_message *, const char * const *, struct ldb_message *)
+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_get_event_context: struct tevent_context *(struct ldb_handle *)
+ldb_handle_new: struct ldb_handle *(TALLOC_CTX *, struct ldb_context *)
+ldb_handle_use_global_event_context: void (struct ldb_handle *)
+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_redacted_string: char *(struct ldb_context *, TALLOC_CTX *, enum ldb_changetype, const struct ldb_message *)
+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_message: int (struct ldb_context *, const struct ldb_message *, const struct ldb_parse_tree *, enum ldb_scope, bool *)
+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_common_values: int (struct ldb_context *, TALLOC_CTX *, struct ldb_message_element *, struct ldb_message_element *, uint32_t)
+ldb_msg_find_duplicate_val: int (struct ldb_context *, TALLOC_CTX *, const struct ldb_message_element *, struct ldb_val **, uint32_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_read_lock: int (struct ldb_module *)
+ldb_next_read_unlock: 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_copy: const char **(TALLOC_CTX *, const char **)
+ldb_options_find: const char *(struct ldb_context *, const char **, const char *)
+ldb_options_get: const char **(struct ldb_context *)
+ldb_pack_data: int (struct ldb_context *, const struct ldb_message *, struct ldb_val *, uint32_t)
+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_fill_with_syntax: int (struct ldb_context *, TALLOC_CTX *, const char *, unsigned int, const struct ldb_schema_syntax *, struct ldb_schema_attribute *)
+ldb_schema_attribute_remove: void (struct ldb_context *, const char *)
+ldb_schema_attribute_remove_flagged: void (struct ldb_context *, unsigned int)
+ldb_schema_attribute_set_override_handler: void (struct ldb_context *, ldb_attribute_handler_override_fn_t, void *)
+ldb_schema_set_override_GUID_index: void (struct ldb_context *, const char *, const char *)
+ldb_schema_set_override_indexlist: void (struct ldb_context *, bool)
+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_require_private_event_context: void (struct ldb_context *)
+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_flags: int (struct ldb_context *, const struct ldb_val *, struct ldb_message *, unsigned int)
+ldb_unpack_get_format: int (const struct ldb_val *, uint32_t *)
+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 -pruN 2:2.2.3-2/ABI/pyldb-util-2.2.1.sigs 2:2.4.2-0ubuntu1/ABI/pyldb-util-2.2.1.sigs
--- 2:2.2.3-2/ABI/pyldb-util-2.2.1.sigs	2021-11-02 22:53:09.467799200 +0000
+++ 2:2.4.2-0ubuntu1/ABI/pyldb-util-2.2.1.sigs	1970-01-01 00:00:00.000000000 +0000
@@ -1,3 +0,0 @@
-pyldb_Dn_FromDn: PyObject *(struct ldb_dn *)
-pyldb_Object_AsDn: bool (TALLOC_CTX *, PyObject *, struct ldb_context *, struct ldb_dn **)
-pyldb_check_type: bool (PyObject *, const char *)
diff -pruN 2:2.2.3-2/ABI/pyldb-util-2.2.2.sigs 2:2.4.2-0ubuntu1/ABI/pyldb-util-2.2.2.sigs
--- 2:2.2.3-2/ABI/pyldb-util-2.2.2.sigs	2021-11-02 22:53:09.467799200 +0000
+++ 2:2.4.2-0ubuntu1/ABI/pyldb-util-2.2.2.sigs	1970-01-01 00:00:00.000000000 +0000
@@ -1,3 +0,0 @@
-pyldb_Dn_FromDn: PyObject *(struct ldb_dn *)
-pyldb_Object_AsDn: bool (TALLOC_CTX *, PyObject *, struct ldb_context *, struct ldb_dn **)
-pyldb_check_type: bool (PyObject *, const char *)
diff -pruN 2:2.2.3-2/ABI/pyldb-util-2.2.3.sigs 2:2.4.2-0ubuntu1/ABI/pyldb-util-2.2.3.sigs
--- 2:2.2.3-2/ABI/pyldb-util-2.2.3.sigs	2021-11-02 22:53:09.467799200 +0000
+++ 2:2.4.2-0ubuntu1/ABI/pyldb-util-2.2.3.sigs	1970-01-01 00:00:00.000000000 +0000
@@ -1,3 +0,0 @@
-pyldb_Dn_FromDn: PyObject *(struct ldb_dn *)
-pyldb_Object_AsDn: bool (TALLOC_CTX *, PyObject *, struct ldb_context *, struct ldb_dn **)
-pyldb_check_type: bool (PyObject *, const char *)
diff -pruN 2:2.2.3-2/ABI/pyldb-util-2.4.0.sigs 2:2.4.2-0ubuntu1/ABI/pyldb-util-2.4.0.sigs
--- 2:2.2.3-2/ABI/pyldb-util-2.4.0.sigs	1970-01-01 00:00:00.000000000 +0000
+++ 2:2.4.2-0ubuntu1/ABI/pyldb-util-2.4.0.sigs	2022-01-24 12:18:16.322473500 +0000
@@ -0,0 +1,3 @@
+pyldb_Dn_FromDn: PyObject *(struct ldb_dn *)
+pyldb_Object_AsDn: bool (TALLOC_CTX *, PyObject *, struct ldb_context *, struct ldb_dn **)
+pyldb_check_type: bool (PyObject *, const char *)
diff -pruN 2:2.2.3-2/ABI/pyldb-util-2.4.1.sigs 2:2.4.2-0ubuntu1/ABI/pyldb-util-2.4.1.sigs
--- 2:2.2.3-2/ABI/pyldb-util-2.4.1.sigs	1970-01-01 00:00:00.000000000 +0000
+++ 2:2.4.2-0ubuntu1/ABI/pyldb-util-2.4.1.sigs	2022-01-24 12:18:16.322473500 +0000
@@ -0,0 +1,3 @@
+pyldb_Dn_FromDn: PyObject *(struct ldb_dn *)
+pyldb_Object_AsDn: bool (TALLOC_CTX *, PyObject *, struct ldb_context *, struct ldb_dn **)
+pyldb_check_type: bool (PyObject *, const char *)
diff -pruN 2:2.2.3-2/ABI/pyldb-util-2.4.2.sigs 2:2.4.2-0ubuntu1/ABI/pyldb-util-2.4.2.sigs
--- 2:2.2.3-2/ABI/pyldb-util-2.4.2.sigs	1970-01-01 00:00:00.000000000 +0000
+++ 2:2.4.2-0ubuntu1/ABI/pyldb-util-2.4.2.sigs	2022-01-24 12:47:34.956465700 +0000
@@ -0,0 +1,3 @@
+pyldb_Dn_FromDn: PyObject *(struct ldb_dn *)
+pyldb_Object_AsDn: bool (TALLOC_CTX *, PyObject *, struct ldb_context *, struct ldb_dn **)
+pyldb_check_type: bool (PyObject *, const char *)
diff -pruN 2:2.2.3-2/buildtools/bin/waf 2:2.4.2-0ubuntu1/buildtools/bin/waf
--- 2:2.2.3-2/buildtools/bin/waf	2021-11-02 22:53:09.439799000 +0000
+++ 2:2.4.2-0ubuntu1/buildtools/bin/waf	2022-01-24 12:47:34.952465800 +0000
@@ -32,7 +32,7 @@ POSSIBILITY OF SUCH DAMAGE.
 
 import os, sys, inspect
 
-VERSION="2.0.18"
+VERSION="2.0.21"
 REVISION="x"
 GIT="x"
 INSTALL="x"
diff -pruN 2:2.2.3-2/buildtools/wafsamba/samba_autoconf.py 2:2.4.2-0ubuntu1/buildtools/wafsamba/samba_autoconf.py
--- 2:2.2.3-2/buildtools/wafsamba/samba_autoconf.py	2021-10-28 15:29:47.528471500 +0000
+++ 2:2.4.2-0ubuntu1/buildtools/wafsamba/samba_autoconf.py	2022-01-24 12:25:00.172410500 +0000
@@ -905,9 +905,15 @@ def ADD_EXTRA_INCLUDES(conf, includes):
 
 
 
-def CURRENT_CFLAGS(bld, target, cflags, allow_warnings=False, hide_symbols=False):
+def CURRENT_CFLAGS(bld, target, cflags,
+                   allow_warnings=False,
+                   use_hostcc=False,
+                   hide_symbols=False):
     '''work out the current flags. local flags are added first'''
-    ret = TO_LIST(cflags)
+    ret = []
+    if use_hostcc:
+        ret += ['-D_SAMBA_HOSTCC_']
+    ret += TO_LIST(cflags)
     if not 'EXTRA_CFLAGS' in bld.env:
         list = []
     else:
diff -pruN 2:2.2.3-2/buildtools/wafsamba/samba_patterns.py 2:2.4.2-0ubuntu1/buildtools/wafsamba/samba_patterns.py
--- 2:2.2.3-2/buildtools/wafsamba/samba_patterns.py	2021-11-02 22:53:09.439799000 +0000
+++ 2:2.4.2-0ubuntu1/buildtools/wafsamba/samba_patterns.py	2022-01-24 12:25:00.172410500 +0000
@@ -23,6 +23,7 @@ def SAMBA_MKVERSION(bld, target, source=
     # git revision) included in the version.
     t = bld.SAMBA_GENERATOR('VERSION',
                             rule=write_version_header,
+                            group='setup',
                             source=source,
                             target=target,
                             always=bld.is_install)
diff -pruN 2:2.2.3-2/buildtools/wafsamba/samba_python.py 2:2.4.2-0ubuntu1/buildtools/wafsamba/samba_python.py
--- 2:2.2.3-2/buildtools/wafsamba/samba_python.py	2021-11-02 22:53:09.439799000 +0000
+++ 2:2.4.2-0ubuntu1/buildtools/wafsamba/samba_python.py	2022-01-24 12:47:34.952465800 +0000
@@ -7,9 +7,6 @@ from waflib.Configure import conf
 @conf
 def SAMBA_CHECK_PYTHON(conf, version=(3,6,0)):
 
-    if conf.env.disable_python:
-        version=(2,6,0)
-
     if conf.env.enable_fuzzing:
         version=(3,5,0)
 
@@ -61,11 +58,8 @@ def SAMBA_CHECK_PYTHON_HEADERS(conf):
 def _check_python_headers(conf):
     conf.check_python_headers()
 
-    if conf.env['PYTHON_VERSION'] > '3':
-        abi_pattern = os.path.splitext(conf.env['pyext_PATTERN'])[0]
-        conf.env['PYTHON_SO_ABI_FLAG'] = abi_pattern % ''
-    else:
-        conf.env['PYTHON_SO_ABI_FLAG'] = ''
+    abi_pattern = os.path.splitext(conf.env['pyext_PATTERN'])[0]
+    conf.env['PYTHON_SO_ABI_FLAG'] = abi_pattern % ''
     conf.env['PYTHON_LIBNAME_SO_ABI_FLAG'] = (
         conf.env['PYTHON_SO_ABI_FLAG'].replace('_', '-'))
 
diff -pruN 2:2.2.3-2/buildtools/wafsamba/samba_utils.py 2:2.4.2-0ubuntu1/buildtools/wafsamba/samba_utils.py
--- 2:2.2.3-2/buildtools/wafsamba/samba_utils.py	2021-11-02 22:53:09.439799000 +0000
+++ 2:2.4.2-0ubuntu1/buildtools/wafsamba/samba_utils.py	2022-01-24 12:25:00.172410500 +0000
@@ -459,7 +459,14 @@ def RECURSE(ctx, directory):
         return
     visited_dirs.add(key)
     relpath = os.path.relpath(abspath, ctx.path.abspath())
-    if ctxclass in ['tmp', 'OptionsContext', 'ConfigurationContext', 'BuildContext']:
+    if ctxclass in ['OptionsContext',
+                    'ConfigurationContext',
+                    'BuildContext',
+                    'CleanContext',
+                    'InstallContext',
+                    'UninstallContext',
+                    'ListContext',
+                    'ClangDbContext']:
         return ctx.recurse(relpath)
     if 'waflib.extras.compat15' in sys.modules:
         return ctx.recurse(relpath)
diff -pruN 2:2.2.3-2/buildtools/wafsamba/samba_waf18.py 2:2.4.2-0ubuntu1/buildtools/wafsamba/samba_waf18.py
--- 2:2.2.3-2/buildtools/wafsamba/samba_waf18.py	2021-11-02 22:53:09.439799000 +0000
+++ 2:2.4.2-0ubuntu1/buildtools/wafsamba/samba_waf18.py	2022-01-24 12:18:16.290473500 +0000
@@ -36,10 +36,11 @@ TaskGen.declare_chain(
     decider = decide_ext,
 )
 
-
-for y in (Build.BuildContext, Build.CleanContext, Build.InstallContext, Build.UninstallContext, Build.ListContext):
-    class tmp(y):
-        variant = 'default'
+Build.BuildContext.variant = 'default'
+Build.CleanContext.variant = 'default'
+Build.InstallContext.variant = 'default'
+Build.UninstallContext.variant = 'default'
+Build.ListContext.variant = 'default'
 
 def abspath(self, env=None):
     if env and hasattr(self, 'children'):
diff -pruN 2:2.2.3-2/buildtools/wafsamba/samba_wildcard.py 2:2.4.2-0ubuntu1/buildtools/wafsamba/samba_wildcard.py
--- 2:2.2.3-2/buildtools/wafsamba/samba_wildcard.py	2021-10-28 15:29:47.528471500 +0000
+++ 2:2.4.2-0ubuntu1/buildtools/wafsamba/samba_wildcard.py	2022-01-24 12:18:16.290473500 +0000
@@ -136,7 +136,7 @@ def fake_build_environment(info=True, fl
     try:
         proj = ConfigSet.ConfigSet(Options.lockfile)
     except IOError:
-        raise Errors.WafError("Project not configured (run 'waf configure' first)")
+        raise Errors.WafError("Project not configured (run './configure' first)")
 
     bld.load_envs()
 
diff -pruN 2:2.2.3-2/buildtools/wafsamba/tests/test_abi.py 2:2.4.2-0ubuntu1/buildtools/wafsamba/tests/test_abi.py
--- 2:2.2.3-2/buildtools/wafsamba/tests/test_abi.py	2021-11-02 22:53:09.439799000 +0000
+++ 2:2.4.2-0ubuntu1/buildtools/wafsamba/tests/test_abi.py	2022-01-24 12:18:16.290473500 +0000
@@ -21,7 +21,7 @@ from wafsamba.samba_abi import (
     normalise_signature,
     )
 
-from samba.compat import StringIO
+from io import StringIO
 
 
 class NormaliseSignatureTests(TestCase):
diff -pruN 2:2.2.3-2/buildtools/wafsamba/wafsamba.py 2:2.4.2-0ubuntu1/buildtools/wafsamba/wafsamba.py
--- 2:2.2.3-2/buildtools/wafsamba/wafsamba.py	2021-11-02 22:53:09.439799000 +0000
+++ 2:2.4.2-0ubuntu1/buildtools/wafsamba/wafsamba.py	2022-01-24 12:47:34.952465800 +0000
@@ -38,7 +38,7 @@ LIB_PATH="shared"
 
 os.environ['PYTHONUNBUFFERED'] = '1'
 
-if Context.HEXVERSION not in (0x2001200,):
+if Context.HEXVERSION not in (0x2001500,):
     Logs.error('''
 Please use the version of waf that comes with Samba, not
 a system installed version. See http://wiki.samba.org/index.php/Waf
@@ -408,10 +408,10 @@ def SAMBA_BINARY(bld, binname, source,
         subsystem_group = group
 
     # only specify PIE flags for binaries
-    pie_cflags = cflags
+    pie_cflags = TO_LIST(cflags)
     pie_ldflags = TO_LIST(ldflags)
     if bld.env['ENABLE_PIE'] is True:
-        pie_cflags += ' -fPIE'
+        pie_cflags.extend(TO_LIST('-fPIE'))
         pie_ldflags.extend(TO_LIST('-pie'))
     if bld.env['ENABLE_RELRO'] is True:
         pie_ldflags.extend(TO_LIST('-Wl,-z,relro,-z,now'))
@@ -635,6 +635,7 @@ def SAMBA_SUBSYSTEM(bld, modname, source
         target         = modname,
         samba_cflags   = CURRENT_CFLAGS(bld, modname, cflags,
                                         allow_warnings=allow_warnings,
+                                        use_hostcc=use_hostcc,
                                         hide_symbols=hide_symbols),
         depends_on     = depends_on,
         samba_deps     = TO_LIST(deps),
@@ -716,13 +717,13 @@ def SETUP_BUILD_GROUPS(bld):
     bld.p_ln = bld.srcnode # we do want to see all targets!
     bld.env['USING_BUILD_GROUPS'] = True
     bld.add_group('setup')
-    bld.add_group('build_compiler_source')
+    bld.add_group('generators')
+    bld.add_group('hostcc_base_build_source')
+    bld.add_group('hostcc_base_build_main')
+    bld.add_group('hostcc_build_source')
+    bld.add_group('hostcc_build_main')
     bld.add_group('vscripts')
     bld.add_group('base_libraries')
-    bld.add_group('generators')
-    bld.add_group('compiler_prototypes')
-    bld.add_group('compiler_libraries')
-    bld.add_group('build_compilers')
     bld.add_group('build_source')
     bld.add_group('prototypes')
     bld.add_group('headers')
@@ -945,9 +946,13 @@ def SAMBAMANPAGES(bld, manpages, extra_s
     bld.env.SAMBA_CATALOGS = 'file:///etc/xml/catalog file:///usr/local/share/xml/catalog file://' + bld.env.SAMBA_CATALOG
 
     for m in manpages.split():
-        source = m + '.xml'
+        source = [m + '.xml']
         if extra_source is not None:
             source = [source, extra_source]
+        # ${SRC[1]} and ${SRC[2]} are not referenced in the
+        # SAMBA_GENERATOR but trigger the dependency calculation so
+        # ensures that manpages are rebuilt when these change.
+        source += ['build/DTD/samba.entities', 'build/DTD/samba.build.version']
         bld.SAMBA_GENERATOR(m,
                             source=source,
                             target=m,
diff -pruN 2:2.2.3-2/buildtools/wafsamba/wscript 2:2.4.2-0ubuntu1/buildtools/wafsamba/wscript
--- 2:2.2.3-2/buildtools/wafsamba/wscript	2021-11-02 22:53:09.439799000 +0000
+++ 2:2.4.2-0ubuntu1/buildtools/wafsamba/wscript	2022-01-24 12:47:34.952465800 +0000
@@ -132,6 +132,9 @@ def options(opt):
         action="store_true",
         dest='undefined_sanitizer',
         default=False)
+    gr.add_option('--enable-clangdb',
+                   help=("Enable use of clang_compilation_database"),
+                   action="store_true", dest='enable_clangdb', default=False)
     gr.add_option('--enable-libfuzzer',
                   help=("Build fuzzing binaries (use ADDITIONAL_CFLAGS to specify compiler options for libFuzzer or use CC=honggfuzz/hfuzz-cc)"),
                   action="store_true", dest='enable_libfuzzer', default=False)
@@ -391,7 +394,26 @@ def configure(conf):
             strict=True,
             msg='Checking for library constructor support')
 
-        # check HAVE_DESTRUCTOR_ATTRIBUTE
+    # check HAVE_PRAGMA_INIT alternatively
+    if not conf.env.HAVE_CONSTRUCTOR_ATTRIBUTE:
+	    conf.CHECK_CODE('''
+                #pragma init (test_init)
+
+                void test_init(void)
+                {
+                    return;
+                }
+
+                int main(void) {
+                    return 0;
+                }
+                ''',
+                'HAVE_PRAGMA_INIT',
+                addmain=False,
+                strict=True,
+                msg='Checking for pragma init support')
+
+    # check HAVE_DESTRUCTOR_ATTRIBUTE
     conf.CHECK_CODE('''
             void test_destructor_attribute(void) __attribute__ ((destructor));
 
@@ -409,6 +431,25 @@ def configure(conf):
             strict=True,
             msg='Checking for library destructor support')
 
+    # check HAVE_PRAGMA_FINI alternatively
+    if not conf.env.HAVE_DESTRUCTOR_ATTRIBUTE:
+	    conf.CHECK_CODE('''
+                #pragma fini (test_fini)
+
+                void test_fini(void)
+                {
+                    return;
+                }
+
+                int main(void) {
+                    return 0;
+                }
+                ''',
+                'HAVE_PRAGMA_FINI',
+                addmain=False,
+                strict=True,
+                msg='Checking for pragma fini support')
+
     conf.CHECK_CODE('''
             void test_attribute(void) __attribute__ (());
 
@@ -426,6 +467,10 @@ def configure(conf):
             strict=True,
             msg='Checking for __attribute__')
 
+    # Solaris by defauls uses draft versions of some functions unless you set _POSIX_PTHREAD_SEMANTICS
+    if sys.platform.startswith('sunos'):
+        conf.DEFINE('_POSIX_PTHREAD_SEMANTICS', 1)
+
     if sys.platform.startswith('aix'):
         conf.DEFINE('_ALL_SOURCE', 1, add_to_cflags=True)
         # Might not be needed if ALL_SOURCE is defined
@@ -497,7 +542,10 @@ struct foo bar = { .y = 'X', .x = 1 };
     conf.CHECK_HEADERS('strings.h inttypes.h stdint.h unistd.h minix/config.h', add_headers=True)
     conf.CHECK_HEADERS('ctype.h', add_headers=True)
 
-    if sys.platform != 'darwin':
+    if sys.platform == 'darwin':
+        conf.DEFINE('_DARWIN_C_SOURCE', 1, add_to_cflags=True)
+        conf.DEFINE('_DARWIN_UNLIMITED_GETGROUPS', 1, add_to_cflags=True)
+    else:
         conf.CHECK_HEADERS('standards.h', add_headers=True)
 
     conf.CHECK_HEADERS('stdbool.h stdint.h stdarg.h vararg.h', add_headers=True)
@@ -615,12 +663,13 @@ struct foo bar = { .y = 'X', .x = 1 };
         conf.DEFINE('FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION', 1)
         conf.env.FUZZ_TARGET_LDFLAGS = Options.options.FUZZ_TARGET_LDFLAGS
 
-    conf.load('clang_compilation_database')
-
-    # Create a symlink of the compile db for clangd
-    symlink(os.path.join(conf.bldnode.abspath(), 'default/compile_commands.json'),
-            os.path.join(conf.srcnode.abspath(), 'compile_commands.json'),
-            force=True)
+    conf.env.enable_clangdb = Options.options.enable_clangdb
+    if conf.env.enable_clangdb:
+        conf.load('clang_compilation_database')
+        # Create a symlink of the compile db for clangd
+        symlink(os.path.join(conf.bldnode.abspath(), 'default/compile_commands.json'),
+                os.path.join(conf.srcnode.abspath(), 'compile_commands.json'),
+                force=True)
 
     conf.SAMBA_BUILD_ENV()
 
diff -pruN 2:2.2.3-2/debian/changelog 2:2.4.2-0ubuntu1/debian/changelog
--- 2:2.2.3-2/debian/changelog	2021-11-04 22:06:24.000000000 +0000
+++ 2:2.4.2-0ubuntu1/debian/changelog	2022-02-15 21:29:08.000000000 +0000
@@ -1,3 +1,20 @@
+ldb (2:2.4.2-0ubuntu1) jammy; urgency=medium
+
+  * d/watch: start tracking 2.4.x
+  * New upstream release: 2.4.2
+  * d/p/Fix-FTBFS-Increase-the-over-estimation-for-sparse-fi.patch:
+    removed (applied upstream)
+  * d/python3-ldb.symbols.in: update symbols
+  * d/libldb2.symbols: update symbols
+
+ -- Andreas Hasenack <andreas@canonical.com>  Tue, 15 Feb 2022 18:29:08 -0300
+
+ldb (2:2.2.3-2build1) jammy; urgency=medium
+
+  * No-change rebuild with Python 3.10 as default version
+
+ -- Graham Inggs <ginggs@ubuntu.com>  Fri, 14 Jan 2022 11:31:42 +0000
+
 ldb (2:2.2.3-2) unstable; urgency=high
 
   * Skip failing tests (on 32-bit architectures)
diff -pruN 2:2.2.3-2/debian/control 2:2.4.2-0ubuntu1/debian/control
--- 2:2.2.3-2/debian/control	2021-10-30 13:53:23.000000000 +0000
+++ 2:2.4.2-0ubuntu1/debian/control	2022-02-15 21:29:08.000000000 +0000
@@ -1,7 +1,8 @@
 Source: ldb
 Section: devel
 Priority: optional
-Maintainer: Debian Samba Maintainers <pkg-samba-maint@lists.alioth.debian.org>
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+XSBC-Original-Maintainer: Debian Samba Maintainers <pkg-samba-maint@lists.alioth.debian.org>
 Uploaders: Jelmer Vernooĳ <jelmer@debian.org>,
            Mathieu Parent <sathieu@debian.org>
 Build-Depends: dh-exec,
diff -pruN 2:2.2.3-2/debian/libldb2.symbols 2:2.4.2-0ubuntu1/debian/libldb2.symbols
--- 2:2.2.3-2/debian/libldb2.symbols	2021-11-04 19:03:57.000000000 +0000
+++ 2:2.4.2-0ubuntu1/debian/libldb2.symbols	2022-02-15 21:29:08.000000000 +0000
@@ -72,9 +72,9 @@ libldb.so.2 #PACKAGE# #MINVER#
  LDB_2.1.0@LDB_2.1.0 2:2.1.0
  LDB_2.1.1@LDB_2.1.1 2:2.1.1
  LDB_2.2.0@LDB_2.2.0 2:2.2.0
- LDB_2.2.1@LDB_2.2.1 2:2.2.1
- LDB_2.2.2@LDB_2.2.2 2:2.2.2
- LDB_2.2.3@LDB_2.2.3 2:2.2.3
+ LDB_2.4.0@LDB_2.4.0 2:2.4.2
+ LDB_2.4.1@LDB_2.4.1 2:2.4.2
+ LDB_2.4.2@LDB_2.4.2 2:2.4.2
  ldb_check_critical_controls@LDB_0.9.22 0.9.22
  ldb_controls_except_specified@LDB_0.9.22 0.9.22
  ldb_control_to_string@LDB_1.0.2 1.0.2~git20110403
diff -pruN 2:2.2.3-2/debian/patches/Fix-FTBFS-Increase-the-over-estimation-for-sparse-fi.patch 2:2.4.2-0ubuntu1/debian/patches/Fix-FTBFS-Increase-the-over-estimation-for-sparse-fi.patch
--- 2:2.2.3-2/debian/patches/Fix-FTBFS-Increase-the-over-estimation-for-sparse-fi.patch	2021-05-06 18:54:14.000000000 +0000
+++ 2:2.4.2-0ubuntu1/debian/patches/Fix-FTBFS-Increase-the-over-estimation-for-sparse-fi.patch	1970-01-01 00:00:00.000000000 +0000
@@ -1,43 +0,0 @@
-From 8866ea81255ff7e7cadaaed9980789b6e184e827 Mon Sep 17 00:00:00 2001
-From: Mathieu Parent <math.parent@gmail.com>
-Date: Thu, 25 Jun 2020 09:48:04 +0200
-Subject: [PATCH] Fix FTBFS / Increase the over-estimation for sparse files
-
-Bug: https://bugzilla.samba.org/show_bug.cgi?id=14418
----
- tests/ldb_kv_ops_test.c | 10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/tests/ldb_kv_ops_test.c b/tests/ldb_kv_ops_test.c
-index 30adebf..9db2212 100644
---- a/tests/ldb_kv_ops_test.c
-+++ b/tests/ldb_kv_ops_test.c
-@@ -1717,8 +1717,11 @@ static void test_get_size(void **state)
- 	/*
- 	 * The tdb implementation of get_size over estimates for sparse files
- 	 * which is perfectly acceptable for it's intended use.
-+	 * mipsel, ia64: 9994
-+	 * ppc64el, powerpc, ppc64: 13369
-+	 * sparc64: 5046
- 	 */
--	assert_in_range(size, 2500, 5000);
-+	assert_in_range(size, 2500, 15000);
- #endif
- 
- 	/*
-@@ -1746,8 +1749,11 @@ static void test_get_size(void **state)
- 	/*
- 	 * The tdb implementation of get_size over estimates for sparse files
- 	 * which is perfectly acceptable for it's intended use.
-+	 * mipsel, ia64: 9994
-+	 * ppc64el, powerpc, ppc64: 13369
-+	 * sparc64: 5046
- 	 */
--	assert_in_range(size, 2500, 5000);
-+	assert_in_range(size, 2500, 15000);
- #endif
- 	talloc_free(tmp_ctx);
- }
--- 
-2.26.2
-
diff -pruN 2:2.2.3-2/debian/patches/series 2:2.4.2-0ubuntu1/debian/patches/series
--- 2:2.2.3-2/debian/patches/series	2021-11-04 22:06:22.000000000 +0000
+++ 2:2.4.2-0ubuntu1/debian/patches/series	2022-02-15 21:29:01.000000000 +0000
@@ -1,6 +1,5 @@
 01_manpage_dates
 02_hurd
 Skip-test_guid_indexed_v1_db-on-mips64el-ppc64el-ia6.patch
-Fix-FTBFS-Increase-the-over-estimation-for-sparse-fi.patch
 Skip-ldb_lmdb_free_list_test-on-ppc64el-ppc64-and-sp.patch
 Skip_failing_tests.diff
diff -pruN 2:2.2.3-2/debian/python3-ldb.symbols.in 2:2.4.2-0ubuntu1/debian/python3-ldb.symbols.in
--- 2:2.2.3-2/debian/python3-ldb.symbols.in	2021-11-04 19:03:57.000000000 +0000
+++ 2:2.4.2-0ubuntu1/debian/python3-ldb.symbols.in	2022-02-15 21:29:08.000000000 +0000
@@ -1,6 +1,6 @@
 #!/usr/bin/dh-exec
 libpyldb-util${DEB_PY3_EXTENSION_SUFFIX}.2 python3-ldb #MINVER#
- PYLDB_UTIL${DEB_PY3_EXTENSION_UPCASE}_2.2.3@PYLDB_UTIL${DEB_PY3_EXTENSION_UPCASE}_2.2.3 2:2.2.3
+ PYLDB_UTIL${DEB_PY3_EXTENSION_UPCASE}_2.4.2@PYLDB_UTIL${DEB_PY3_EXTENSION_UPCASE}_2.4.2 2:2.4.2
 #include "python3-ldb.symbols.common" PYLDB_UTIL_1.1.2@PYLDB_UTIL_1.1.2 2:2.0.7
  PYLDB_UTIL_1.1.2@PYLDB_UTIL_1.1.2 2:2.2.0
  PYLDB_UTIL_1.1.3@PYLDB_UTIL_1.1.3 2:2.0.7
@@ -58,9 +58,9 @@ libpyldb-util${DEB_PY3_EXTENSION_SUFFIX}
  PYLDB_UTIL_2.1.0@PYLDB_UTIL_2.1.0 2:2.1.0
  PYLDB_UTIL_2.1.1@PYLDB_UTIL_2.1.1 2:2.1.1
  PYLDB_UTIL_2.2.0@PYLDB_UTIL_2.2.0 2:2.2.0
- PYLDB_UTIL_2.2.1@PYLDB_UTIL_2.2.1 2:2.2.1
- PYLDB_UTIL_2.2.2@PYLDB_UTIL_2.2.2 2:2.2.2
- PYLDB_UTIL_2.2.3@PYLDB_UTIL_2.2.3 2:2.2.3
+ PYLDB_UTIL_2.4.0@PYLDB_UTIL_2.4.0 2:2.4.2
+ PYLDB_UTIL_2.4.1@PYLDB_UTIL_2.4.1 2:2.4.2
+ PYLDB_UTIL_2.4.2@PYLDB_UTIL_2.4.2 2:2.4.2
  pyldb_Dn_FromDn@PYLDB_UTIL_1.1.2 2:2.0.7
  pyldb_Object_AsDn@PYLDB_UTIL_1.1.2 2:2.0.7
  pyldb_check_type@PYLDB_UTIL_2.1.0 2:2.1.0
diff -pruN 2:2.2.3-2/debian/watch 2:2.4.2-0ubuntu1/debian/watch
--- 2:2.2.3-2/debian/watch	2021-05-06 18:54:14.000000000 +0000
+++ 2:2.4.2-0ubuntu1/debian/watch	2022-02-15 21:29:01.000000000 +0000
@@ -1,2 +1,2 @@
 version=4
-opts=pgpsigurlmangle=s/tar\.gz/tar.asc/,decompress https://download.samba.org/pub/ldb/ ldb-(2\.2\..+).tar.gz
+opts=pgpsigurlmangle=s/tar\.gz/tar.asc/,decompress https://download.samba.org/pub/ldb/ ldb-(2\.4\..+).tar.gz
diff -pruN 2:2.2.3-2/include/ldb.h 2:2.4.2-0ubuntu1/include/ldb.h
--- 2:2.2.3-2/include/ldb.h	2021-11-02 22:53:09.471799400 +0000
+++ 2:2.4.2-0ubuntu1/include/ldb.h	2022-01-24 12:18:16.322473500 +0000
@@ -1932,6 +1932,7 @@ int ldb_dn_update_components(struct ldb_
   strcasecmp and toupper here is ok.
   return 0 for match
 */
+#undef strcasecmp
 #define ldb_attr_cmp(a, b) strcasecmp(a, b)
 char *ldb_attr_casefold(TALLOC_CTX *mem_ctx, const char *s);
 int ldb_attr_dn(const char *attr);
diff -pruN 2:2.2.3-2/ldb_key_value/ldb_kv.c 2:2.4.2-0ubuntu1/ldb_key_value/ldb_kv.c
--- 2:2.2.3-2/ldb_key_value/ldb_kv.c	2020-07-09 12:04:50.446104800 +0000
+++ 2:2.4.2-0ubuntu1/ldb_key_value/ldb_kv.c	2022-01-24 12:18:16.322473500 +0000
@@ -2078,6 +2078,8 @@ static int ldb_kv_handle_request(struct
 		}
 	}
 
+	ac->timeout_timeval = tv;
+
 	/* set a spy so that we do not try to use the request context
 	 * if it is freed before ltdb_callback fires */
 	ac->spy = talloc(req, struct ldb_kv_req_spy);
diff -pruN 2:2.2.3-2/ldb_key_value/ldb_kv.h 2:2.4.2-0ubuntu1/ldb_key_value/ldb_kv.h
--- 2:2.2.3-2/ldb_key_value/ldb_kv.h	2020-01-21 14:09:47.957205300 +0000
+++ 2:2.4.2-0ubuntu1/ldb_key_value/ldb_kv.h	2022-01-24 12:18:16.322473500 +0000
@@ -152,6 +152,16 @@ struct ldb_kv_context {
 	struct ldb_module *module;
 	struct ldb_request *req;
 
+	/*
+	 * Required as we might not get to the event loop before the
+	 * timeout, so we need some old-style cooperative multitasking
+	 * here.
+	 */
+	struct timeval timeout_timeval;
+
+	/* Used to throttle calls to gettimeofday() */
+	size_t timeout_counter;
+
 	bool request_terminated;
 	struct ldb_kv_req_spy *spy;
 
diff -pruN 2:2.2.3-2/ldb_key_value/ldb_kv_index.c 2:2.4.2-0ubuntu1/ldb_key_value/ldb_kv_index.c
--- 2:2.2.3-2/ldb_key_value/ldb_kv_index.c	2021-11-02 21:52:47.529864300 +0000
+++ 2:2.4.2-0ubuntu1/ldb_key_value/ldb_kv_index.c	2022-01-24 12:18:16.322473500 +0000
@@ -2352,6 +2352,47 @@ static int ldb_kv_index_filter(struct ld
 	for (i = 0; i < num_keys; i++) {
 		int ret;
 		bool matched;
+
+		/*
+		 * Check the time every 64 records, to reduce calls to
+		 * gettimeofday().  This is a compromise, not all
+		 * calls to ldb_match_message() will take the same
+		 * time, most will run quickly but by luck it might be
+		 * possible to have 64 records that are slow, doing a
+		 * recursive search via LDAP_MATCHING_RULE_IN_CHAIN.
+		 *
+		 * Thankfully this is after index processing so only
+		 * on the subset that matches some index (but still
+		 * possibly a big one like objectclass=user)
+		 */
+		if (i % 64 == 0) {
+			struct timeval now = tevent_timeval_current();
+			int timeval_cmp = tevent_timeval_compare(&ac->timeout_timeval,
+								 &now);
+
+			/*
+			 * The search has taken too long.  This is the
+			 * most likely place for our time to expire,
+			 * as we are checking the records after the
+			 * index set intersection.  This is now the
+			 * slow process of checking if the records
+			 * actually match.
+			 *
+			 * The tevent based timeout is not likely to
+			 * be hit, sadly, as we don't run an event
+			 * loop.
+			 *
+			 * While we are indexed and most of the work
+			 * should have been done already, the
+			 * ldb_match_* calls can be quite expensive if
+			 * the caller uses LDAP_MATCHING_RULE_IN_CHAIN
+			 */
+			if (timeval_cmp <= 0) {
+				talloc_free(keys);
+				return LDB_ERR_TIME_LIMIT_EXCEEDED;
+			}
+		}
+
 		msg = ldb_msg_new(ac);
 		if (!msg) {
 			talloc_free(keys);
diff -pruN 2:2.2.3-2/ldb_key_value/ldb_kv_search.c 2:2.4.2-0ubuntu1/ldb_key_value/ldb_kv_search.c
--- 2:2.2.3-2/ldb_key_value/ldb_kv_search.c	2020-07-09 12:04:50.450105000 +0000
+++ 2:2.4.2-0ubuntu1/ldb_key_value/ldb_kv_search.c	2022-01-24 12:18:16.326473700 +0000
@@ -314,7 +314,8 @@ static int search_func(_UNUSED_ struct l
 	struct ldb_context *ldb;
 	struct ldb_kv_context *ac;
 	struct ldb_message *msg, *filtered_msg;
-	int ret;
+	struct timeval now;
+	int ret, timeval_cmp;
 	bool matched;
 
 	ac = talloc_get_type(state, struct ldb_kv_context);
@@ -341,6 +342,36 @@ static int search_func(_UNUSED_ struct l
 		return 0;
 	}
 
+	/*
+	 * Check the time every 64 records, to reduce calls to
+	 * gettimeofday().  This is a compromise, not all calls to
+	 * ldb_match_message() will take the same time, most will fail
+	 * quickly but by luck it might be possible to have 64 records
+	 * that are slow, doing a recursive search via
+	 * LDAP_MATCHING_RULE_IN_CHAIN.
+	 */
+	if (ac->timeout_counter++ % 64 == 0) {
+		now = tevent_timeval_current();
+		timeval_cmp = tevent_timeval_compare(&ac->timeout_timeval,
+						     &now);
+
+		/*
+		 * The search has taken too long.  This is the most
+		 * likely place for our time to expire, as we are in
+		 * an un-indexed search and we return the data from
+		 * within this loop.  The tevent based timeout is not
+		 * likely to be hit, sadly.
+		 *
+		 * ldb_match_msg_error() can be quite expensive if a
+		 * LDAP_MATCHING_RULE_IN_CHAIN extended match was
+		 * specified.
+		 */
+		if (timeval_cmp <= 0) {
+			ac->error = LDB_ERR_TIME_LIMIT_EXCEEDED;
+			return -1;
+		}
+	}
+
 	msg = ldb_msg_new(ac);
 	if (!msg) {
 		ac->error = LDB_ERR_OPERATIONS_ERROR;
diff -pruN 2:2.2.3-2/lib/replace/closefrom.c 2:2.4.2-0ubuntu1/lib/replace/closefrom.c
--- 2:2.2.3-2/lib/replace/closefrom.c	2021-11-02 22:53:09.471799400 +0000
+++ 2:2.4.2-0ubuntu1/lib/replace/closefrom.c	2022-01-24 12:18:16.326473700 +0000
@@ -54,7 +54,7 @@ static int closefrom_procfs(int lower)
 	int ret = ENOMEM;
 
 	dirp = opendir("/proc/self/fd");
-	if (dirp == 0) {
+	if (dirp == NULL) {
 		return errno;
 	}
 
diff -pruN 2:2.2.3-2/lib/replace/replace.c 2:2.4.2-0ubuntu1/lib/replace/replace.c
--- 2:2.2.3-2/lib/replace/replace.c	2021-11-02 22:53:09.471799400 +0000
+++ 2:2.4.2-0ubuntu1/lib/replace/replace.c	2022-01-24 12:18:16.326473700 +0000
@@ -1056,3 +1056,28 @@ const char *rep_getprogname(void)
 #endif /* HAVE_PROGRAM_INVOCATION_SHORT_NAME */
 }
 #endif /* HAVE_GETPROGNAME */
+
+#ifndef HAVE_COPY_FILE_RANGE
+# ifdef HAVE_SYSCALL_COPY_FILE_RANGE
+# include <sys/syscall.h>
+# endif
+ssize_t rep_copy_file_range(int fd_in,
+			    loff_t *off_in,
+			    int fd_out,
+			    loff_t *off_out,
+			    size_t len,
+			    unsigned int flags)
+{
+# ifdef HAVE_SYSCALL_COPY_FILE_RANGE
+	return syscall(__NR_copy_file_range,
+		       fd_in,
+		       off_in,
+		       fd_out,
+		       off_out,
+		       len,
+		       flags);
+# endif /* HAVE_SYSCALL_COPY_FILE_RANGE */
+	errno = ENOSYS;
+	return -1;
+}
+#endif /* HAVE_COPY_FILE_RANGE */
diff -pruN 2:2.2.3-2/lib/replace/replace.h 2:2.4.2-0ubuntu1/lib/replace/replace.h
--- 2:2.2.3-2/lib/replace/replace.h	2021-11-02 22:53:09.471799400 +0000
+++ 2:2.4.2-0ubuntu1/lib/replace/replace.h	2022-01-24 12:25:00.184410600 +0000
@@ -465,7 +465,7 @@ int rep_dlclose(void *handle);
 #endif
 
 #ifndef _DEPRECATED_
-#ifdef HAVE___ATTRIBUTE__
+#if __has_attribute(deprecated) || (__GNUC__ >= 3)
 #define _DEPRECATED_ __attribute__ ((deprecated))
 #else
 #define _DEPRECATED_
@@ -964,6 +964,16 @@ int rep_memset_s(void *dest, size_t dest
 const char *rep_getprogname(void);
 #endif
 
+#ifndef HAVE_COPY_FILE_RANGE
+#define copy_file_range rep_copy_file_range
+ssize_t rep_copy_file_range(int fd_in,
+			    loff_t *off_in,
+			    int fd_out,
+			    loff_t *off_out,
+			    size_t len,
+			    unsigned int flags);
+#endif /* HAVE_COPY_FILE_RANGE */
+
 #ifndef FALL_THROUGH
 # ifdef HAVE_FALLTHROUGH_ATTRIBUTE
 #  define FALL_THROUGH __attribute__ ((fallthrough))
diff -pruN 2:2.2.3-2/lib/replace/system/filesys.h 2:2.4.2-0ubuntu1/lib/replace/system/filesys.h
--- 2:2.2.3-2/lib/replace/system/filesys.h	2021-11-02 22:53:09.471799400 +0000
+++ 2:2.4.2-0ubuntu1/lib/replace/system/filesys.h	2022-01-24 12:18:16.326473700 +0000
@@ -199,6 +199,10 @@
 #define mkdir(d,m) _mkdir(d)
 #endif
 
+#ifdef DISABLE_OPATH
+#undef O_PATH
+#endif
+
 /*
    this allows us to use a uniform error handling for our xattr
    wrappers
diff -pruN 2:2.2.3-2/lib/replace/system/network.h 2:2.4.2-0ubuntu1/lib/replace/system/network.h
--- 2:2.2.3-2/lib/replace/system/network.h	2021-11-02 22:53:09.471799400 +0000
+++ 2:2.4.2-0ubuntu1/lib/replace/system/network.h	2022-01-24 12:18:16.326473700 +0000
@@ -332,6 +332,13 @@ typedef unsigned short int sa_family_t;
      */
 #   define IOV_MAX 512
 #  endif
+#  ifdef __GNU__
+    /*
+     * GNU/Hurd does not have such hardcoded limitations. Use a reasonable
+     * amount.
+     */
+#   define IOV_MAX 512
+#  endif
 # endif
 #endif
 
diff -pruN 2:2.2.3-2/lib/replace/system/nis.h 2:2.4.2-0ubuntu1/lib/replace/system/nis.h
--- 2:2.2.3-2/lib/replace/system/nis.h	2021-10-28 15:29:47.584471700 +0000
+++ 2:2.4.2-0ubuntu1/lib/replace/system/nis.h	1970-01-01 00:00:00.000000000 +0000
@@ -1,55 +0,0 @@
-/*
-   Unix SMB/CIFS implementation.
-
-   nis system include wrappers
-
-   Copyright (C) Andrew Tridgell 2004
-
-     ** NOTE! The following LGPL license applies to the replace
-     ** 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
-   version 3 of the License, or (at your option) any later version.
-
-   This library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with this library; if not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef _nis_passwd_h
-#define _nis_passwd_h
-
-#if defined(HAVE_RPC_RPC_H)
-/*
- * Check for AUTH_ERROR define conflict with rpc/rpc.h in prot.h.
- */
-#if defined(HAVE_SYS_SECURITY_H) && defined(HAVE_RPC_AUTH_ERROR_CONFLICT)
-#undef AUTH_ERROR
-#endif /* HAVE_SYS_SECURITY_H && HAVE_RPC_AUTH_ERROR_CONFLICT */
-
-#include <rpc/rpc.h>
-#endif /* HAVE_RPC_RPC_H */
-
-
-#if defined (HAVE_NETGROUP)
-
-#if defined(HAVE_RPCSVC_YP_PROT_H)
-
-#include <rpcsvc/yp_prot.h>
-
-#endif /* HAVE_RPCSVC_YP_PROT_H */
-
-#if defined(HAVE_RPCSVC_YPCLNT_H)
-#include <rpcsvc/ypclnt.h>
-#endif /* HAVE_RPCSVC_YPCLNT_H */
-
-#endif /* HAVE_NETGROUP */
-
-#endif /* _nis_passwd_h */
diff -pruN 2:2.2.3-2/lib/replace/tests/os2_delete.c 2:2.4.2-0ubuntu1/lib/replace/tests/os2_delete.c
--- 2:2.2.3-2/lib/replace/tests/os2_delete.c	2021-10-28 15:29:47.584471700 +0000
+++ 2:2.4.2-0ubuntu1/lib/replace/tests/os2_delete.c	2022-01-24 12:18:16.326473700 +0000
@@ -106,6 +106,7 @@ int test_readdir_os2_delete(void)
 	d = opendir(TESTDIR "/test0.txt");
 	if (d != NULL) FAILED("opendir() on file succeed");
 	if (errno != ENOTDIR) FAILED("opendir() on file didn't give ENOTDIR");
+	closedir(d);
 
 	d = opendir(TESTDIR);
 
diff -pruN 2:2.2.3-2/lib/replace/tests/testsuite.c 2:2.4.2-0ubuntu1/lib/replace/tests/testsuite.c
--- 2:2.2.3-2/lib/replace/tests/testsuite.c	2021-11-02 22:53:09.471799400 +0000
+++ 2:2.4.2-0ubuntu1/lib/replace/tests/testsuite.c	2022-01-24 12:47:34.956465700 +0000
@@ -164,11 +164,16 @@ static int test_memmove(void)
 static int test_strdup(void)
 {
 	char *x;
+	int cmp;
+
 	printf("test: strdup\n");
 	x = strdup("bla");
-	if (strcmp("bla", x) != 0) {
+
+	cmp = strcmp("bla", x);
+	if (cmp != 0) {
 		printf("failure: strdup [\nfailed: expected \"bla\", got \"%s\"\n]\n",
 			   x);
+		free(x);
 		return false;
 	}
 	free(x);
@@ -259,26 +264,44 @@ static int test_setenv(void)
 static int test_strndup(void)
 {
 	char *x;
+	int cmp;
+
 	printf("test: strndup\n");
 	x = strndup("bla", 0);
-	if (strcmp(x, "") != 0) {
+	cmp = strcmp(x, "");
+	free(x);
+	if (cmp != 0) {
 		printf("failure: strndup [\ninvalid\n]\n");
 		return false;
 	}
-	free(x);
+
 	x = strndup("bla", 2);
-	if (strcmp(x, "bl") != 0) {
+	cmp = strcmp(x, "bl");
+	free(x);
+	if (cmp != 0) {
 		printf("failure: strndup [\ninvalid\n]\n");
 		return false;
 	}
-	free(x);
+
+#ifdef __GNUC__
+# if __GNUC__ < 11
+	/*
+	 * This code will not compile with gcc11 -O3 anymore.
+	 *
+	 * error: ‘strndup’ specified bound 10 exceeds source size 4 [-Werror=stringop-overread]
+	 *          x = strndup("bla", 10);
+	 *          ^~~~~~~~~~~~~~~~~~
+	 */
 	x = strndup("bla", 10);
-	if (strcmp(x, "bla") != 0) {
+	cmp = strcmp(x, "bla");
+	free(x);
+	if (cmp != 0) {
 		printf("failure: strndup [\ninvalid\n]\n");
-		free(x);
 		return false;
 	}
-	free(x);
+# endif
+#endif /* __GNUC__ */
+
 	printf("success: strndup\n");
 	return true;
 }
@@ -325,24 +348,30 @@ static int test_setegid(void)
 
 static int test_asprintf(void)
 {
-	char *x;
+	char *x = NULL;
+
 	printf("test: asprintf\n");
 	if (asprintf(&x, "%d", 9) != 1) {
 		printf("failure: asprintf [\ngenerate asprintf\n]\n");
+		free(x);
 		return false;
 	}
 	if (strcmp(x, "9") != 0) {
 		printf("failure: asprintf [\ngenerate asprintf\n]\n");
+		free(x);
 		return false;
 	}
 	if (asprintf(&x, "dat%s", "a") != 4) {
 		printf("failure: asprintf [\ngenerate asprintf\n]\n");
+		free(x);
 		return false;
 	}
 	if (strcmp(x, "data") != 0) {
 		printf("failure: asprintf [\ngenerate asprintf\n]\n");
+		free(x);
 		return false;
 	}
+	free(x);
 	printf("success: asprintf\n");
 	return true;
 }
@@ -1070,6 +1099,7 @@ static bool test_closefrom(void)
 		fd = dup(0);
 		if (fd == -1) {
 			perror("dup failed");
+			closefrom(3);
 			return false;
 		}
 
@@ -1077,6 +1107,7 @@ static bool test_closefrom(void)
 
 		if (fd >= 1000) {
 			printf("fd=%d\n", fd);
+			closefrom(3);
 			return false;
 		}
 	}
diff -pruN 2:2.2.3-2/lib/replace/wscript 2:2.4.2-0ubuntu1/lib/replace/wscript
--- 2:2.2.3-2/lib/replace/wscript	2021-11-02 22:53:09.475799300 +0000
+++ 2:2.4.2-0ubuntu1/lib/replace/wscript	2022-01-24 12:47:34.956465700 +0000
@@ -31,6 +31,7 @@ def configure(conf):
 
     conf.env.standalone_replace = conf.IN_LAUNCH_DIR()
 
+    conf.DEFINE('BOOL_DEFINED', 1)
     conf.DEFINE('HAVE_LIBREPLACE', 1)
     conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1)
 
@@ -94,18 +95,6 @@ def configure(conf):
     if not conf.CONFIG_SET('HAVE_RPC_RPC_H'):
             Logs.warn('No rpc/rpc.h header found, tirpc or libntirpc missing?')
 
-    conf.SET_TARGET_TYPE('nsl', 'EMPTY')
-    conf.CHECK_HEADERS('rpc/rpc.h rpcsvc/yp_prot.h', lib='tirpc')
-    if not conf.CONFIG_SET('HAVE_RPCSVC_YP_PROT_H'):
-        if conf.CHECK_CFG(package='libnsl', args='--cflags --libs',
-                          msg='Checking for libnsl',
-                          uselib_store='NSL'):
-            conf.SET_TARGET_TYPE('nsl', 'SYSLIB')
-            conf.CHECK_HEADERS('rpc/rpc.h rpcsvc/yp_prot.h', lib='tirpc nsl')
-        else:
-            conf.SET_TARGET_TYPE('nsl', 'SYSLIB')
-    conf.CHECK_HEADERS('rpcsvc/nis.h rpcsvc/ypclnt.h', lib='tirpc nsl')
-
     # This file is decprecated with glibc >= 2.30 so we need to check if it
     # includes a deprecation warning:
     # #warning "The <sys/sysctl.h> header is deprecated and will be removed."
@@ -465,6 +454,14 @@ def configure(conf):
     conf.CHECK_FUNCS('getpwent_r getpwnam_r getpwuid_r epoll_create')
     conf.CHECK_FUNCS('port_create')
     conf.CHECK_FUNCS('getprogname')
+    if not conf.CHECK_FUNCS('copy_file_range'):
+        conf.CHECK_CODE('''
+#include <sys/syscall.h>
+#include <unistd.h>
+syscall(SYS_copy_file_range,0,NULL,0,NULL,0,0);
+                        ''',
+                        'HAVE_SYSCALL_COPY_FILE_RANGE',
+                        msg='Checking whether we have copy_file_range system call')
 
     conf.SET_TARGET_TYPE('attr', 'EMPTY')
 
@@ -746,8 +743,6 @@ def configure(conf):
 
     conf.CHECK_CODE('mkdir("foo",0777)', define='HAVE_MKDIR_MODE', headers='sys/stat.h')
 
-    conf.CHECK_STRUCTURE_MEMBER('struct stat', 'st_mtim.tv_nsec', define='HAVE_STAT_TV_NSEC',
-                                headers='sys/stat.h')
     # we need the st_rdev test under two names
     conf.CHECK_STRUCTURE_MEMBER('struct stat', 'st_rdev',
                                 define='HAVE_STRUCT_STAT_ST_RDEV',
@@ -848,7 +843,7 @@ REPLACEMENT_FUNCTIONS = {
                   'strsep', 'strtok_r', 'strtoll', 'strtoull', 'setenv', 'unsetenv',
                   'utime', 'utimes', 'dup2', 'chown', 'link', 'readlink',
                   'symlink', 'lchown', 'realpath', 'memmem', 'vdprintf',
-                  'dprintf', 'get_current_dir_name',
+                  'dprintf', 'get_current_dir_name', 'copy_file_range',
                   'strerror_r', 'clock_gettime', 'memset_s'],
     'timegm.c': ['timegm'],
     # Note: C99_VSNPRINTF is not a function, but a special condition
@@ -883,8 +878,7 @@ def build(bld):
         REPLACE_HOSTCC_SOURCE,
         use_hostcc=True,
         use_global_deps=False,
-        cflags='-D_SAMBA_HOSTCC_',
-        group='compiler_libraries',
+        group='hostcc_base_build_main',
         deps = extra_libs
     )
 
diff -pruN 2:2.2.3-2/lib/talloc/ABI/pytalloc-util-2.3.2.sigs 2:2.4.2-0ubuntu1/lib/talloc/ABI/pytalloc-util-2.3.2.sigs
--- 2:2.2.3-2/lib/talloc/ABI/pytalloc-util-2.3.2.sigs	1970-01-01 00:00:00.000000000 +0000
+++ 2:2.4.2-0ubuntu1/lib/talloc/ABI/pytalloc-util-2.3.2.sigs	2022-01-24 12:18:16.330473700 +0000
@@ -0,0 +1,16 @@
+_pytalloc_check_type: int (PyObject *, const char *)
+_pytalloc_get_mem_ctx: TALLOC_CTX *(PyObject *)
+_pytalloc_get_name: const char *(PyObject *)
+_pytalloc_get_ptr: void *(PyObject *)
+_pytalloc_get_type: void *(PyObject *, const char *)
+pytalloc_BaseObject_PyType_Ready: int (PyTypeObject *)
+pytalloc_BaseObject_check: int (PyObject *)
+pytalloc_BaseObject_size: size_t (void)
+pytalloc_Check: int (PyObject *)
+pytalloc_GenericObject_reference_ex: PyObject *(TALLOC_CTX *, void *)
+pytalloc_GenericObject_steal_ex: PyObject *(TALLOC_CTX *, void *)
+pytalloc_GetBaseObjectType: PyTypeObject *(void)
+pytalloc_GetObjectType: PyTypeObject *(void)
+pytalloc_reference_ex: PyObject *(PyTypeObject *, TALLOC_CTX *, void *)
+pytalloc_steal: PyObject *(PyTypeObject *, void *)
+pytalloc_steal_ex: PyObject *(PyTypeObject *, TALLOC_CTX *, void *)
diff -pruN 2:2.2.3-2/lib/talloc/ABI/pytalloc-util-2.3.3.sigs 2:2.4.2-0ubuntu1/lib/talloc/ABI/pytalloc-util-2.3.3.sigs
--- 2:2.2.3-2/lib/talloc/ABI/pytalloc-util-2.3.3.sigs	1970-01-01 00:00:00.000000000 +0000
+++ 2:2.4.2-0ubuntu1/lib/talloc/ABI/pytalloc-util-2.3.3.sigs	2022-01-24 12:18:16.330473700 +0000
@@ -0,0 +1,16 @@
+_pytalloc_check_type: int (PyObject *, const char *)
+_pytalloc_get_mem_ctx: TALLOC_CTX *(PyObject *)
+_pytalloc_get_name: const char *(PyObject *)
+_pytalloc_get_ptr: void *(PyObject *)
+_pytalloc_get_type: void *(PyObject *, const char *)
+pytalloc_BaseObject_PyType_Ready: int (PyTypeObject *)
+pytalloc_BaseObject_check: int (PyObject *)
+pytalloc_BaseObject_size: size_t (void)
+pytalloc_Check: int (PyObject *)
+pytalloc_GenericObject_reference_ex: PyObject *(TALLOC_CTX *, void *)
+pytalloc_GenericObject_steal_ex: PyObject *(TALLOC_CTX *, void *)
+pytalloc_GetBaseObjectType: PyTypeObject *(void)
+pytalloc_GetObjectType: PyTypeObject *(void)
+pytalloc_reference_ex: PyObject *(PyTypeObject *, TALLOC_CTX *, void *)
+pytalloc_steal: PyObject *(PyTypeObject *, void *)
+pytalloc_steal_ex: PyObject *(PyTypeObject *, TALLOC_CTX *, void *)
diff -pruN 2:2.2.3-2/lib/talloc/ABI/talloc-2.3.2.sigs 2:2.4.2-0ubuntu1/lib/talloc/ABI/talloc-2.3.2.sigs
--- 2:2.2.3-2/lib/talloc/ABI/talloc-2.3.2.sigs	1970-01-01 00:00:00.000000000 +0000
+++ 2:2.4.2-0ubuntu1/lib/talloc/ABI/talloc-2.3.2.sigs	2022-01-24 12:18:16.330473700 +0000
@@ -0,0 +1,65 @@
+_talloc: void *(const void *, size_t)
+_talloc_array: void *(const void *, size_t, unsigned int, const char *)
+_talloc_free: int (void *, const char *)
+_talloc_get_type_abort: void *(const void *, const char *, const char *)
+_talloc_memdup: void *(const void *, const void *, size_t, const char *)
+_talloc_move: void *(const void *, const void *)
+_talloc_pooled_object: void *(const void *, size_t, const char *, unsigned int, size_t)
+_talloc_realloc: void *(const void *, void *, size_t, const char *)
+_talloc_realloc_array: void *(const void *, void *, size_t, unsigned int, const char *)
+_talloc_reference_loc: void *(const void *, const void *, const char *)
+_talloc_set_destructor: void (const void *, int (*)(void *))
+_talloc_steal_loc: void *(const void *, const void *, const char *)
+_talloc_zero: void *(const void *, size_t, const char *)
+_talloc_zero_array: void *(const void *, size_t, unsigned int, const char *)
+talloc_asprintf: char *(const void *, const char *, ...)
+talloc_asprintf_append: char *(char *, const char *, ...)
+talloc_asprintf_append_buffer: char *(char *, const char *, ...)
+talloc_autofree_context: void *(void)
+talloc_check_name: void *(const void *, const char *)
+talloc_disable_null_tracking: void (void)
+talloc_enable_leak_report: void (void)
+talloc_enable_leak_report_full: void (void)
+talloc_enable_null_tracking: void (void)
+talloc_enable_null_tracking_no_autofree: void (void)
+talloc_find_parent_byname: void *(const void *, const char *)
+talloc_free_children: void (void *)
+talloc_get_name: const char *(const void *)
+talloc_get_size: size_t (const void *)
+talloc_increase_ref_count: int (const void *)
+talloc_init: void *(const char *, ...)
+talloc_is_parent: int (const void *, const void *)
+talloc_named: void *(const void *, size_t, const char *, ...)
+talloc_named_const: void *(const void *, size_t, const char *)
+talloc_parent: void *(const void *)
+talloc_parent_name: const char *(const void *)
+talloc_pool: void *(const void *, size_t)
+talloc_realloc_fn: void *(const void *, void *, size_t)
+talloc_reference_count: size_t (const void *)
+talloc_reparent: void *(const void *, const void *, const void *)
+talloc_report: void (const void *, FILE *)
+talloc_report_depth_cb: void (const void *, int, int, void (*)(const void *, int, int, int, void *), void *)
+talloc_report_depth_file: void (const void *, int, int, FILE *)
+talloc_report_full: void (const void *, FILE *)
+talloc_set_abort_fn: void (void (*)(const char *))
+talloc_set_log_fn: void (void (*)(const char *))
+talloc_set_log_stderr: void (void)
+talloc_set_memlimit: int (const void *, size_t)
+talloc_set_name: const char *(const void *, const char *, ...)
+talloc_set_name_const: void (const void *, const char *)
+talloc_show_parents: void (const void *, FILE *)
+talloc_strdup: char *(const void *, const char *)
+talloc_strdup_append: char *(char *, const char *)
+talloc_strdup_append_buffer: char *(char *, const char *)
+talloc_strndup: char *(const void *, const char *, size_t)
+talloc_strndup_append: char *(char *, const char *, size_t)
+talloc_strndup_append_buffer: char *(char *, const char *, size_t)
+talloc_test_get_magic: int (void)
+talloc_total_blocks: size_t (const void *)
+talloc_total_size: size_t (const void *)
+talloc_unlink: int (const void *, void *)
+talloc_vasprintf: char *(const void *, const char *, va_list)
+talloc_vasprintf_append: char *(char *, const char *, va_list)
+talloc_vasprintf_append_buffer: char *(char *, const char *, va_list)
+talloc_version_major: int (void)
+talloc_version_minor: int (void)
diff -pruN 2:2.2.3-2/lib/talloc/ABI/talloc-2.3.3.sigs 2:2.4.2-0ubuntu1/lib/talloc/ABI/talloc-2.3.3.sigs
--- 2:2.2.3-2/lib/talloc/ABI/talloc-2.3.3.sigs	1970-01-01 00:00:00.000000000 +0000
+++ 2:2.4.2-0ubuntu1/lib/talloc/ABI/talloc-2.3.3.sigs	2022-01-24 12:18:16.330473700 +0000
@@ -0,0 +1,65 @@
+_talloc: void *(const void *, size_t)
+_talloc_array: void *(const void *, size_t, unsigned int, const char *)
+_talloc_free: int (void *, const char *)
+_talloc_get_type_abort: void *(const void *, const char *, const char *)
+_talloc_memdup: void *(const void *, const void *, size_t, const char *)
+_talloc_move: void *(const void *, const void *)
+_talloc_pooled_object: void *(const void *, size_t, const char *, unsigned int, size_t)
+_talloc_realloc: void *(const void *, void *, size_t, const char *)
+_talloc_realloc_array: void *(const void *, void *, size_t, unsigned int, const char *)
+_talloc_reference_loc: void *(const void *, const void *, const char *)
+_talloc_set_destructor: void (const void *, int (*)(void *))
+_talloc_steal_loc: void *(const void *, const void *, const char *)
+_talloc_zero: void *(const void *, size_t, const char *)
+_talloc_zero_array: void *(const void *, size_t, unsigned int, const char *)
+talloc_asprintf: char *(const void *, const char *, ...)
+talloc_asprintf_append: char *(char *, const char *, ...)
+talloc_asprintf_append_buffer: char *(char *, const char *, ...)
+talloc_autofree_context: void *(void)
+talloc_check_name: void *(const void *, const char *)
+talloc_disable_null_tracking: void (void)
+talloc_enable_leak_report: void (void)
+talloc_enable_leak_report_full: void (void)
+talloc_enable_null_tracking: void (void)
+talloc_enable_null_tracking_no_autofree: void (void)
+talloc_find_parent_byname: void *(const void *, const char *)
+talloc_free_children: void (void *)
+talloc_get_name: const char *(const void *)
+talloc_get_size: size_t (const void *)
+talloc_increase_ref_count: int (const void *)
+talloc_init: void *(const char *, ...)
+talloc_is_parent: int (const void *, const void *)
+talloc_named: void *(const void *, size_t, const char *, ...)
+talloc_named_const: void *(const void *, size_t, const char *)
+talloc_parent: void *(const void *)
+talloc_parent_name: const char *(const void *)
+talloc_pool: void *(const void *, size_t)
+talloc_realloc_fn: void *(const void *, void *, size_t)
+talloc_reference_count: size_t (const void *)
+talloc_reparent: void *(const void *, const void *, const void *)
+talloc_report: void (const void *, FILE *)
+talloc_report_depth_cb: void (const void *, int, int, void (*)(const void *, int, int, int, void *), void *)
+talloc_report_depth_file: void (const void *, int, int, FILE *)
+talloc_report_full: void (const void *, FILE *)
+talloc_set_abort_fn: void (void (*)(const char *))
+talloc_set_log_fn: void (void (*)(const char *))
+talloc_set_log_stderr: void (void)
+talloc_set_memlimit: int (const void *, size_t)
+talloc_set_name: const char *(const void *, const char *, ...)
+talloc_set_name_const: void (const void *, const char *)
+talloc_show_parents: void (const void *, FILE *)
+talloc_strdup: char *(const void *, const char *)
+talloc_strdup_append: char *(char *, const char *)
+talloc_strdup_append_buffer: char *(char *, const char *)
+talloc_strndup: char *(const void *, const char *, size_t)
+talloc_strndup_append: char *(char *, const char *, size_t)
+talloc_strndup_append_buffer: char *(char *, const char *, size_t)
+talloc_test_get_magic: int (void)
+talloc_total_blocks: size_t (const void *)
+talloc_total_size: size_t (const void *)
+talloc_unlink: int (const void *, void *)
+talloc_vasprintf: char *(const void *, const char *, va_list)
+talloc_vasprintf_append: char *(char *, const char *, va_list)
+talloc_vasprintf_append_buffer: char *(char *, const char *, va_list)
+talloc_version_major: int (void)
+talloc_version_minor: int (void)
diff -pruN 2:2.2.3-2/lib/talloc/pytalloc.c 2:2.4.2-0ubuntu1/lib/talloc/pytalloc.c
--- 2:2.2.3-2/lib/talloc/pytalloc.c	2021-10-28 15:29:47.584471700 +0000
+++ 2:2.4.2-0ubuntu1/lib/talloc/pytalloc.c	2022-01-24 12:18:16.330473700 +0000
@@ -3,18 +3,22 @@
    Python Talloc Module
    Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2010-2011
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
+     ** NOTE! The following LGPL license applies to the talloc
+     ** library. This does NOT imply that all of Samba is released
+     ** under the LGPL
 
-   This program is distributed in the hope that it will be useful,
+   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
+   version 3 of the License, or (at your option) any later version.
+
+   This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+   You should have received a copy of the GNU Lesser General Public
+   License along with this library; if not, see <http://www.gnu.org/licenses/>.
 */
 
 #include <Python.h>
diff -pruN 2:2.2.3-2/lib/talloc/pytalloc.h 2:2.4.2-0ubuntu1/lib/talloc/pytalloc.h
--- 2:2.2.3-2/lib/talloc/pytalloc.h	2021-11-02 22:53:09.475799300 +0000
+++ 2:2.4.2-0ubuntu1/lib/talloc/pytalloc.h	2022-01-24 12:18:16.330473700 +0000
@@ -3,18 +3,22 @@
    Samba utility functions
    Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2008
    
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
+     ** NOTE! The following LGPL license applies to the talloc
+     ** 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
+   version 3 of the License, or (at your option) any later version.
+
+   This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with this library; if not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef _PYTALLOC_H_
@@ -30,37 +34,37 @@ typedef struct {
 } pytalloc_Object;
 
 /* Return the PyTypeObject for pytalloc_Object. Returns a borrowed reference. */
-PyTypeObject *pytalloc_GetObjectType(void);
+_PUBLIC_ PyTypeObject *pytalloc_GetObjectType(void);
 
 /* Return the PyTypeObject for pytalloc_BaseObject. Returns a borrowed reference. */
-PyTypeObject *pytalloc_GetBaseObjectType(void);
+_PUBLIC_ PyTypeObject *pytalloc_GetBaseObjectType(void);
 
 /* Check whether a specific object is a talloc Object. */
-int pytalloc_Check(PyObject *);
+_PUBLIC_ int pytalloc_Check(PyObject *);
 
-int pytalloc_BaseObject_check(PyObject *);
+_PUBLIC_ int pytalloc_BaseObject_check(PyObject *);
 
-int _pytalloc_check_type(PyObject *py_obj, const char *type_name);
+_PUBLIC_ int _pytalloc_check_type(PyObject *py_obj, const char *type_name);
 #define pytalloc_check_type(py_obj, type) \
 	_pytalloc_check_type((PyObject *)(py_obj), #type)
 
 /* Retrieve the pointer for a pytalloc_object. Like talloc_get_type() 
  * but for pytalloc_Objects. */
-void *_pytalloc_get_type(PyObject *py_obj, const char *type_name);
+_PUBLIC_ void *_pytalloc_get_type(PyObject *py_obj, const char *type_name);
 #define pytalloc_get_type(py_obj, type) ((type *)_pytalloc_get_type((PyObject *)(py_obj), #type))
 
-void *_pytalloc_get_ptr(PyObject *py_obj);
+_PUBLIC_ void *_pytalloc_get_ptr(PyObject *py_obj);
 #define pytalloc_get_ptr(py_obj) _pytalloc_get_ptr((PyObject *)(py_obj))
-TALLOC_CTX *_pytalloc_get_mem_ctx(PyObject *py_obj);
+_PUBLIC_ TALLOC_CTX *_pytalloc_get_mem_ctx(PyObject *py_obj);
 #define pytalloc_get_mem_ctx(py_obj) _pytalloc_get_mem_ctx((PyObject *)(py_obj))
 
-const char *_pytalloc_get_name(PyObject *py_obj);
+_PUBLIC_ const char *_pytalloc_get_name(PyObject *py_obj);
 #define pytalloc_get_name(py_obj) _pytalloc_get_name((PyObject *)(py_obj))
 
 
-PyObject *pytalloc_steal_ex(PyTypeObject *py_type, TALLOC_CTX *mem_ctx, void *ptr);
-PyObject *pytalloc_steal(PyTypeObject *py_type, void *ptr);
-PyObject *pytalloc_reference_ex(PyTypeObject *py_type, TALLOC_CTX *mem_ctx, void *ptr);
+_PUBLIC_ PyObject *pytalloc_steal_ex(PyTypeObject *py_type, TALLOC_CTX *mem_ctx, void *ptr);
+_PUBLIC_ PyObject *pytalloc_steal(PyTypeObject *py_type, void *ptr);
+_PUBLIC_ PyObject *pytalloc_reference_ex(PyTypeObject *py_type, TALLOC_CTX *mem_ctx, void *ptr);
 #define pytalloc_reference(py_type, talloc_ptr) pytalloc_reference_ex(py_type, talloc_ptr, talloc_ptr)
 
 #define pytalloc_new(type, typeobj) pytalloc_steal(typeobj, talloc_zero(NULL, type))
@@ -69,15 +73,15 @@ PyObject *pytalloc_reference_ex(PyTypeOb
  * Wrap a generic talloc pointer into a talloc.GenericObject,
  * this is a subclass of talloc.BaseObject.
  */
-PyObject *pytalloc_GenericObject_steal_ex(TALLOC_CTX *mem_ctx, void *ptr);
+_PUBLIC_ PyObject *pytalloc_GenericObject_steal_ex(TALLOC_CTX *mem_ctx, void *ptr);
 #define pytalloc_GenericObject_steal(talloc_ptr) \
 	pytalloc_GenericObject_steal_ex(talloc_ptr, talloc_ptr)
-PyObject *pytalloc_GenericObject_reference_ex(TALLOC_CTX *mem_ctx, void *ptr);
+_PUBLIC_ PyObject *pytalloc_GenericObject_reference_ex(TALLOC_CTX *mem_ctx, void *ptr);
 #define pytalloc_GenericObject_reference(talloc_ptr) \
 	pytalloc_GenericObject_reference_ex(talloc_ptr, talloc_ptr)
 
-size_t pytalloc_BaseObject_size(void);
+_PUBLIC_ size_t pytalloc_BaseObject_size(void);
 
-int pytalloc_BaseObject_PyType_Ready(PyTypeObject *type);
+_PUBLIC_ int pytalloc_BaseObject_PyType_Ready(PyTypeObject *type);
 
 #endif /* _PYTALLOC_H_ */
diff -pruN 2:2.2.3-2/lib/talloc/pytalloc_util.c 2:2.4.2-0ubuntu1/lib/talloc/pytalloc_util.c
--- 2:2.2.3-2/lib/talloc/pytalloc_util.c	2021-10-28 15:29:47.584471700 +0000
+++ 2:2.4.2-0ubuntu1/lib/talloc/pytalloc_util.c	2022-01-24 12:18:16.330473700 +0000
@@ -3,18 +3,22 @@
    Python/Talloc glue
    Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2008
    
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
+     ** NOTE! The following LGPL license applies to the talloc
+     ** 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
+   version 3 of the License, or (at your option) any later version.
+
+   This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with this library; if not, see <http://www.gnu.org/licenses/>.
 */
 
 #include <Python.h>
diff -pruN 2:2.2.3-2/lib/talloc/talloc.c 2:2.4.2-0ubuntu1/lib/talloc/talloc.c
--- 2:2.2.3-2/lib/talloc/talloc.c	2021-11-02 22:53:09.475799300 +0000
+++ 2:2.4.2-0ubuntu1/lib/talloc/talloc.c	2022-01-24 12:18:16.330473700 +0000
@@ -54,11 +54,6 @@
 #include <valgrind.h>
 #endif
 
-/* use this to force every realloc to change the pointer, to stress test
-   code that might not cope */
-#define ALWAYS_REALLOC 0
-
-
 #define MAX_TALLOC_SIZE 0x10000000
 
 #define TALLOC_FLAG_FREE 0x01
@@ -392,7 +387,13 @@ _PUBLIC_ void talloc_set_log_fn(void (*l
 }
 
 #ifdef HAVE_CONSTRUCTOR_ATTRIBUTE
-void talloc_lib_init(void) __attribute__((constructor));
+#define CONSTRUCTOR __attribute__((constructor))
+#elif defined(HAVE_PRAGMA_INIT)
+#define CONSTRUCTOR
+#pragma init (talloc_lib_init)
+#endif
+#if defined(HAVE_CONSTRUCTOR_ATTRIBUTE) || defined(HAVE_PRAGMA_INIT)
+void talloc_lib_init(void) CONSTRUCTOR;
 void talloc_lib_init(void)
 {
 	uint32_t random_value;
@@ -1833,19 +1834,11 @@ _PUBLIC_ void *_talloc_realloc(const voi
 		return NULL;
 	}
 
-	if (tc->limit && (size > tc->size)) {
-		if (!talloc_memlimit_check(tc->limit, (size - tc->size))) {
-			errno = ENOMEM;
-			return NULL;
-		}
-	}
-
 	/* handle realloc inside a talloc_pool */
 	if (unlikely(tc->flags & TALLOC_FLAG_POOLMEM)) {
 		pool_hdr = tc->pool;
 	}
 
-#if (ALWAYS_REALLOC == 0)
 	/* don't shrink if we have less than 1k to gain */
 	if (size < tc->size && tc->limit == NULL) {
 		if (pool_hdr) {
@@ -1879,7 +1872,6 @@ _PUBLIC_ void *_talloc_realloc(const voi
 		 */
 		return ptr;
 	}
-#endif
 
 	/*
 	 * by resetting magic we catch users of the old memory
@@ -1898,32 +1890,6 @@ _PUBLIC_ void *_talloc_realloc(const voi
 	 */
 	_talloc_chunk_set_free(tc, NULL);
 
-#if ALWAYS_REALLOC
-	if (pool_hdr) {
-		new_ptr = tc_alloc_pool(tc, size + TC_HDR_SIZE, 0);
-		pool_hdr->object_count--;
-
-		if (new_ptr == NULL) {
-			new_ptr = malloc(TC_HDR_SIZE+size);
-			malloced = true;
-			new_size = size;
-		}
-
-		if (new_ptr) {
-			memcpy(new_ptr, tc, MIN(tc->size,size) + TC_HDR_SIZE);
-			TC_INVALIDATE_FULL_CHUNK(tc);
-		}
-	} else {
-		/* We're doing malloc then free here, so record the difference. */
-		old_size = tc->size;
-		new_size = size;
-		new_ptr = malloc(size + TC_HDR_SIZE);
-		if (new_ptr) {
-			memcpy(new_ptr, tc, MIN(tc->size, size) + TC_HDR_SIZE);
-			free(tc);
-		}
-	}
-#else
 	if (pool_hdr) {
 		struct talloc_chunk *pool_tc;
 		void *next_tc = tc_next_chunk(tc);
@@ -2020,6 +1986,25 @@ _PUBLIC_ void *_talloc_realloc(const voi
 		new_ptr = tc_alloc_pool(tc, size + TC_HDR_SIZE, 0);
 
 		if (new_ptr == NULL) {
+			/*
+			 * Couldn't allocate from pool (pool size
+			 * counts as already allocated for memlimit
+			 * purposes). We must check memory limit
+			 * before any real malloc.
+			 */
+			if (tc->limit) {
+				/*
+				 * Note we're doing an extra malloc,
+				 * on top of the pool size, so account
+				 * for size only, not the difference
+				 * between old and new size.
+				 */
+				if (!talloc_memlimit_check(tc->limit, size)) {
+					_talloc_chunk_set_not_free(tc);
+					errno = ENOMEM;
+					return NULL;
+				}
+			}
 			new_ptr = malloc(TC_HDR_SIZE+size);
 			malloced = true;
 			new_size = size;
@@ -2035,10 +2020,22 @@ _PUBLIC_ void *_talloc_realloc(const voi
 		/* We're doing realloc here, so record the difference. */
 		old_size = tc->size;
 		new_size = size;
+		/*
+		 * We must check memory limit
+		 * before any real realloc.
+		 */
+		if (tc->limit && (size > old_size)) {
+			if (!talloc_memlimit_check(tc->limit,
+					(size - old_size))) {
+				_talloc_chunk_set_not_free(tc);
+				errno = ENOMEM;
+				return NULL;
+			}
+		}
 		new_ptr = realloc(tc, size + TC_HDR_SIZE);
 	}
 got_new_ptr:
-#endif
+
 	if (unlikely(!new_ptr)) {
 		/*
 		 * Ok, this is a strange spot.  We have to put back
diff -pruN 2:2.2.3-2/lib/talloc/talloc.h 2:2.4.2-0ubuntu1/lib/talloc/talloc.h
--- 2:2.2.3-2/lib/talloc/talloc.h	2021-11-02 22:53:09.475799300 +0000
+++ 2:2.4.2-0ubuntu1/lib/talloc/talloc.h	2022-01-24 12:18:16.330473700 +0000
@@ -33,6 +33,19 @@
 extern "C" {
 #endif
 
+/* for old gcc releases that don't have the feature test macro __has_attribute */
+#ifndef __has_attribute
+#define __has_attribute(x) 0
+#endif
+
+#ifndef _PUBLIC_
+#if __has_attribute(visibility)
+#define _PUBLIC_ __attribute__((visibility("default")))
+#else
+#define _PUBLIC_
+#endif
+#endif
+
 /**
  * @defgroup talloc The talloc API
  *
@@ -45,10 +58,10 @@ extern "C" {
 #define TALLOC_VERSION_MAJOR 2
 #define TALLOC_VERSION_MINOR 3
 
-int talloc_version_major(void);
-int talloc_version_minor(void);
+_PUBLIC_ int talloc_version_major(void);
+_PUBLIC_ int talloc_version_minor(void);
 /* This is mostly useful only for testing */
-int talloc_test_get_magic(void);
+_PUBLIC_ int talloc_test_get_magic(void);
 
 /**
  * @brief Define a talloc parent type
@@ -89,11 +102,6 @@ typedef void TALLOC_CTX;
 #define TALLOC_DEPRECATED 0
 #endif
 
-/* for old gcc releases that don't have the feature test macro __has_attribute */
-#ifndef __has_attribute
-#define __has_attribute(x) 0
-#endif
-
 #ifndef PRINTF_ATTRIBUTE
 #if __has_attribute(format) || (__GNUC__ >= 3)
 /** Use gcc attribute to check printf fns.  a1 is the 1-based index of
@@ -107,7 +115,7 @@ typedef void TALLOC_CTX;
 #endif
 
 #ifndef _DEPRECATED_
-#ifdef HAVE___ATTRIBUTE__
+#if __has_attribute(deprecated) || (__GNUC__ >= 3)
 #define _DEPRECATED_ __attribute__ ((deprecated))
 #else
 #define _DEPRECATED_
@@ -148,10 +156,10 @@ typedef void TALLOC_CTX;
  * @see talloc_steal
  * @see talloc_free
  */
-void *talloc(const void *ctx, #type);
+_PUBLIC_ void *talloc(const void *ctx, #type);
 #else
 #define talloc(ctx, type) (type *)talloc_named_const(ctx, sizeof(type), #type)
-void *_talloc(const void *context, size_t size);
+_PUBLIC_ void *_talloc(const void *context, size_t size);
 #endif
 
 /**
@@ -171,7 +179,7 @@ void *_talloc(const void *context, size_
  *
  * @see talloc_named()
  */
-void *talloc_init(const char *fmt, ...) PRINTF_ATTRIBUTE(1,2);
+_PUBLIC_ void *talloc_init(const char *fmt, ...) PRINTF_ATTRIBUTE(1,2);
 
 #ifdef DOXYGEN
 /**
@@ -236,10 +244,10 @@ void *talloc_init(const char *fmt, ...)
  * @see talloc_set_destructor()
  * @see talloc_unlink()
  */
-int talloc_free(void *ptr);
+_PUBLIC_ int talloc_free(void *ptr);
 #else
 #define talloc_free(ctx) _talloc_free(ctx, __location__)
-int _talloc_free(void *ptr, const char *location);
+_PUBLIC_ int _talloc_free(void *ptr, const char *location);
 #endif
 
 /**
@@ -253,7 +261,7 @@ int _talloc_free(void *ptr, const char *
  * @param[in]  ptr      The chunk that you want to free the children of
  *                      (NULL is allowed too)
  */
-void talloc_free_children(void *ptr);
+_PUBLIC_ void talloc_free_children(void *ptr);
 
 #ifdef DOXYGEN
 /**
@@ -309,7 +317,7 @@ void talloc_free_children(void *ptr);
  * @see talloc()
  * @see talloc_free()
  */
-void talloc_set_destructor(const void *ptr, int (*destructor)(void *));
+_PUBLIC_ void talloc_set_destructor(const void *ptr, int (*destructor)(void *));
 
 /**
  * @brief Change a talloc chunk's parent.
@@ -349,7 +357,7 @@ void talloc_set_destructor(const void *p
  * if you are not careful with talloc_steal(). No guarantees are provided
  * as to your sanity or the safety of your data if you do this.
  */
-void *talloc_steal(const void *new_ctx, const void *ptr);
+_PUBLIC_ void *talloc_steal(const void *new_ctx, const void *ptr);
 #else /* DOXYGEN */
 /* try to make talloc_set_destructor() and talloc_steal() type safe,
    if we have a recent gcc */
@@ -369,8 +377,8 @@ void *talloc_steal(const void *new_ctx,
 #define _TALLOC_TYPEOF(ptr) void *
 #define talloc_steal(ctx, ptr) (_TALLOC_TYPEOF(ptr))_talloc_steal_loc((ctx),(ptr), __location__)
 #endif /* __GNUC__ >= 3 */
-void _talloc_set_destructor(const void *ptr, int (*_destructor)(void *));
-void *_talloc_steal_loc(const void *new_ctx, const void *ptr, const char *location);
+_PUBLIC_ void _talloc_set_destructor(const void *ptr, int (*_destructor)(void *));
+_PUBLIC_ void *_talloc_steal_loc(const void *new_ctx, const void *ptr, const char *location);
 #endif /* DOXYGEN */
 
 /**
@@ -403,7 +411,7 @@ void *_talloc_steal_loc(const void *new_
  * releasing the name. All of the memory is released when the ptr is freed
  * using talloc_free().
  */
-const char *talloc_set_name(const void *ptr, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
+_PUBLIC_ const char *talloc_set_name(const void *ptr, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
 
 #ifdef DOXYGEN
 /**
@@ -426,10 +434,10 @@ const char *talloc_set_name(const void *
  *                      It does not have any failure modes.
  *
  */
-void *talloc_move(const void *new_ctx, void **pptr);
+_PUBLIC_ void *talloc_move(const void *new_ctx, void **pptr);
 #else
 #define talloc_move(ctx, pptr) (_TALLOC_TYPEOF(*(pptr)))_talloc_move((ctx),(void *)(pptr))
-void *_talloc_move(const void *new_ctx, const void *pptr);
+_PUBLIC_ void *_talloc_move(const void *new_ctx, const void *pptr);
 #endif
 
 /**
@@ -448,7 +456,7 @@ void *_talloc_move(const void *new_ctx,
  *
  * @param[in]  name     Format string for the name.
  */
-void talloc_set_name_const(const void *ptr, const char *name);
+_PUBLIC_ void talloc_set_name_const(const void *ptr, const char *name);
 
 /**
  * @brief Create a named talloc chunk.
@@ -473,7 +481,7 @@ void talloc_set_name_const(const void *p
  *
  * @see talloc_set_name()
  */
-void *talloc_named(const void *context, size_t size,
+_PUBLIC_ void *talloc_named(const void *context, size_t size,
 		   const char *fmt, ...) PRINTF_ATTRIBUTE(3,4);
 
 /**
@@ -494,7 +502,7 @@ void *talloc_named(const void *context,
  *
  * @return             The allocated memory chunk, NULL on error.
  */
-void *talloc_named_const(const void *context, size_t size, const char *name);
+_PUBLIC_ void *talloc_named_const(const void *context, size_t size, const char *name);
 
 #ifdef DOXYGEN
 /**
@@ -517,7 +525,7 @@ void *talloc_named_const(const void *con
  *      void *mem = talloc_size(NULL, 100);
  * @endcode
  */
-void *talloc_size(const void *ctx, size_t size);
+_PUBLIC_ void *talloc_size(const void *ctx, size_t size);
 #else
 #define talloc_size(ctx, size) talloc_named_const(ctx, size, __location__)
 #endif
@@ -544,7 +552,7 @@ void *talloc_size(const void *ctx, size_
  *       unsigned int *a = talloc_ptrtype(NULL, a);
  * @endcode
  */
-void *talloc_ptrtype(const void *ctx, #type);
+_PUBLIC_ void *talloc_ptrtype(const void *ctx, #type);
 #else
 #define talloc_ptrtype(ctx, ptr) (_TALLOC_TYPEOF(ptr))talloc_size(ctx, sizeof(*(ptr)))
 #endif
@@ -562,7 +570,7 @@ void *talloc_ptrtype(const void *ctx, #t
  *
  * @return              A new talloc chunk, NULL on error.
  */
-void *talloc_new(const void *ctx);
+_PUBLIC_ void *talloc_new(const void *ctx);
 #else
 #define talloc_new(ctx) talloc_named_const(ctx, 0, "talloc_new: " __location__)
 #endif
@@ -596,7 +604,7 @@ void *talloc_new(const void *ctx);
  * @see talloc_zero_size()
  * @see talloc_zero_array()
  */
-void *talloc_zero(const void *ctx, #type);
+_PUBLIC_ void *talloc_zero(const void *ctx, #type);
 
 /**
  * @brief Allocate untyped, 0-initialized memory.
@@ -607,11 +615,11 @@ void *talloc_zero(const void *ctx, #type
  *
  * @return              The allocated memory chunk.
  */
-void *talloc_zero_size(const void *ctx, size_t size);
+_PUBLIC_ void *talloc_zero_size(const void *ctx, size_t size);
 #else
 #define talloc_zero(ctx, type) (type *)_talloc_zero(ctx, sizeof(type), #type)
 #define talloc_zero_size(ctx, size) _talloc_zero(ctx, size, __location__)
-void *_talloc_zero(const void *ctx, size_t size, const char *name);
+_PUBLIC_ void *_talloc_zero(const void *ctx, size_t size, const char *name);
 #endif
 
 /**
@@ -623,7 +631,7 @@ void *_talloc_zero(const void *ctx, size
  *
  * @see talloc_set_name()
  */
-const char *talloc_get_name(const void *ptr);
+_PUBLIC_ const char *talloc_get_name(const void *ptr);
 
 /**
  * @brief Verify that a talloc chunk carries a specified name.
@@ -637,7 +645,7 @@ const char *talloc_get_name(const void *
  *
  * @return               The pointer if the name matches, NULL if it doesn't.
  */
-void *talloc_check_name(const void *ptr, const char *name);
+_PUBLIC_ void *talloc_check_name(const void *ptr, const char *name);
 
 /**
  * @brief Get the parent chunk of a pointer.
@@ -646,7 +654,7 @@ void *talloc_check_name(const void *ptr,
  *
  * @return              The talloc parent of ptr, NULL on error.
  */
-void *talloc_parent(const void *ptr);
+_PUBLIC_ void *talloc_parent(const void *ptr);
 
 /**
  * @brief Get a talloc chunk's parent name.
@@ -655,7 +663,7 @@ void *talloc_parent(const void *ptr);
  *
  * @return              The name of ptr's parent chunk.
  */
-const char *talloc_parent_name(const void *ptr);
+_PUBLIC_ const char *talloc_parent_name(const void *ptr);
 
 /**
  * @brief Get the total size of a talloc chunk including its children.
@@ -671,7 +679,7 @@ const char *talloc_parent_name(const voi
  *
  * @return              The total size.
  */
-size_t talloc_total_size(const void *ptr);
+_PUBLIC_ size_t talloc_total_size(const void *ptr);
 
 /**
  * @brief Get the number of talloc chunks hanging off a chunk.
@@ -688,7 +696,7 @@ size_t talloc_total_size(const void *ptr
  *
  * @return              The total size.
  */
-size_t talloc_total_blocks(const void *ptr);
+_PUBLIC_ size_t talloc_total_blocks(const void *ptr);
 
 #ifdef DOXYGEN
 /**
@@ -711,10 +719,10 @@ size_t talloc_total_blocks(const void *p
  *
  * @see talloc_size()
  */
-void *talloc_memdup(const void *t, const void *p, size_t size);
+_PUBLIC_ void *talloc_memdup(const void *t, const void *p, size_t size);
 #else
 #define talloc_memdup(t, p, size) _talloc_memdup(t, p, size, __location__)
-void *_talloc_memdup(const void *t, const void *p, size_t size, const char *name);
+_PUBLIC_ void *_talloc_memdup(const void *t, const void *p, size_t size, const char *name);
 #endif
 
 #ifdef DOXYGEN
@@ -735,7 +743,7 @@ void *_talloc_memdup(const void *t, cons
  *
  * @param[in]  type     The type to assign.
  */
-void talloc_set_type(const char *ptr, #type);
+_PUBLIC_ void talloc_set_type(const char *ptr, #type);
 
 /**
  * @brief Get a typed pointer out of a talloc pointer.
@@ -775,14 +783,14 @@ type *talloc_get_type(const void *ptr, #
  *
  * @return              The same value as ptr, type-checked and properly cast.
  */
-void *talloc_get_type_abort(const void *ptr, #type);
+_PUBLIC_ void *talloc_get_type_abort(const void *ptr, #type);
 #else
 #ifdef TALLOC_GET_TYPE_ABORT_NOOP
 #define talloc_get_type_abort(ptr, type) (type *)(ptr)
 #else
 #define talloc_get_type_abort(ptr, type) (type *)_talloc_get_type_abort(ptr, #type, __location__)
 #endif
-void *_talloc_get_type_abort(const void *ptr, const char *name, const char *location);
+_PUBLIC_ void *_talloc_get_type_abort(const void *ptr, const char *name, const char *location);
 #endif
 
 /**
@@ -800,7 +808,7 @@ void *_talloc_get_type_abort(const void
  * @return              The memory context we are looking for, NULL if not
  *                      found.
  */
-void *talloc_find_parent_byname(const void *ctx, const char *name);
+_PUBLIC_ void *talloc_find_parent_byname(const void *ctx, const char *name);
 
 #ifdef DOXYGEN
 /**
@@ -820,7 +828,7 @@ void *talloc_find_parent_byname(const vo
  * @return              The memory context we are looking for, NULL if not
  *                      found.
  */
-void *talloc_find_parent_bytype(const void *ptr, #type);
+_PUBLIC_ void *talloc_find_parent_bytype(const void *ptr, #type);
 #else
 #define talloc_find_parent_bytype(ptr, type) (type *)talloc_find_parent_byname(ptr, #type)
 #endif
@@ -865,7 +873,7 @@ void *talloc_find_parent_bytype(const vo
  *
  * @return              The allocated talloc pool, NULL on error.
  */
-void *talloc_pool(const void *context, size_t size);
+_PUBLIC_ void *talloc_pool(const void *context, size_t size);
 
 #ifdef DOXYGEN
 /**
@@ -887,7 +895,7 @@ void *talloc_pool(const void *context, s
  *
  * @return              The allocated talloc object, NULL on error.
  */
-void *talloc_pooled_object(const void *ctx, #type,
+_PUBLIC_ void *talloc_pooled_object(const void *ctx, #type,
 			   unsigned num_subobjects,
 			   size_t total_subobjects_size);
 #else
@@ -897,7 +905,7 @@ void *talloc_pooled_object(const void *c
 	(_type *)_talloc_pooled_object((_ctx), sizeof(_type), #_type, \
 					(_num_subobjects), \
 					(_total_subobjects_size))
-void *_talloc_pooled_object(const void *ctx,
+_PUBLIC_ void *_talloc_pooled_object(const void *ctx,
 			    size_t type_size,
 			    const char *type_name,
 			    unsigned num_subobjects,
@@ -942,7 +950,7 @@ void *_talloc_pooled_object(const void *
  *
  * @return              0 on success, -1 on error.
  */
-int talloc_increase_ref_count(const void *ptr);
+_PUBLIC_ int talloc_increase_ref_count(const void *ptr);
 
 /**
  * @brief Get the number of references to a talloc chunk.
@@ -951,7 +959,7 @@ int talloc_increase_ref_count(const void
  *
  * @return              The number of references.
  */
-size_t talloc_reference_count(const void *ptr);
+_PUBLIC_ size_t talloc_reference_count(const void *ptr);
 
 #ifdef DOXYGEN
 /**
@@ -997,10 +1005,10 @@ size_t talloc_reference_count(const void
  *
  * @see talloc_unlink()
  */
-void *talloc_reference(const void *ctx, const void *ptr);
+_PUBLIC_ void *talloc_reference(const void *ctx, const void *ptr);
 #else
 #define talloc_reference(ctx, ptr) (_TALLOC_TYPEOF(ptr))_talloc_reference_loc((ctx),(ptr), __location__)
-void *_talloc_reference_loc(const void *context, const void *ptr, const char *location);
+_PUBLIC_ void *_talloc_reference_loc(const void *context, const void *ptr, const char *location);
 #endif
 
 /**
@@ -1040,7 +1048,7 @@ void *_talloc_reference_loc(const void *
  *      talloc_unlink(b, c);
  * @endcode
  */
-int talloc_unlink(const void *context, void *ptr);
+_PUBLIC_ int talloc_unlink(const void *context, void *ptr);
 
 /**
  * @brief Provide a talloc context that is freed at program exit.
@@ -1060,7 +1068,7 @@ int talloc_unlink(const void *context, v
  *
  * @return              A talloc context, NULL on error.
  */
-void *talloc_autofree_context(void) _DEPRECATED_;
+_PUBLIC_ void *talloc_autofree_context(void) _DEPRECATED_;
 
 /**
  * @brief Get the size of a talloc chunk.
@@ -1073,7 +1081,7 @@ void *talloc_autofree_context(void) _DEP
  *
  * @return              The size of the talloc chunk.
  */
-size_t talloc_get_size(const void *ctx);
+_PUBLIC_ size_t talloc_get_size(const void *ctx);
 
 /**
  * @brief Show the parentage of a context.
@@ -1082,7 +1090,7 @@ size_t talloc_get_size(const void *ctx);
  *
  * @param[in]  file               The output to use, a file, stdout or stderr.
  */
-void talloc_show_parents(const void *context, FILE *file);
+_PUBLIC_ void talloc_show_parents(const void *context, FILE *file);
 
 /**
  * @brief Check if a context is parent of a talloc chunk.
@@ -1095,7 +1103,7 @@ void talloc_show_parents(const void *con
  *
  * @return              Return 1 if this is the case, 0 if not.
  */
-int talloc_is_parent(const void *context, const void *ptr);
+_PUBLIC_ int talloc_is_parent(const void *context, const void *ptr);
 
 /**
  * @brief Change the parent context of a talloc pointer.
@@ -1115,7 +1123,7 @@ int talloc_is_parent(const void *context
  * @return              Return the pointer you passed. It does not have any
  *                      failure modes.
  */
-void *talloc_reparent(const void *old_parent, const void *new_parent, const void *ptr);
+_PUBLIC_ void *talloc_reparent(const void *old_parent, const void *new_parent, const void *ptr);
 
 /* @} ******************************************************************/
 
@@ -1160,10 +1168,10 @@ void *talloc_reparent(const void *old_pa
  * @see talloc()
  * @see talloc_zero_array()
  */
-void *talloc_array(const void *ctx, #type, unsigned count);
+_PUBLIC_ void *talloc_array(const void *ctx, #type, unsigned count);
 #else
 #define talloc_array(ctx, type, count) (type *)_talloc_array(ctx, sizeof(type), count, #type)
-void *_talloc_array(const void *ctx, size_t el_size, unsigned count, const char *name);
+_PUBLIC_ void *_talloc_array(const void *ctx, size_t el_size, unsigned count, const char *name);
 #endif
 
 #ifdef DOXYGEN
@@ -1178,7 +1186,7 @@ void *_talloc_array(const void *ctx, siz
  *
  * @return              The allocated result, NULL on error.
  */
-void *talloc_array_size(const void *ctx, size_t size, unsigned count);
+_PUBLIC_ void *talloc_array_size(const void *ctx, size_t size, unsigned count);
 #else
 #define talloc_array_size(ctx, size, count) _talloc_array(ctx, size, count, __location__)
 #endif
@@ -1245,7 +1253,7 @@ size_t talloc_array_length(const void *c
 void *talloc_zero_array(const void *ctx, #type, unsigned count);
 #else
 #define talloc_zero_array(ctx, type, count) (type *)_talloc_zero_array(ctx, sizeof(type), count, #type)
-void *_talloc_zero_array(const void *ctx,
+_PUBLIC_ void *_talloc_zero_array(const void *ctx,
 			 size_t el_size,
 			 unsigned count,
 			 const char *name);
@@ -1282,10 +1290,10 @@ void *_talloc_zero_array(const void *ctx
  *                      due to a lack of memory, or because the pointer has more
  *                      than one parent (see talloc_reference()).
  */
-void *talloc_realloc(const void *ctx, void *ptr, #type, size_t count);
+_PUBLIC_ void *talloc_realloc(const void *ctx, void *ptr, #type, size_t count);
 #else
 #define talloc_realloc(ctx, p, type, count) (type *)_talloc_realloc_array(ctx, p, sizeof(type), count, #type)
-void *_talloc_realloc_array(const void *ctx, void *ptr, size_t el_size, unsigned count, const char *name);
+_PUBLIC_ void *_talloc_realloc_array(const void *ctx, void *ptr, size_t el_size, unsigned count, const char *name);
 #endif
 
 #ifdef DOXYGEN
@@ -1306,7 +1314,7 @@ void *_talloc_realloc_array(const void *
 void *talloc_realloc_size(const void *ctx, void *ptr, size_t size);
 #else
 #define talloc_realloc_size(ctx, ptr, size) _talloc_realloc(ctx, ptr, size, __location__)
-void *_talloc_realloc(const void *context, void *ptr, size_t size, const char *name);
+_PUBLIC_ void *_talloc_realloc(const void *context, void *ptr, size_t size, const char *name);
 #endif
 
 /**
@@ -1326,7 +1334,7 @@ void *_talloc_realloc(const void *contex
  *
  * @return              The new chunk, NULL on error.
  */
-void *talloc_realloc_fn(const void *context, void *ptr, size_t size);
+_PUBLIC_ void *talloc_realloc_fn(const void *context, void *ptr, size_t size);
 
 /* @} ******************************************************************/
 
@@ -1361,7 +1369,7 @@ void *talloc_realloc_fn(const void *cont
  *
  * @return              The duplicated string, NULL on error.
  */
-char *talloc_strdup(const void *t, const char *p);
+_PUBLIC_ char *talloc_strdup(const void *t, const char *p);
 
 /**
  * @brief Append a string to given string.
@@ -1387,7 +1395,7 @@ char *talloc_strdup(const void *t, const
  * @see talloc_strdup()
  * @see talloc_strdup_append_buffer()
  */
-char *talloc_strdup_append(char *s, const char *a);
+_PUBLIC_ char *talloc_strdup_append(char *s, const char *a);
 
 /**
  * @brief Append a string to a given buffer.
@@ -1423,7 +1431,7 @@ char *talloc_strdup_append(char *s, cons
  * @see talloc_strdup_append()
  * @see talloc_array_length()
  */
-char *talloc_strdup_append_buffer(char *s, const char *a);
+_PUBLIC_ char *talloc_strdup_append_buffer(char *s, const char *a);
 
 /**
  * @brief Duplicate a length-limited string into a talloc chunk.
@@ -1445,7 +1453,7 @@ char *talloc_strdup_append_buffer(char *
  *
  * @return              The duplicated string, NULL on error.
  */
-char *talloc_strndup(const void *t, const char *p, size_t n);
+_PUBLIC_ char *talloc_strndup(const void *t, const char *p, size_t n);
 
 /**
  * @brief Append at most n characters of a string to given string.
@@ -1474,7 +1482,7 @@ char *talloc_strndup(const void *t, cons
  * @see talloc_strndup()
  * @see talloc_strndup_append_buffer()
  */
-char *talloc_strndup_append(char *s, const char *a, size_t n);
+_PUBLIC_ char *talloc_strndup_append(char *s, const char *a, size_t n);
 
 /**
  * @brief Append at most n characters of a string to given buffer
@@ -1513,7 +1521,7 @@ char *talloc_strndup_append(char *s, con
  * @see talloc_strndup_append()
  * @see talloc_array_length()
  */
-char *talloc_strndup_append_buffer(char *s, const char *a, size_t n);
+_PUBLIC_ char *talloc_strndup_append_buffer(char *s, const char *a, size_t n);
 
 /**
  * @brief Format a string given a va_list.
@@ -1536,7 +1544,7 @@ char *talloc_strndup_append_buffer(char
  *
  * @return              The formatted string, NULL on error.
  */
-char *talloc_vasprintf(const void *t, const char *fmt, va_list ap) PRINTF_ATTRIBUTE(2,0);
+_PUBLIC_ char *talloc_vasprintf(const void *t, const char *fmt, va_list ap) PRINTF_ATTRIBUTE(2,0);
 
 /**
  * @brief Format a string given a va_list and append it to the given destination
@@ -1552,7 +1560,7 @@ char *talloc_vasprintf(const void *t, co
  *
  * @see talloc_vasprintf()
  */
-char *talloc_vasprintf_append(char *s, const char *fmt, va_list ap) PRINTF_ATTRIBUTE(2,0);
+_PUBLIC_ char *talloc_vasprintf_append(char *s, const char *fmt, va_list ap) PRINTF_ATTRIBUTE(2,0);
 
 /**
  * @brief Format a string given a va_list and append it to the given destination
@@ -1568,7 +1576,7 @@ char *talloc_vasprintf_append(char *s, c
  *
  * @see talloc_vasprintf()
  */
-char *talloc_vasprintf_append_buffer(char *s, const char *fmt, va_list ap) PRINTF_ATTRIBUTE(2,0);
+_PUBLIC_ char *talloc_vasprintf_append_buffer(char *s, const char *fmt, va_list ap) PRINTF_ATTRIBUTE(2,0);
 
 /**
  * @brief Format a string.
@@ -1590,7 +1598,7 @@ char *talloc_vasprintf_append_buffer(cha
  *
  * @return              The formatted string, NULL on error.
  */
-char *talloc_asprintf(const void *t, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
+_PUBLIC_ char *talloc_asprintf(const void *t, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
 
 /**
  * @brief Append a formatted string to another string.
@@ -1616,7 +1624,7 @@ char *talloc_asprintf(const void *t, con
  *
  * @return              The formatted string, NULL on error.
  */
-char *talloc_asprintf_append(char *s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
+_PUBLIC_ char *talloc_asprintf_append(char *s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
 
 /**
  * @brief Append a formatted string to another string.
@@ -1653,7 +1661,7 @@ char *talloc_asprintf_append(char *s, co
  * @see talloc_asprintf()
  * @see talloc_asprintf_append()
  */
-char *talloc_asprintf_append_buffer(char *s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
+_PUBLIC_ char *talloc_asprintf_append_buffer(char *s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
 
 /* @} ******************************************************************/
 
@@ -1693,7 +1701,7 @@ char *talloc_asprintf_append_buffer(char
  *
  * @param[in]  private_data  Private pointer passed to callback.
  */
-void talloc_report_depth_cb(const void *ptr, int depth, int max_depth,
+_PUBLIC_ void talloc_report_depth_cb(const void *ptr, int depth, int max_depth,
 			    void (*callback)(const void *ptr,
 					     int depth, int max_depth,
 					     int is_ref,
@@ -1714,7 +1722,7 @@ void talloc_report_depth_cb(const void *
  *
  * @param[in]  f        The file handle to print to.
  */
-void talloc_report_depth_file(const void *ptr, int depth, int max_depth, FILE *f);
+_PUBLIC_ void talloc_report_depth_file(const void *ptr, int depth, int max_depth, FILE *f);
 
 /**
  * @brief Print a summary report of all memory used by ptr.
@@ -1744,7 +1752,7 @@ void talloc_report_depth_file(const void
  *
  * @see talloc_report()
  */
-void talloc_report_full(const void *ptr, FILE *f);
+_PUBLIC_ void talloc_report_full(const void *ptr, FILE *f);
 
 /**
  * @brief Print a summary report of all memory used by ptr.
@@ -1772,7 +1780,7 @@ void talloc_report_full(const void *ptr,
  *
  * @see talloc_report_full()
  */
-void talloc_report(const void *ptr, FILE *f);
+_PUBLIC_ void talloc_report(const void *ptr, FILE *f);
 
 /**
  * @brief Enable tracking the use of NULL memory contexts.
@@ -1781,7 +1789,7 @@ void talloc_report(const void *ptr, FILE
  * reporting on exit. Useful for when you want to do your own leak
  * reporting call via talloc_report_null_full();
  */
-void talloc_enable_null_tracking(void);
+_PUBLIC_ void talloc_enable_null_tracking(void);
 
 /**
  * @brief Enable tracking the use of NULL memory contexts.
@@ -1790,14 +1798,14 @@ void talloc_enable_null_tracking(void);
  * reporting on exit. Useful for when you want to do your own leak
  * reporting call via talloc_report_null_full();
  */
-void talloc_enable_null_tracking_no_autofree(void);
+_PUBLIC_ void talloc_enable_null_tracking_no_autofree(void);
 
 /**
  * @brief Disable tracking of the NULL memory context.
  *
  * This disables tracking of the NULL memory context.
  */
-void talloc_disable_null_tracking(void);
+_PUBLIC_ void talloc_disable_null_tracking(void);
 
 /**
  * @brief Enable leak report when a program exits.
@@ -1825,7 +1833,7 @@ void talloc_disable_null_tracking(void);
  *      iconv(UTF-16LE,UTF8)           contains     45 bytes in   2 blocks
  * @endcode
  */
-void talloc_enable_leak_report(void);
+_PUBLIC_ void talloc_enable_leak_report(void);
 
 /**
  * @brief Enable full leak report when a program exits.
@@ -1853,7 +1861,7 @@ void talloc_enable_leak_report(void);
  *      x1                             contains      1 bytes in   1 blocks (ref 0)
  * @endcode
  */
-void talloc_enable_leak_report_full(void);
+_PUBLIC_ void talloc_enable_leak_report_full(void);
 
 /**
  * @brief Set a custom "abort" function that is called on serious error.
@@ -1886,7 +1894,7 @@ void talloc_enable_leak_report_full(void
  * @see talloc_set_log_fn()
  * @see talloc_get_type()
  */
-void talloc_set_abort_fn(void (*abort_fn)(const char *reason));
+_PUBLIC_ void talloc_set_abort_fn(void (*abort_fn)(const char *reason));
 
 /**
  * @brief Set a logging function.
@@ -1896,7 +1904,7 @@ void talloc_set_abort_fn(void (*abort_fn
  * @see talloc_set_log_stderr()
  * @see talloc_set_abort_fn()
  */
-void talloc_set_log_fn(void (*log_fn)(const char *message));
+_PUBLIC_ void talloc_set_log_fn(void (*log_fn)(const char *message));
 
 /**
  * @brief Set stderr as the output for logs.
@@ -1904,7 +1912,7 @@ void talloc_set_log_fn(void (*log_fn)(co
  * @see talloc_set_log_fn()
  * @see talloc_set_abort_fn()
  */
-void talloc_set_log_stderr(void);
+_PUBLIC_ void talloc_set_log_stderr(void);
 
 /**
  * @brief Set a max memory limit for the current context hierarchy
@@ -1926,7 +1934,7 @@ void talloc_set_log_stderr(void);
  * @param[in]	ctx		The talloc context to set the limit on
  * @param[in]	max_size	The (new) max_size
  */
-int talloc_set_memlimit(const void *ctx, size_t max_size) _DEPRECATED_;
+_PUBLIC_ int talloc_set_memlimit(const void *ctx, size_t max_size) _DEPRECATED_;
 
 /* @} ******************************************************************/
 
diff -pruN 2:2.2.3-2/lib/talloc/testsuite.c 2:2.4.2-0ubuntu1/lib/talloc/testsuite.c
--- 2:2.2.3-2/lib/talloc/testsuite.c	2021-11-02 22:53:09.475799300 +0000
+++ 2:2.4.2-0ubuntu1/lib/talloc/testsuite.c	2022-01-24 12:18:16.330473700 +0000
@@ -1307,7 +1307,6 @@ static bool test_pool(void)
 	p4 = talloc_size(p3, 1000);
 	memset(p4, 0x11, talloc_get_size(p4));
 
-#if 1 /* this relies on ALWAYS_REALLOC == 0 in talloc.c */
 	p2_2 = talloc_realloc_size(pool, p2, 20+1);
 	torture_assert("pool realloc 20+1", p2_2 == p2, "failed: pointer changed");
 	memset(p2, 0x11, talloc_get_size(p2));
@@ -1372,8 +1371,6 @@ static bool test_pool(void)
 	torture_assert("pool alloc 800", p3 == p1, "failed: pointer changed");
 	memset(p3, 0x11, talloc_get_size(p3));
 
-#endif /* this relies on ALWAYS_REALLOC == 0 in talloc.c */
-
 	talloc_free(pool);
 
 	return true;
@@ -1408,7 +1405,6 @@ static bool test_pool_steal(void)
 
 	p1_2 = p1;
 
-#if 1 /* this relies on ALWAYS_REALLOC == 0 in talloc.c */
 	p1_2 = talloc_realloc_size(root, p1, 5 * 16);
 	torture_assert("pool realloc 5 * 16", p1_2 > p2, "failed: pointer not changed");
 	memset(p1_2, 0x11, talloc_get_size(p1_2));
@@ -1420,13 +1416,11 @@ static bool test_pool_steal(void)
 	p2_2 = talloc_realloc_size(root, p2, 3 * 16);
 	torture_assert("pool realloc 5 * 16", p2_2 == p2, "failed: pointer changed");
 	memset(p2_2, 0x11, talloc_get_size(p2_2));
-#endif /* this relies on ALWAYS_REALLOC == 0 in talloc.c */
 
 	talloc_free(p1_2);
 
 	p2_2 = p2;
 
-#if 1 /* this relies on ALWAYS_REALLOC == 0 in talloc.c */
 	/* now we should reclaim the full pool */
 	p2_2 = talloc_realloc_size(root, p2, 8 * 16);
 	torture_assert("pool realloc 8 * 16", p2_2 == p1, "failed: pointer not expected");
@@ -1438,8 +1432,6 @@ static bool test_pool_steal(void)
 	torture_assert("pool realloc 2 * 1024", p2_2 != p1, "failed: pointer not expected");
 	memset(p2_2, 0x11, talloc_get_size(p2_2));
 
-#endif /* this relies on ALWAYS_REALLOC == 0 in talloc.c */
-
 	talloc_free(p2_2);
 
 	talloc_free(root);
@@ -1767,28 +1759,145 @@ static bool test_memlimit(void)
 	talloc_free(root);
 
 	/* Test memlimits with pools. */
+	printf("==== talloc_pool(NULL, 10*1024)\n");
 	pool = talloc_pool(NULL, 10*1024);
 	torture_assert("memlimit", pool != NULL,
 		"failed: alloc should not fail due to memory limit\n");
+
+	printf("==== talloc_set_memlimit(pool, 10*1024)\n");
 	talloc_set_memlimit(pool, 10*1024);
 	for (i = 0; i < 9; i++) {
+		printf("==== talloc_size(pool, 1024) %i/10\n", i + 1);
 		l1 = talloc_size(pool, 1024);
 		torture_assert("memlimit", l1 != NULL,
 			"failed: alloc should not fail due to memory limit\n");
+		talloc_report_full(pool, stdout);
 	}
 	/* The next alloc should fail. */
+	printf("==== talloc_size(pool, 1024) 10/10\n");
 	l2 = talloc_size(pool, 1024);
 	torture_assert("memlimit", l2 == NULL,
 			"failed: alloc should fail due to memory limit\n");
 
+	talloc_report_full(pool, stdout);
+
 	/* Moving one of the children shouldn't change the limit,
 	   as it's still inside the pool. */
+
+	printf("==== talloc_new(NULL)\n");
 	root = talloc_new(NULL);
+
+	printf("==== talloc_steal(root, l1)\n");
 	talloc_steal(root, l1);
+
+	printf("==== talloc_size(pool, 1024)\n");
 	l2 = talloc_size(pool, 1024);
 	torture_assert("memlimit", l2 == NULL,
 			"failed: alloc should fail due to memory limit\n");
 
+	printf("==== talloc_free_children(pool)\n");
+	talloc_free(l1);
+	talloc_free_children(pool);
+
+	printf("==== talloc_size(pool, 1024)\n");
+	l1 = talloc_size(pool, 1024);
+
+	/* try reallocs of increasing size */
+	for (i = 1; i < 9; i++) {
+		printf("==== talloc_realloc_size(NULL, l1, %i*1024) %i/10\n", i, i + 1);
+		l1 = talloc_realloc_size(NULL, l1, i*1024);
+		torture_assert("memlimit", l1 != NULL,
+			"failed: realloc should not fail due to memory limit\n");
+		talloc_report_full(pool, stdout);
+	}
+	/* The next alloc should fail. */
+	printf("==== talloc_realloc_size(NULL, l1, 10*1024) 10/10\n");
+	l2 = talloc_realloc_size(NULL, l1, 10*1024);
+	torture_assert("memlimit", l2 == NULL,
+			"failed: realloc should fail due to memory limit\n");
+
+	/* Increase the memlimit */
+	printf("==== talloc_set_memlimit(pool, 11*1024)\n");
+	talloc_set_memlimit(pool, 11*1024);
+
+	/* The final realloc should still fail
+	   as the entire realloced chunk needs to be moved out of the pool */
+	printf("==== talloc_realloc_size(NULL, l1, 10*1024) 10/10\n");
+	l2 = talloc_realloc_size(NULL, l1, 10*1024);
+	torture_assert("memlimit", l2 == NULL,
+			"failed: realloc should fail due to memory limit\n");
+
+	talloc_report_full(pool, stdout);
+
+	printf("==== talloc_set_memlimit(pool, 21*1024)\n");
+	talloc_set_memlimit(pool, 21*1024);
+
+	/* There's now sufficient space to move the chunk out of the pool */
+	printf("==== talloc_realloc_size(NULL, l1, 10*1024) 10/10\n");
+	l2 = talloc_realloc_size(NULL, l1, 10*1024);
+	torture_assert("memlimit", l2 != NULL,
+			"failed: realloc should not fail due to memory limit\n");
+
+	talloc_report_full(pool, stdout);
+
+	/* ...which should mean smaller allocations can now occur within the pool */
+	printf("==== talloc_size(pool, 9*1024)\n");
+	l1 = talloc_size(pool, 9*1024);
+	torture_assert("memlimit", l1 != NULL,
+			"failed: new allocations should be allowed in the pool\n");
+
+	talloc_report_full(pool, stdout);
+
+	/* But reallocs bigger than the pool will still fail */
+	printf("==== talloc_realloc_size(NULL, l1, 10*1024)\n");
+	l2 = talloc_realloc_size(NULL, l1, 10*1024);
+	torture_assert("memlimit", l2 == NULL,
+			"failed: realloc should fail due to memory limit\n");
+
+	talloc_report_full(pool, stdout);
+
+	/* ..as well as allocs */
+	printf("==== talloc_size(pool, 1024)\n");
+	l1 = talloc_size(pool, 1024);
+	torture_assert("memlimit", l1 == NULL,
+			"failed: alloc should fail due to memory limit\n");
+
+	talloc_report_full(pool, stdout);
+
+	printf("==== talloc_free_children(pool)\n");
+	talloc_free_children(pool);
+
+	printf("==== talloc_set_memlimit(pool, 1024)\n");
+	talloc_set_memlimit(pool, 1024);
+
+	/* We should still be able to allocate up to the pool limit
+	   because the memlimit only applies to new heap allocations */
+	printf("==== talloc_size(pool, 9*1024)\n");
+	l1 = talloc_size(pool, 9*1024);
+	torture_assert("memlimit", l1 != NULL,
+			"failed: alloc should not fail due to memory limit\n");
+
+	talloc_report_full(pool, stdout);
+
+	l1 = talloc_size(pool, 1024);
+	torture_assert("memlimit", l1 == NULL,
+			"failed: alloc should fail due to memory limit\n");
+
+	talloc_report_full(pool, stdout);
+
+	printf("==== talloc_free_children(pool)\n");
+	talloc_free_children(pool);
+
+	printf("==== talloc_set_memlimit(pool, 10*1024)\n");
+	talloc_set_memlimit(pool, 10*1024);
+
+	printf("==== talloc_size(pool, 1024)\n");
+	l1 = talloc_size(pool, 1024);
+	torture_assert("memlimit", l1 != NULL,
+			"failed: alloc should not fail due to memory limit\n");
+
+	talloc_report_full(pool, stdout);
+
 	talloc_free(pool);
 	talloc_free(root);
 	printf("success: memlimit\n");
diff -pruN 2:2.2.3-2/lib/talloc/wscript 2:2.4.2-0ubuntu1/lib/talloc/wscript
--- 2:2.2.3-2/lib/talloc/wscript	2021-11-02 22:53:09.475799300 +0000
+++ 2:2.4.2-0ubuntu1/lib/talloc/wscript	2022-01-24 12:25:00.184410600 +0000
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 
 APPNAME = 'talloc'
-VERSION = '2.3.1'
+VERSION = '2.3.3'
 
 import os
 import sys
diff -pruN 2:2.2.3-2/lib/tdb/ABI/tdb-1.4.4.sigs 2:2.4.2-0ubuntu1/lib/tdb/ABI/tdb-1.4.4.sigs
--- 2:2.2.3-2/lib/tdb/ABI/tdb-1.4.4.sigs	1970-01-01 00:00:00.000000000 +0000
+++ 2:2.4.2-0ubuntu1/lib/tdb/ABI/tdb-1.4.4.sigs	2022-01-24 12:18:16.330473700 +0000
@@ -0,0 +1,73 @@
+tdb_add_flags: void (struct tdb_context *, unsigned int)
+tdb_append: int (struct tdb_context *, TDB_DATA, TDB_DATA)
+tdb_chainlock: int (struct tdb_context *, TDB_DATA)
+tdb_chainlock_mark: int (struct tdb_context *, TDB_DATA)
+tdb_chainlock_nonblock: int (struct tdb_context *, TDB_DATA)
+tdb_chainlock_read: int (struct tdb_context *, TDB_DATA)
+tdb_chainlock_read_nonblock: int (struct tdb_context *, TDB_DATA)
+tdb_chainlock_unmark: int (struct tdb_context *, TDB_DATA)
+tdb_chainunlock: int (struct tdb_context *, TDB_DATA)
+tdb_chainunlock_read: int (struct tdb_context *, TDB_DATA)
+tdb_check: int (struct tdb_context *, int (*)(TDB_DATA, TDB_DATA, void *), void *)
+tdb_close: int (struct tdb_context *)
+tdb_delete: int (struct tdb_context *, TDB_DATA)
+tdb_dump_all: void (struct tdb_context *)
+tdb_enable_seqnum: void (struct tdb_context *)
+tdb_error: enum TDB_ERROR (struct tdb_context *)
+tdb_errorstr: const char *(struct tdb_context *)
+tdb_exists: int (struct tdb_context *, TDB_DATA)
+tdb_fd: int (struct tdb_context *)
+tdb_fetch: TDB_DATA (struct tdb_context *, TDB_DATA)
+tdb_firstkey: TDB_DATA (struct tdb_context *)
+tdb_freelist_size: int (struct tdb_context *)
+tdb_get_flags: int (struct tdb_context *)
+tdb_get_logging_private: void *(struct tdb_context *)
+tdb_get_seqnum: int (struct tdb_context *)
+tdb_hash_size: int (struct tdb_context *)
+tdb_increment_seqnum_nonblock: void (struct tdb_context *)
+tdb_jenkins_hash: unsigned int (TDB_DATA *)
+tdb_lock_nonblock: int (struct tdb_context *, int, int)
+tdb_lockall: int (struct tdb_context *)
+tdb_lockall_mark: int (struct tdb_context *)
+tdb_lockall_nonblock: int (struct tdb_context *)
+tdb_lockall_read: int (struct tdb_context *)
+tdb_lockall_read_nonblock: int (struct tdb_context *)
+tdb_lockall_unmark: int (struct tdb_context *)
+tdb_log_fn: tdb_log_func (struct tdb_context *)
+tdb_map_size: size_t (struct tdb_context *)
+tdb_name: const char *(struct tdb_context *)
+tdb_nextkey: TDB_DATA (struct tdb_context *, TDB_DATA)
+tdb_null: dptr = 0xXXXX, dsize = 0
+tdb_open: struct tdb_context *(const char *, int, int, int, mode_t)
+tdb_open_ex: struct tdb_context *(const char *, int, int, int, mode_t, const struct tdb_logging_context *, tdb_hash_func)
+tdb_parse_record: int (struct tdb_context *, TDB_DATA, int (*)(TDB_DATA, TDB_DATA, void *), void *)
+tdb_printfreelist: int (struct tdb_context *)
+tdb_remove_flags: void (struct tdb_context *, unsigned int)
+tdb_reopen: int (struct tdb_context *)
+tdb_reopen_all: int (int)
+tdb_repack: int (struct tdb_context *)
+tdb_rescue: int (struct tdb_context *, void (*)(TDB_DATA, TDB_DATA, void *), void *)
+tdb_runtime_check_for_robust_mutexes: bool (void)
+tdb_set_logging_function: void (struct tdb_context *, const struct tdb_logging_context *)
+tdb_set_max_dead: void (struct tdb_context *, int)
+tdb_setalarm_sigptr: void (struct tdb_context *, volatile sig_atomic_t *)
+tdb_store: int (struct tdb_context *, TDB_DATA, TDB_DATA, int)
+tdb_storev: int (struct tdb_context *, TDB_DATA, const TDB_DATA *, int, int)
+tdb_summary: char *(struct tdb_context *)
+tdb_transaction_active: bool (struct tdb_context *)
+tdb_transaction_cancel: int (struct tdb_context *)
+tdb_transaction_commit: int (struct tdb_context *)
+tdb_transaction_prepare_commit: int (struct tdb_context *)
+tdb_transaction_start: int (struct tdb_context *)
+tdb_transaction_start_nonblock: int (struct tdb_context *)
+tdb_transaction_write_lock_mark: int (struct tdb_context *)
+tdb_transaction_write_lock_unmark: int (struct tdb_context *)
+tdb_traverse: int (struct tdb_context *, tdb_traverse_func, void *)
+tdb_traverse_chain: int (struct tdb_context *, unsigned int, tdb_traverse_func, void *)
+tdb_traverse_key_chain: int (struct tdb_context *, TDB_DATA, tdb_traverse_func, void *)
+tdb_traverse_read: int (struct tdb_context *, tdb_traverse_func, void *)
+tdb_unlock: int (struct tdb_context *, int, int)
+tdb_unlockall: int (struct tdb_context *)
+tdb_unlockall_read: int (struct tdb_context *)
+tdb_validate_freelist: int (struct tdb_context *, int *)
+tdb_wipe_all: int (struct tdb_context *)
diff -pruN 2:2.2.3-2/lib/tdb/common/lock.c 2:2.4.2-0ubuntu1/lib/tdb/common/lock.c
--- 2:2.2.3-2/lib/tdb/common/lock.c	2021-11-02 22:53:09.475799300 +0000
+++ 2:2.4.2-0ubuntu1/lib/tdb/common/lock.c	2022-01-24 12:18:16.330473700 +0000
@@ -506,6 +506,7 @@ int tdb_lock(struct tdb_context *tdb, in
 }
 
 /* lock a list in the database. list -1 is the alloc list. non-blocking lock */
+_PUBLIC_ int tdb_lock_nonblock(struct tdb_context *tdb, int list, int ltype);
 _PUBLIC_ int tdb_lock_nonblock(struct tdb_context *tdb, int list, int ltype)
 {
 	return tdb_lock_list(tdb, list, ltype, TDB_LOCK_NOWAIT);
@@ -567,6 +568,7 @@ int tdb_nest_unlock(struct tdb_context *
 	return ret;
 }
 
+_PUBLIC_ int tdb_unlock(struct tdb_context *tdb, int list, int ltype);
 _PUBLIC_ int tdb_unlock(struct tdb_context *tdb, int list, int ltype)
 {
 	/* a global lock allows us to avoid per chain locks */
@@ -1017,14 +1019,14 @@ void tdb_release_transaction_locks(struc
 /* Following functions are added specifically to support CTDB. */
 
 /* Don't do actual fcntl locking, just mark tdb locked */
-int tdb_transaction_write_lock_mark(struct tdb_context *tdb);
+_PUBLIC_ int tdb_transaction_write_lock_mark(struct tdb_context *tdb);
 _PUBLIC_ int tdb_transaction_write_lock_mark(struct tdb_context *tdb)
 {
 	return tdb_transaction_lock(tdb, F_WRLCK, TDB_LOCK_MARK_ONLY);
 }
 
 /* Don't do actual fcntl unlocking, just mark tdb unlocked */
-int tdb_transaction_write_lock_unmark(struct tdb_context *tdb);
+_PUBLIC_ int tdb_transaction_write_lock_unmark(struct tdb_context *tdb);
 _PUBLIC_ int tdb_transaction_write_lock_unmark(struct tdb_context *tdb)
 {
 	return tdb_nest_unlock(tdb, TRANSACTION_LOCK, F_WRLCK, true);
diff -pruN 2:2.2.3-2/lib/tdb/common/transaction.c 2:2.4.2-0ubuntu1/lib/tdb/common/transaction.c
--- 2:2.2.3-2/lib/tdb/common/transaction.c	2021-10-28 15:29:47.588471700 +0000
+++ 2:2.4.2-0ubuntu1/lib/tdb/common/transaction.c	2022-01-24 12:18:16.330473700 +0000
@@ -1301,6 +1301,7 @@ int tdb_transaction_recover(struct tdb_c
 				   rec.data_len, 0) == -1) {
 		TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_transaction_recover: failed to read recovery data\n"));
 		tdb->ecode = TDB_ERR_IO;
+		free(data);
 		return -1;
 	}
 
diff -pruN 2:2.2.3-2/lib/tdb/include/tdb.h 2:2.4.2-0ubuntu1/lib/tdb/include/tdb.h
--- 2:2.2.3-2/lib/tdb/include/tdb.h	2021-11-02 22:53:09.475799300 +0000
+++ 2:2.4.2-0ubuntu1/lib/tdb/include/tdb.h	2022-01-24 12:47:34.956465700 +0000
@@ -159,7 +159,7 @@ struct tdb_logging_context {
  *
  * @return              A tdb context structure, NULL on error.
  */
-struct tdb_context *tdb_open(const char *name, int hash_size, int tdb_flags,
+_PUBLIC_ struct tdb_context *tdb_open(const char *name, int hash_size, int tdb_flags,
 		      int open_flags, mode_t mode);
 
 /**
@@ -206,7 +206,7 @@ struct tdb_context *tdb_open(const char
  *
  * @see tdb_open()
  */
-struct tdb_context *tdb_open_ex(const char *name, int hash_size, int tdb_flags,
+_PUBLIC_ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int tdb_flags,
 			 int open_flags, mode_t mode,
 			 const struct tdb_logging_context *log_ctx,
 			 tdb_hash_func hash_fn);
@@ -218,7 +218,7 @@ struct tdb_context *tdb_open_ex(const ch
  *
  * @param[in]  max_dead The maximum number of dead records per hash chain.
  */
-void tdb_set_max_dead(struct tdb_context *tdb, int max_dead);
+_PUBLIC_ void tdb_set_max_dead(struct tdb_context *tdb, int max_dead);
 
 /**
  * @brief Reopen a tdb.
@@ -233,7 +233,7 @@ void tdb_set_max_dead(struct tdb_context
  * @note Don't call tdb_error() after this function cause the tdb context will
  *       be freed on error.
  */
-int tdb_reopen(struct tdb_context *tdb);
+_PUBLIC_ int tdb_reopen(struct tdb_context *tdb);
 
 /**
  * @brief Reopen all tdb's
@@ -248,7 +248,7 @@ int tdb_reopen(struct tdb_context *tdb);
  *
  * @return              0 on success, -1 on error.
  */
-int tdb_reopen_all(int parent_longlived);
+_PUBLIC_ int tdb_reopen_all(int parent_longlived);
 
 /**
  * @brief Set a different tdb logging function.
@@ -257,7 +257,7 @@ int tdb_reopen_all(int parent_longlived)
  *
  * @param[in]  log_ctx  The logging function to set.
  */
-void tdb_set_logging_function(struct tdb_context *tdb, const struct tdb_logging_context *log_ctx);
+_PUBLIC_ void tdb_set_logging_function(struct tdb_context *tdb, const struct tdb_logging_context *log_ctx);
 
 /**
  * @brief Get the tdb last error code.
@@ -268,7 +268,7 @@ void tdb_set_logging_function(struct tdb
  *
  * @see TDB_ERROR
  */
-enum TDB_ERROR tdb_error(struct tdb_context *tdb);
+_PUBLIC_ enum TDB_ERROR tdb_error(struct tdb_context *tdb);
 
 /**
  * @brief Get a error string for the last tdb error
@@ -277,7 +277,7 @@ enum TDB_ERROR tdb_error(struct tdb_cont
  *
  * @return              An error string.
  */
-const char *tdb_errorstr(struct tdb_context *tdb);
+_PUBLIC_ const char *tdb_errorstr(struct tdb_context *tdb);
 
 /**
  * @brief Fetch an entry in the database given a key.
@@ -294,7 +294,7 @@ const char *tdb_errorstr(struct tdb_cont
  * @see tdb_error()
  * @see tdb_errorstr()
  */
-TDB_DATA tdb_fetch(struct tdb_context *tdb, TDB_DATA key);
+_PUBLIC_ TDB_DATA tdb_fetch(struct tdb_context *tdb, TDB_DATA key);
 
 /**
  * @brief Hand a record to a parser function without allocating it.
@@ -319,7 +319,7 @@ TDB_DATA tdb_fetch(struct tdb_context *t
  * @return              -1 if the record was not found. If the record was found,
  *                      the return value of "parser" is passed up to the caller.
  */
-int tdb_parse_record(struct tdb_context *tdb, TDB_DATA key,
+_PUBLIC_ int tdb_parse_record(struct tdb_context *tdb, TDB_DATA key,
 			      int (*parser)(TDB_DATA key, TDB_DATA data,
 					    void *private_data),
 			      void *private_data);
@@ -333,7 +333,7 @@ int tdb_parse_record(struct tdb_context
  *
  * @return              0 on success, -1 if the key doesn't exist.
  */
-int tdb_delete(struct tdb_context *tdb, TDB_DATA key);
+_PUBLIC_ int tdb_delete(struct tdb_context *tdb, TDB_DATA key);
 
 /**
  * @brief Store an element in the database.
@@ -355,7 +355,7 @@ int tdb_delete(struct tdb_context *tdb,
  * @see tdb_error()
  * @see tdb_errorstr()
  */
-int tdb_store(struct tdb_context *tdb, TDB_DATA key, TDB_DATA dbuf, int flag);
+_PUBLIC_ int tdb_store(struct tdb_context *tdb, TDB_DATA key, TDB_DATA dbuf, int flag);
 
 
 /**
@@ -380,7 +380,7 @@ int tdb_store(struct tdb_context *tdb, T
  * @see tdb_error()
  * @see tdb_errorstr()
  */
-int tdb_storev(struct tdb_context *tdb, TDB_DATA key,
+_PUBLIC_ int tdb_storev(struct tdb_context *tdb, TDB_DATA key,
 	       const TDB_DATA *dbufs, int num_dbufs, int flag);
 
 /**
@@ -399,7 +399,7 @@ int tdb_storev(struct tdb_context *tdb,
  * @see tdb_error()
  * @see tdb_errorstr()
  */
-int tdb_append(struct tdb_context *tdb, TDB_DATA key, TDB_DATA new_dbuf);
+_PUBLIC_ int tdb_append(struct tdb_context *tdb, TDB_DATA key, TDB_DATA new_dbuf);
 
 /**
  * @brief Close a database.
@@ -411,7 +411,7 @@ int tdb_append(struct tdb_context *tdb,
  * @note Don't call tdb_error() after this function cause the tdb context will
  *       be freed on error.
  */
-int tdb_close(struct tdb_context *tdb);
+_PUBLIC_ int tdb_close(struct tdb_context *tdb);
 
 /**
  * @brief Find the first entry in the database and return its key.
@@ -423,7 +423,7 @@ int tdb_close(struct tdb_context *tdb);
  * @return              The first entry of the database, an empty TDB_DATA entry
  *                      if the database is empty.
  */
-TDB_DATA tdb_firstkey(struct tdb_context *tdb);
+_PUBLIC_ TDB_DATA tdb_firstkey(struct tdb_context *tdb);
 
 /**
  * @brief Find the next entry in the database, returning its key.
@@ -437,7 +437,7 @@ TDB_DATA tdb_firstkey(struct tdb_context
  * @return              The next entry of the current key, an empty TDB_DATA
  *                      entry if there is no entry.
  */
-TDB_DATA tdb_nextkey(struct tdb_context *tdb, TDB_DATA key);
+_PUBLIC_ TDB_DATA tdb_nextkey(struct tdb_context *tdb, TDB_DATA key);
 
 /**
  * @brief Traverse the entire database.
@@ -459,7 +459,7 @@ TDB_DATA tdb_nextkey(struct tdb_context
  *
  * @return              The record count traversed, -1 on error.
  */
-int tdb_traverse(struct tdb_context *tdb, tdb_traverse_func fn, void *private_data);
+_PUBLIC_ int tdb_traverse(struct tdb_context *tdb, tdb_traverse_func fn, void *private_data);
 
 /**
  * @brief Traverse the entire database.
@@ -478,7 +478,7 @@ int tdb_traverse(struct tdb_context *tdb
  *
  * @return              The record count traversed, -1 on error.
  */
-int tdb_traverse_read(struct tdb_context *tdb, tdb_traverse_func fn, void *private_data);
+_PUBLIC_ int tdb_traverse_read(struct tdb_context *tdb, tdb_traverse_func fn, void *private_data);
 
 /**
  * @brief Traverse a single hash chain
@@ -511,7 +511,7 @@ int tdb_traverse_read(struct tdb_context
  * @return              The record count traversed, -1 on error.
  */
 
-int tdb_traverse_chain(struct tdb_context *tdb,
+_PUBLIC_ int tdb_traverse_chain(struct tdb_context *tdb,
 		       unsigned chain,
 		       tdb_traverse_func fn,
 		       void *private_data);
@@ -543,7 +543,7 @@ int tdb_traverse_chain(struct tdb_contex
  * @return              The record count traversed, -1 on error.
  */
 
-int tdb_traverse_key_chain(struct tdb_context *tdb,
+_PUBLIC_ int tdb_traverse_key_chain(struct tdb_context *tdb,
 			   TDB_DATA key,
 			   tdb_traverse_func fn,
 			   void *private_data);
@@ -560,7 +560,7 @@ int tdb_traverse_key_chain(struct tdb_co
  *
  * @return              1 if the key is found, 0 if not.
  */
-int tdb_exists(struct tdb_context *tdb, TDB_DATA key);
+_PUBLIC_ int tdb_exists(struct tdb_context *tdb, TDB_DATA key);
 
 /**
  * @brief Lock entire database with a write lock.
@@ -572,7 +572,7 @@ int tdb_exists(struct tdb_context *tdb,
  * @see tdb_error()
  * @see tdb_errorstr()
  */
-int tdb_lockall(struct tdb_context *tdb);
+_PUBLIC_ int tdb_lockall(struct tdb_context *tdb);
 
 /**
  * @brief Lock entire database with a write lock.
@@ -587,7 +587,7 @@ int tdb_lockall(struct tdb_context *tdb)
  * @see tdb_error()
  * @see tdb_errorstr()
  */
-int tdb_lockall_nonblock(struct tdb_context *tdb);
+_PUBLIC_ int tdb_lockall_nonblock(struct tdb_context *tdb);
 
 /**
  * @brief Unlock entire database with write lock.
@@ -600,7 +600,7 @@ int tdb_lockall_nonblock(struct tdb_cont
  * @see tdb_error()
  * @see tdb_errorstr()
  */
-int tdb_unlockall(struct tdb_context *tdb);
+_PUBLIC_ int tdb_unlockall(struct tdb_context *tdb);
 
 /**
  * @brief Lock entire database with a read lock.
@@ -612,7 +612,7 @@ int tdb_unlockall(struct tdb_context *td
  * @see tdb_error()
  * @see tdb_errorstr()
  */
-int tdb_lockall_read(struct tdb_context *tdb);
+_PUBLIC_ int tdb_lockall_read(struct tdb_context *tdb);
 
 /**
  * @brief Lock entire database with a read lock.
@@ -627,7 +627,7 @@ int tdb_lockall_read(struct tdb_context
  * @see tdb_error()
  * @see tdb_errorstr()
  */
-int tdb_lockall_read_nonblock(struct tdb_context *tdb);
+_PUBLIC_ int tdb_lockall_read_nonblock(struct tdb_context *tdb);
 
 /**
  * @brief Unlock entire database with read lock.
@@ -640,7 +640,7 @@ int tdb_lockall_read_nonblock(struct tdb
  * @see tdb_error()
  * @see tdb_errorstr()
  */
-int tdb_unlockall_read(struct tdb_context *tdb);
+_PUBLIC_ int tdb_unlockall_read(struct tdb_context *tdb);
 
 /**
  * @brief Lock entire database with write lock - mark only.
@@ -654,7 +654,7 @@ int tdb_unlockall_read(struct tdb_contex
  * @see tdb_error()
  * @see tdb_errorstr()
  */
-int tdb_lockall_mark(struct tdb_context *tdb);
+_PUBLIC_ int tdb_lockall_mark(struct tdb_context *tdb);
 
 /**
  * @brief Lock entire database with write lock - unmark only.
@@ -668,7 +668,7 @@ int tdb_lockall_mark(struct tdb_context
  * @see tdb_error()
  * @see tdb_errorstr()
  */
-int tdb_lockall_unmark(struct tdb_context *tdb);
+_PUBLIC_ int tdb_lockall_unmark(struct tdb_context *tdb);
 
 /**
  * @brief Get the name of the current tdb file.
@@ -679,7 +679,7 @@ int tdb_lockall_unmark(struct tdb_contex
  *
  * @return              The name of the database.
  */
-const char *tdb_name(struct tdb_context *tdb);
+_PUBLIC_ const char *tdb_name(struct tdb_context *tdb);
 
 /**
  * @brief Get the underlying file descriptor being used by tdb.
@@ -691,7 +691,7 @@ const char *tdb_name(struct tdb_context
  *
  * @return              The file descriptor or -1.
  */
-int tdb_fd(struct tdb_context *tdb);
+_PUBLIC_ int tdb_fd(struct tdb_context *tdb);
 
 /**
  * @brief Get the current logging function.
@@ -704,7 +704,7 @@ int tdb_fd(struct tdb_context *tdb);
  *
  * @see tdb_get_logging_private()
  */
-tdb_log_func tdb_log_fn(struct tdb_context *tdb);
+_PUBLIC_ tdb_log_func tdb_log_fn(struct tdb_context *tdb);
 
 /**
  * @brief Get the private data of the logging function.
@@ -715,7 +715,7 @@ tdb_log_func tdb_log_fn(struct tdb_conte
  *
  * @see tdb_log_fn()
  */
-void *tdb_get_logging_private(struct tdb_context *tdb);
+_PUBLIC_ void *tdb_get_logging_private(struct tdb_context *tdb);
 
 /**
  * @brief Is a transaction active?
@@ -733,7 +733,7 @@ void *tdb_get_logging_private(struct tdb
  * @see tdb_transaction_commit()
  * @see tdb_transaction_cancel()
  */
-bool tdb_transaction_active(struct tdb_context *tdb);
+_PUBLIC_ bool tdb_transaction_active(struct tdb_context *tdb);
 
 /**
  * @brief Start a transaction.
@@ -766,7 +766,7 @@ bool tdb_transaction_active(struct tdb_c
  * @see tdb_error()
  * @see tdb_errorstr()
  */
-int tdb_transaction_start(struct tdb_context *tdb);
+_PUBLIC_ int tdb_transaction_start(struct tdb_context *tdb);
 
 /**
  * @brief Start a transaction, non-blocking.
@@ -779,7 +779,7 @@ int tdb_transaction_start(struct tdb_con
  * @see tdb_errorstr()
  * @see tdb_transaction_start()
  */
-int tdb_transaction_start_nonblock(struct tdb_context *tdb);
+_PUBLIC_ int tdb_transaction_start_nonblock(struct tdb_context *tdb);
 
 /**
  * @brief Prepare to commit a current transaction, for two-phase commits.
@@ -796,7 +796,7 @@ int tdb_transaction_start_nonblock(struc
  * @see tdb_error()
  * @see tdb_errorstr()
  */
-int tdb_transaction_prepare_commit(struct tdb_context *tdb);
+_PUBLIC_ int tdb_transaction_prepare_commit(struct tdb_context *tdb);
 
 /**
  * @brief Commit a current transaction.
@@ -810,7 +810,7 @@ int tdb_transaction_prepare_commit(struc
  * @see tdb_error()
  * @see tdb_errorstr()
  */
-int tdb_transaction_commit(struct tdb_context *tdb);
+_PUBLIC_ int tdb_transaction_commit(struct tdb_context *tdb);
 
 /**
  * @brief Cancel a current transaction.
@@ -825,7 +825,7 @@ int tdb_transaction_commit(struct tdb_co
  * @see tdb_error()
  * @see tdb_errorstr()
  */
-int tdb_transaction_cancel(struct tdb_context *tdb);
+_PUBLIC_ int tdb_transaction_cancel(struct tdb_context *tdb);
 
 /**
  * @brief Get the tdb sequence number.
@@ -845,7 +845,7 @@ int tdb_transaction_cancel(struct tdb_co
  * @see tdb_open()
  * @see tdb_enable_seqnum()
  */
-int tdb_get_seqnum(struct tdb_context *tdb);
+_PUBLIC_ int tdb_get_seqnum(struct tdb_context *tdb);
 
 /**
  * @brief Get the hash size.
@@ -854,7 +854,7 @@ int tdb_get_seqnum(struct tdb_context *t
  *
  * @return              The hash size.
  */
-int tdb_hash_size(struct tdb_context *tdb);
+_PUBLIC_ int tdb_hash_size(struct tdb_context *tdb);
 
 /**
  * @brief Get the map size.
@@ -863,7 +863,7 @@ int tdb_hash_size(struct tdb_context *td
  *
  * @return             The map size.
  */
-size_t tdb_map_size(struct tdb_context *tdb);
+_PUBLIC_ size_t tdb_map_size(struct tdb_context *tdb);
 
 /**
  * @brief Get the tdb flags set during open.
@@ -872,7 +872,7 @@ size_t tdb_map_size(struct tdb_context *
  *
  * @return              The flags set to on the database.
  */
-int tdb_get_flags(struct tdb_context *tdb);
+_PUBLIC_ int tdb_get_flags(struct tdb_context *tdb);
 
 /**
  * @brief Add flags to the database.
@@ -881,7 +881,7 @@ int tdb_get_flags(struct tdb_context *td
  *
  * @param[in]  flag     The tdb flags to add.
  */
-void tdb_add_flags(struct tdb_context *tdb, unsigned flag);
+_PUBLIC_ void tdb_add_flags(struct tdb_context *tdb, unsigned flag);
 
 /**
  * @brief Remove flags from the database.
@@ -890,7 +890,7 @@ void tdb_add_flags(struct tdb_context *t
  *
  * @param[in]  flag     The tdb flags to remove.
  */
-void tdb_remove_flags(struct tdb_context *tdb, unsigned flag);
+_PUBLIC_ void tdb_remove_flags(struct tdb_context *tdb, unsigned flag);
 
 /**
  * @brief Enable sequence number handling on an open tdb.
@@ -899,7 +899,7 @@ void tdb_remove_flags(struct tdb_context
  *
  * @see tdb_get_seqnum()
  */
-void tdb_enable_seqnum(struct tdb_context *tdb);
+_PUBLIC_ void tdb_enable_seqnum(struct tdb_context *tdb);
 
 /**
  * @brief Increment the tdb sequence number.
@@ -912,7 +912,7 @@ void tdb_enable_seqnum(struct tdb_contex
  * @see tdb_enable_seqnum()
  * @see tdb_get_seqnum()
  */
-void tdb_increment_seqnum_nonblock(struct tdb_context *tdb);
+_PUBLIC_ void tdb_increment_seqnum_nonblock(struct tdb_context *tdb);
 
 /**
  * @brief Create a hash of the key.
@@ -921,7 +921,7 @@ void tdb_increment_seqnum_nonblock(struc
  *
  * @return              The hash.
  */
-unsigned int tdb_jenkins_hash(TDB_DATA *key);
+_PUBLIC_ unsigned int tdb_jenkins_hash(TDB_DATA *key);
 
 /**
  * @brief Check the consistency of the database.
@@ -944,7 +944,7 @@ unsigned int tdb_jenkins_hash(TDB_DATA *
  * @see tdb_error()
  * @see tdb_errorstr()
  */
-int tdb_check(struct tdb_context *tdb,
+_PUBLIC_ int tdb_check(struct tdb_context *tdb,
 	      int (*check) (TDB_DATA key, TDB_DATA data, void *private_data),
 	      void *private_data);
 
@@ -966,7 +966,7 @@ int tdb_check(struct tdb_context *tdb,
  * @see tdb_error()
  * @see tdb_errorstr()
  */
-int tdb_rescue(struct tdb_context *tdb,
+_PUBLIC_ int tdb_rescue(struct tdb_context *tdb,
 	       void (*walk) (TDB_DATA key, TDB_DATA data, void *private_data),
 	       void *private_data);
 
@@ -989,34 +989,34 @@ int tdb_rescue(struct tdb_context *tdb,
  *
  * @see TDB_MUTEX_LOCKING
  */
-bool tdb_runtime_check_for_robust_mutexes(void);
+_PUBLIC_ bool tdb_runtime_check_for_robust_mutexes(void);
 
 /* @} ******************************************************************/
 
 /* Low level locking functions: use with care */
-int tdb_chainlock(struct tdb_context *tdb, TDB_DATA key);
-int tdb_chainlock_nonblock(struct tdb_context *tdb, TDB_DATA key);
-int tdb_chainunlock(struct tdb_context *tdb, TDB_DATA key);
-int tdb_chainlock_read(struct tdb_context *tdb, TDB_DATA key);
-int tdb_chainlock_read_nonblock(struct tdb_context *tdb, TDB_DATA key);
-int tdb_chainunlock_read(struct tdb_context *tdb, TDB_DATA key);
-int tdb_chainlock_mark(struct tdb_context *tdb, TDB_DATA key);
-int tdb_chainlock_unmark(struct tdb_context *tdb, TDB_DATA key);
+_PUBLIC_ int tdb_chainlock(struct tdb_context *tdb, TDB_DATA key);
+_PUBLIC_ int tdb_chainlock_nonblock(struct tdb_context *tdb, TDB_DATA key);
+_PUBLIC_ int tdb_chainunlock(struct tdb_context *tdb, TDB_DATA key);
+_PUBLIC_ int tdb_chainlock_read(struct tdb_context *tdb, TDB_DATA key);
+_PUBLIC_ int tdb_chainlock_read_nonblock(struct tdb_context *tdb, TDB_DATA key);
+_PUBLIC_ int tdb_chainunlock_read(struct tdb_context *tdb, TDB_DATA key);
+_PUBLIC_ int tdb_chainlock_mark(struct tdb_context *tdb, TDB_DATA key);
+_PUBLIC_ int tdb_chainlock_unmark(struct tdb_context *tdb, TDB_DATA key);
 
-void tdb_setalarm_sigptr(struct tdb_context *tdb, volatile sig_atomic_t *sigptr);
+_PUBLIC_ void tdb_setalarm_sigptr(struct tdb_context *tdb, volatile sig_atomic_t *sigptr);
 
 /* wipe and repack */
-int tdb_wipe_all(struct tdb_context *tdb);
-int tdb_repack(struct tdb_context *tdb);
+_PUBLIC_ int tdb_wipe_all(struct tdb_context *tdb);
+_PUBLIC_ int tdb_repack(struct tdb_context *tdb);
 
 /* Debug functions. Not used in production. */
-void tdb_dump_all(struct tdb_context *tdb);
-int tdb_printfreelist(struct tdb_context *tdb);
-int tdb_validate_freelist(struct tdb_context *tdb, int *pnum_entries);
-int tdb_freelist_size(struct tdb_context *tdb);
-char *tdb_summary(struct tdb_context *tdb);
+_PUBLIC_ void tdb_dump_all(struct tdb_context *tdb);
+_PUBLIC_ int tdb_printfreelist(struct tdb_context *tdb);
+_PUBLIC_ int tdb_validate_freelist(struct tdb_context *tdb, int *pnum_entries);
+_PUBLIC_ int tdb_freelist_size(struct tdb_context *tdb);
+_PUBLIC_ char *tdb_summary(struct tdb_context *tdb);
 
-extern TDB_DATA tdb_null;
+_PUBLIC_ extern TDB_DATA tdb_null;
 
 #ifdef  __cplusplus
 }
diff -pruN 2:2.2.3-2/lib/tdb/python/tdbdump.py 2:2.4.2-0ubuntu1/lib/tdb/python/tdbdump.py
--- 2:2.2.3-2/lib/tdb/python/tdbdump.py	2021-10-28 15:29:47.588471700 +0000
+++ 2:2.4.2-0ubuntu1/lib/tdb/python/tdbdump.py	2022-01-24 12:18:16.330473700 +0000
@@ -1,7 +1,6 @@
 #!/usr/bin/env python3
 # Trivial reimplementation of tdbdump in Python
 
-from __future__ import print_function
 import tdb, sys
 
 if len(sys.argv) < 2:
diff -pruN 2:2.2.3-2/lib/tdb/tools/tdbrestore.c 2:2.4.2-0ubuntu1/lib/tdb/tools/tdbrestore.c
--- 2:2.2.3-2/lib/tdb/tools/tdbrestore.c	2021-11-02 22:53:09.475799300 +0000
+++ 2:2.4.2-0ubuntu1/lib/tdb/tools/tdbrestore.c	2022-01-24 12:18:16.330473700 +0000
@@ -27,7 +27,8 @@
 
 static int read_linehead(FILE *f)
 {
-	int i, c;
+	size_t i;
+	int c;
 	int num_bytes;
 	char prefix[128];
 
@@ -61,30 +62,8 @@ static int read_linehead(FILE *f)
 	return num_bytes;
 }
 
-static int read_hex(void) {
-	int c;
-	c = getchar();
-	if (c == EOF) {
-		fprintf(stderr, "Unexpected EOF in data\n");
-		return -1;
-	} else if (c == '"') {
-		fprintf(stderr, "Unexpected \\\" sequence\n");
-		return -1;
-	} else if ('0' <= c && c <= '9')  {
-		return c - '0';
-	} else if ('A' <= c && c <= 'F')  {
-		return c - 'A' + 10;
-	} else if ('a' <= c && c <= 'f')  {
-		return c - 'a' + 10;
-	} else {
-		fprintf(stderr, "Invalid hex: %c\n", c);
-		return -1;
-	}
-}
-
 static int read_data(FILE *f, TDB_DATA *d, size_t size) {
-	int c, low, high;
-	int i;
+	size_t i;
 
 	d->dptr = (unsigned char *)malloc(size);
 	if (d->dptr == NULL) {
@@ -93,25 +72,26 @@ static int read_data(FILE *f, TDB_DATA *
 	d->dsize = size;
 
 	for (i=0; i<size; i++) {
-		c = getc(f);
+		int c = getc(f);
 		if (c == EOF) {
 			fprintf(stderr, "Unexpected EOF in data\n");
 			return 1;
 		} else if (c == '"') {
 			return 0;
 		} else if (c == '\\') {
-			high = read_hex();
-			if (high < 0) {
+			char in[3] = {0};
+			size_t n;
+			bool ok;
+
+			n = fread(in, 1, 2, stdin);
+			if (n != 2) {
 				return -1;
 			}
-			high = high << 4;
-			assert(high == (high & 0xf0));
-			low = read_hex();
-			if (low < 0) {
+			ok = hex_byte(in, &d->dptr[i]);
+			if (!ok) {
+				fprintf(stderr, "Invalid hex: .2%s\n", in);
 				return -1;
 			}
-			assert(low == (low & 0x0f));
-			d->dptr[i] = (low|high);
 		} else {
 			d->dptr[i] = c;
 		}
diff -pruN 2:2.2.3-2/lib/tdb/tools/tdbtool.c 2:2.4.2-0ubuntu1/lib/tdb/tools/tdbtool.c
--- 2:2.2.3-2/lib/tdb/tools/tdbtool.c	2021-11-02 22:53:09.475799300 +0000
+++ 2:2.4.2-0ubuntu1/lib/tdb/tools/tdbtool.c	2022-01-24 12:18:16.330473700 +0000
@@ -349,23 +349,6 @@ static void store_tdb(char *keyname, siz
 	}
 }
 
-static bool hexchar(char c, uint8_t *v)
-{
-	if ((c >= '0') && (c <= '9')) {
-		*v = (c - '0');
-		return true;
-	}
-	if ((c >= 'A') && (c <= 'F')) {
-		*v = (c - 'A' + 10);
-		return true;
-	}
-	if ((c >= 'a') && (c <= 'f')) {
-		*v = (c - 'a' + 10);
-		return true;
-	}
-	return false;
-}
-
 static bool parse_hex(const char *src, size_t srclen, uint8_t *dst)
 {
 	size_t i=0;
@@ -375,14 +358,11 @@ static bool parse_hex(const char *src, s
 	}
 
 	while (i<srclen) {
-		bool ok;
-		uint8_t hi,lo;
-
-		ok = (hexchar(src[i++], &hi) && hexchar(src[i++], &lo));
+		bool ok = hex_byte(src, dst);
 		if (!ok) {
 			return false;
 		}
-		*dst = (hi<<4)|lo;
+		src += 2;
 		dst += 1;
 	}
 
diff -pruN 2:2.2.3-2/lib/tdb/wscript 2:2.4.2-0ubuntu1/lib/tdb/wscript
--- 2:2.2.3-2/lib/tdb/wscript	2021-10-28 15:29:47.588471700 +0000
+++ 2:2.4.2-0ubuntu1/lib/tdb/wscript	2022-01-24 12:47:34.956465700 +0000
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 
 APPNAME = 'tdb'
-VERSION = '1.4.3'
+VERSION = '1.4.4'
 
 import sys, os
 
diff -pruN 2:2.2.3-2/lib/tevent/ABI/tevent-0.11.0.sigs 2:2.4.2-0ubuntu1/lib/tevent/ABI/tevent-0.11.0.sigs
--- 2:2.2.3-2/lib/tevent/ABI/tevent-0.11.0.sigs	1970-01-01 00:00:00.000000000 +0000
+++ 2:2.4.2-0ubuntu1/lib/tevent/ABI/tevent-0.11.0.sigs	2022-01-24 12:18:16.330473700 +0000
@@ -0,0 +1,146 @@
+_tevent_add_fd: struct tevent_fd *(struct tevent_context *, TALLOC_CTX *, int, uint16_t, tevent_fd_handler_t, void *, const char *, const char *)
+_tevent_add_signal: struct tevent_signal *(struct tevent_context *, TALLOC_CTX *, int, int, tevent_signal_handler_t, void *, const char *, const char *)
+_tevent_add_timer: struct tevent_timer *(struct tevent_context *, TALLOC_CTX *, struct timeval, tevent_timer_handler_t, void *, const char *, const char *)
+_tevent_context_pop_use: void (struct tevent_context *, const char *)
+_tevent_context_push_use: bool (struct tevent_context *, const char *)
+_tevent_context_wrapper_create: struct tevent_context *(struct tevent_context *, TALLOC_CTX *, const struct tevent_wrapper_ops *, void *, size_t, const char *, const char *)
+_tevent_create_immediate: struct tevent_immediate *(TALLOC_CTX *, const char *)
+_tevent_loop_once: int (struct tevent_context *, const char *)
+_tevent_loop_until: int (struct tevent_context *, bool (*)(void *), void *, const char *)
+_tevent_loop_wait: int (struct tevent_context *, const char *)
+_tevent_queue_create: struct tevent_queue *(TALLOC_CTX *, const char *, const char *)
+_tevent_req_callback_data: void *(struct tevent_req *)
+_tevent_req_cancel: bool (struct tevent_req *, const char *)
+_tevent_req_create: struct tevent_req *(TALLOC_CTX *, void *, size_t, const char *, const char *)
+_tevent_req_data: void *(struct tevent_req *)
+_tevent_req_done: void (struct tevent_req *, const char *)
+_tevent_req_error: bool (struct tevent_req *, uint64_t, const char *)
+_tevent_req_nomem: bool (const void *, struct tevent_req *, const char *)
+_tevent_req_notify_callback: void (struct tevent_req *, const char *)
+_tevent_req_oom: void (struct tevent_req *, const char *)
+_tevent_schedule_immediate: void (struct tevent_immediate *, struct tevent_context *, tevent_immediate_handler_t, void *, const char *, const char *)
+_tevent_threaded_schedule_immediate: void (struct tevent_threaded_context *, struct tevent_immediate *, tevent_immediate_handler_t, void *, const char *, const char *)
+tevent_abort: void (struct tevent_context *, const char *)
+tevent_backend_list: const char **(TALLOC_CTX *)
+tevent_cleanup_pending_signal_handlers: void (struct tevent_signal *)
+tevent_common_add_fd: struct tevent_fd *(struct tevent_context *, TALLOC_CTX *, int, uint16_t, tevent_fd_handler_t, void *, const char *, const char *)
+tevent_common_add_signal: struct tevent_signal *(struct tevent_context *, TALLOC_CTX *, int, int, tevent_signal_handler_t, void *, const char *, const char *)
+tevent_common_add_timer: struct tevent_timer *(struct tevent_context *, TALLOC_CTX *, struct timeval, tevent_timer_handler_t, void *, const char *, const char *)
+tevent_common_add_timer_v2: struct tevent_timer *(struct tevent_context *, TALLOC_CTX *, struct timeval, tevent_timer_handler_t, void *, const char *, const char *)
+tevent_common_check_double_free: void (TALLOC_CTX *, const char *)
+tevent_common_check_signal: int (struct tevent_context *)
+tevent_common_context_destructor: int (struct tevent_context *)
+tevent_common_fd_destructor: int (struct tevent_fd *)
+tevent_common_fd_get_flags: uint16_t (struct tevent_fd *)
+tevent_common_fd_set_close_fn: void (struct tevent_fd *, tevent_fd_close_fn_t)
+tevent_common_fd_set_flags: void (struct tevent_fd *, uint16_t)
+tevent_common_have_events: bool (struct tevent_context *)
+tevent_common_invoke_fd_handler: int (struct tevent_fd *, uint16_t, bool *)
+tevent_common_invoke_immediate_handler: int (struct tevent_immediate *, bool *)
+tevent_common_invoke_signal_handler: int (struct tevent_signal *, int, int, void *, bool *)
+tevent_common_invoke_timer_handler: int (struct tevent_timer *, struct timeval, bool *)
+tevent_common_loop_immediate: bool (struct tevent_context *)
+tevent_common_loop_timer_delay: struct timeval (struct tevent_context *)
+tevent_common_loop_wait: int (struct tevent_context *, const char *)
+tevent_common_schedule_immediate: void (struct tevent_immediate *, struct tevent_context *, tevent_immediate_handler_t, void *, const char *, const char *)
+tevent_common_threaded_activate_immediate: void (struct tevent_context *)
+tevent_common_wakeup: int (struct tevent_context *)
+tevent_common_wakeup_fd: int (int)
+tevent_common_wakeup_init: int (struct tevent_context *)
+tevent_context_init: struct tevent_context *(TALLOC_CTX *)
+tevent_context_init_byname: struct tevent_context *(TALLOC_CTX *, const char *)
+tevent_context_init_ops: struct tevent_context *(TALLOC_CTX *, const struct tevent_ops *, void *)
+tevent_context_is_wrapper: bool (struct tevent_context *)
+tevent_context_same_loop: bool (struct tevent_context *, struct tevent_context *)
+tevent_debug: void (struct tevent_context *, enum tevent_debug_level, const char *, ...)
+tevent_fd_get_flags: uint16_t (struct tevent_fd *)
+tevent_fd_get_tag: uint64_t (const struct tevent_fd *)
+tevent_fd_set_auto_close: void (struct tevent_fd *)
+tevent_fd_set_close_fn: void (struct tevent_fd *, tevent_fd_close_fn_t)
+tevent_fd_set_flags: void (struct tevent_fd *, uint16_t)
+tevent_fd_set_tag: void (struct tevent_fd *, uint64_t)
+tevent_get_trace_callback: void (struct tevent_context *, tevent_trace_callback_t *, void *)
+tevent_get_trace_fd_callback: void (struct tevent_context *, tevent_trace_fd_callback_t *, void *)
+tevent_get_trace_immediate_callback: void (struct tevent_context *, tevent_trace_immediate_callback_t *, void *)
+tevent_get_trace_signal_callback: void (struct tevent_context *, tevent_trace_signal_callback_t *, void *)
+tevent_get_trace_timer_callback: void (struct tevent_context *, tevent_trace_timer_callback_t *, void *)
+tevent_immediate_get_tag: uint64_t (const struct tevent_immediate *)
+tevent_immediate_set_tag: void (struct tevent_immediate *, uint64_t)
+tevent_loop_allow_nesting: void (struct tevent_context *)
+tevent_loop_set_nesting_hook: void (struct tevent_context *, tevent_nesting_hook, void *)
+tevent_num_signals: size_t (void)
+tevent_queue_add: bool (struct tevent_queue *, struct tevent_context *, struct tevent_req *, tevent_queue_trigger_fn_t, void *)
+tevent_queue_add_entry: struct tevent_queue_entry *(struct tevent_queue *, struct tevent_context *, struct tevent_req *, tevent_queue_trigger_fn_t, void *)
+tevent_queue_add_optimize_empty: struct tevent_queue_entry *(struct tevent_queue *, struct tevent_context *, struct tevent_req *, tevent_queue_trigger_fn_t, void *)
+tevent_queue_entry_untrigger: void (struct tevent_queue_entry *)
+tevent_queue_length: size_t (struct tevent_queue *)
+tevent_queue_running: bool (struct tevent_queue *)
+tevent_queue_start: void (struct tevent_queue *)
+tevent_queue_stop: void (struct tevent_queue *)
+tevent_queue_wait_recv: bool (struct tevent_req *)
+tevent_queue_wait_send: struct tevent_req *(TALLOC_CTX *, struct tevent_context *, struct tevent_queue *)
+tevent_re_initialise: int (struct tevent_context *)
+tevent_register_backend: bool (const char *, const struct tevent_ops *)
+tevent_req_default_print: char *(struct tevent_req *, TALLOC_CTX *)
+tevent_req_defer_callback: void (struct tevent_req *, struct tevent_context *)
+tevent_req_get_profile: const struct tevent_req_profile *(struct tevent_req *)
+tevent_req_is_error: bool (struct tevent_req *, enum tevent_req_state *, uint64_t *)
+tevent_req_is_in_progress: bool (struct tevent_req *)
+tevent_req_move_profile: struct tevent_req_profile *(struct tevent_req *, TALLOC_CTX *)
+tevent_req_poll: bool (struct tevent_req *, struct tevent_context *)
+tevent_req_post: struct tevent_req *(struct tevent_req *, struct tevent_context *)
+tevent_req_print: char *(TALLOC_CTX *, struct tevent_req *)
+tevent_req_profile_append_sub: void (struct tevent_req_profile *, struct tevent_req_profile **)
+tevent_req_profile_create: struct tevent_req_profile *(TALLOC_CTX *)
+tevent_req_profile_get_name: void (const struct tevent_req_profile *, const char **)
+tevent_req_profile_get_start: void (const struct tevent_req_profile *, const char **, struct timeval *)
+tevent_req_profile_get_status: void (const struct tevent_req_profile *, pid_t *, enum tevent_req_state *, uint64_t *)
+tevent_req_profile_get_stop: void (const struct tevent_req_profile *, const char **, struct timeval *)
+tevent_req_profile_get_subprofiles: const struct tevent_req_profile *(const struct tevent_req_profile *)
+tevent_req_profile_next: const struct tevent_req_profile *(const struct tevent_req_profile *)
+tevent_req_profile_set_name: bool (struct tevent_req_profile *, const char *)
+tevent_req_profile_set_start: bool (struct tevent_req_profile *, const char *, struct timeval)
+tevent_req_profile_set_status: void (struct tevent_req_profile *, pid_t, enum tevent_req_state, uint64_t)
+tevent_req_profile_set_stop: bool (struct tevent_req_profile *, const char *, struct timeval)
+tevent_req_received: void (struct tevent_req *)
+tevent_req_reset_endtime: void (struct tevent_req *)
+tevent_req_set_callback: void (struct tevent_req *, tevent_req_fn, void *)
+tevent_req_set_cancel_fn: void (struct tevent_req *, tevent_req_cancel_fn)
+tevent_req_set_cleanup_fn: void (struct tevent_req *, tevent_req_cleanup_fn)
+tevent_req_set_endtime: bool (struct tevent_req *, struct tevent_context *, struct timeval)
+tevent_req_set_print_fn: void (struct tevent_req *, tevent_req_print_fn)
+tevent_req_set_profile: bool (struct tevent_req *)
+tevent_sa_info_queue_count: size_t (void)
+tevent_set_abort_fn: void (void (*)(const char *))
+tevent_set_debug: int (struct tevent_context *, void (*)(void *, enum tevent_debug_level, const char *, va_list), void *)
+tevent_set_debug_stderr: int (struct tevent_context *)
+tevent_set_default_backend: void (const char *)
+tevent_set_trace_callback: void (struct tevent_context *, tevent_trace_callback_t, void *)
+tevent_set_trace_fd_callback: void (struct tevent_context *, tevent_trace_fd_callback_t, void *)
+tevent_set_trace_immediate_callback: void (struct tevent_context *, tevent_trace_immediate_callback_t, void *)
+tevent_set_trace_signal_callback: void (struct tevent_context *, tevent_trace_signal_callback_t, void *)
+tevent_set_trace_timer_callback: void (struct tevent_context *, tevent_trace_timer_callback_t, void *)
+tevent_signal_get_tag: uint64_t (const struct tevent_signal *)
+tevent_signal_set_tag: void (struct tevent_signal *, uint64_t)
+tevent_signal_support: bool (struct tevent_context *)
+tevent_thread_proxy_create: struct tevent_thread_proxy *(struct tevent_context *)
+tevent_thread_proxy_schedule: void (struct tevent_thread_proxy *, struct tevent_immediate **, tevent_immediate_handler_t, void *)
+tevent_threaded_context_create: struct tevent_threaded_context *(TALLOC_CTX *, struct tevent_context *)
+tevent_timer_get_tag: uint64_t (const struct tevent_timer *)
+tevent_timer_set_tag: void (struct tevent_timer *, uint64_t)
+tevent_timeval_add: struct timeval (const struct timeval *, uint32_t, uint32_t)
+tevent_timeval_compare: int (const struct timeval *, const struct timeval *)
+tevent_timeval_current: struct timeval (void)
+tevent_timeval_current_ofs: struct timeval (uint32_t, uint32_t)
+tevent_timeval_is_zero: bool (const struct timeval *)
+tevent_timeval_set: struct timeval (uint32_t, uint32_t)
+tevent_timeval_until: struct timeval (const struct timeval *, const struct timeval *)
+tevent_timeval_zero: struct timeval (void)
+tevent_trace_fd_callback: void (struct tevent_context *, struct tevent_fd *, enum tevent_event_trace_point)
+tevent_trace_immediate_callback: void (struct tevent_context *, struct tevent_immediate *, enum tevent_event_trace_point)
+tevent_trace_point_callback: void (struct tevent_context *, enum tevent_trace_point)
+tevent_trace_signal_callback: void (struct tevent_context *, struct tevent_signal *, enum tevent_event_trace_point)
+tevent_trace_timer_callback: void (struct tevent_context *, struct tevent_timer *, enum tevent_event_trace_point)
+tevent_update_timer: void (struct tevent_timer *, struct timeval)
+tevent_wakeup_recv: bool (struct tevent_req *)
+tevent_wakeup_send: struct tevent_req *(TALLOC_CTX *, struct tevent_context *, struct timeval)
diff -pruN 2:2.2.3-2/lib/tevent/tests/test_tevent_tag.c 2:2.4.2-0ubuntu1/lib/tevent/tests/test_tevent_tag.c
--- 2:2.2.3-2/lib/tevent/tests/test_tevent_tag.c	1970-01-01 00:00:00.000000000 +0000
+++ 2:2.4.2-0ubuntu1/lib/tevent/tests/test_tevent_tag.c	2022-01-24 12:18:16.330473700 +0000
@@ -0,0 +1,212 @@
+/*
+ * Unix SMB/CIFS implementation.
+ *
+ * testing of some tevent_req aspects
+ *
+ * Copyright (C) Pavel Březina <pbrezina@redhat.com> 2021
+ *
+ *   ** NOTE! The following LGPL license applies to the tevent
+ *   ** 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
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <errno.h>
+#include <setjmp.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <signal.h>
+
+#include <talloc.h>
+#include <tevent.h>
+#include <cmocka.h>
+
+static void fd_handler(struct tevent_context *ev,
+		       struct tevent_fd *fde,
+		       uint16_t flags,
+		       void *private_data)
+{
+	/* Dummy handler. Just return. */
+	return;
+}
+
+static void timer_handler(struct tevent_context *ev,
+			  struct tevent_timer *te,
+			  struct timeval current_time,
+			  void *private_data)
+{
+	/* Dummy handler. Just return. */
+	return;
+}
+
+static void signal_handler(struct tevent_context *ev,
+			   struct tevent_signal *se,
+			   int signum,
+			   int count,
+			   void *siginfo,
+			   void *private_data)
+{
+	/* Dummy handler. Just return. */
+	return;
+}
+
+static void immediate_handler(struct tevent_context *ctx,
+			      struct tevent_immediate *im,
+			      void *private_data)
+{
+	/* Dummy handler. Just return. */
+	return;
+}
+
+static int test_setup(void **state)
+{
+	struct tevent_context *ev;
+
+	ev = tevent_context_init(NULL);
+	assert_non_null(ev);
+
+	*state = ev;
+	return 0;
+}
+
+static int test_teardown(void **state)
+{
+	struct tevent_context *ev = (struct tevent_context *)(*state);
+	talloc_free(ev);
+	return 0;
+}
+
+static void test_fd_tag(void **state)
+{
+	struct tevent_context *ev = (struct tevent_context *)(*state);
+	struct tevent_fd *fde;
+	uint64_t tag;
+
+	fde = tevent_add_fd(ev, ev, 0, TEVENT_FD_READ, fd_handler, NULL);
+	assert_non_null(fde);
+
+	tag = tevent_fd_get_tag(fde);
+	assert_int_equal(0, tag);
+
+	tevent_fd_set_tag(fde, 1);
+	tag = tevent_fd_get_tag(fde);
+	assert_int_equal(1, tag);
+
+	tevent_re_initialise(ev);
+
+	tag = tevent_fd_get_tag(fde);
+	assert_int_equal(1, tag);
+
+	TALLOC_FREE(fde);
+}
+
+static void test_timer_tag(void **state)
+{
+	struct tevent_context *ev = (struct tevent_context *)(*state);
+	struct tevent_timer *te;
+	struct timeval next;
+	uint64_t tag;
+
+	next = tevent_timeval_current();
+	te = tevent_add_timer(ev, ev, next, timer_handler, NULL);
+	assert_non_null(te);
+
+	tag = tevent_timer_get_tag(te);
+	assert_int_equal(0, tag);
+
+	tevent_timer_set_tag(te, 1);
+	tag = tevent_timer_get_tag(te);
+	assert_int_equal(1, tag);
+
+	next = tevent_timeval_current();
+	tevent_update_timer(te, next);
+
+	tag = tevent_timer_get_tag(te);
+	assert_int_equal(1, tag);
+
+	tevent_re_initialise(ev);
+
+	tag = tevent_timer_get_tag(te);
+	assert_int_equal(1, tag);
+
+	TALLOC_FREE(te);
+}
+
+static void test_signal_tag(void **state)
+{
+	struct tevent_context *ev = (struct tevent_context *)(*state);
+	struct tevent_signal *se;
+	uint64_t tag;
+
+	se = tevent_add_signal(ev, ev, SIGUSR1, 0, signal_handler, NULL);
+	assert_non_null(se);
+
+	tag = tevent_signal_get_tag(se);
+	assert_int_equal(0, tag);
+
+	tevent_signal_set_tag(se, 1);
+	tag = tevent_signal_get_tag(se);
+	assert_int_equal(1, tag);
+
+	tevent_re_initialise(ev);
+
+	tag = tevent_signal_get_tag(se);
+	assert_int_equal(1, tag);
+
+	TALLOC_FREE(se);
+}
+
+static void test_immediate_tag(void **state)
+{
+	struct tevent_context *ev = (struct tevent_context *)(*state);
+	struct tevent_immediate *im;
+	uint64_t tag;
+
+	im = tevent_create_immediate(ev);
+	assert_non_null(im);
+
+	tag = tevent_immediate_get_tag(im);
+	assert_int_equal(0, tag);
+
+	tevent_immediate_set_tag(im, 1);
+	tag = tevent_immediate_get_tag(im);
+	assert_int_equal(1, tag);
+
+	tevent_schedule_immediate(im, ev, immediate_handler, NULL);
+
+	tag = tevent_immediate_get_tag(im);
+	assert_int_equal(1, tag);
+
+	tevent_re_initialise(ev);
+
+	tag = tevent_immediate_get_tag(im);
+	assert_int_equal(1, tag);
+
+	TALLOC_FREE(im);
+}
+
+int main(int argc, char **argv)
+{
+	const struct CMUnitTest tests[] = {
+		cmocka_unit_test_setup_teardown(test_fd_tag, test_setup, test_teardown),
+		cmocka_unit_test_setup_teardown(test_timer_tag, test_setup, test_teardown),
+		cmocka_unit_test_setup_teardown(test_signal_tag, test_setup, test_teardown),
+		cmocka_unit_test_setup_teardown(test_immediate_tag, test_setup, test_teardown),
+	};
+
+	cmocka_set_message_output(CM_OUTPUT_SUBUNIT);
+
+	return cmocka_run_group_tests(tests, NULL, NULL);
+}
diff -pruN 2:2.2.3-2/lib/tevent/tests/test_tevent_trace.c 2:2.4.2-0ubuntu1/lib/tevent/tests/test_tevent_trace.c
--- 2:2.2.3-2/lib/tevent/tests/test_tevent_trace.c	1970-01-01 00:00:00.000000000 +0000
+++ 2:2.4.2-0ubuntu1/lib/tevent/tests/test_tevent_trace.c	2022-01-24 12:18:16.330473700 +0000
@@ -0,0 +1,1065 @@
+/*
+ * Unix SMB/CIFS implementation.
+ *
+ * testing of some tevent_req aspects
+ *
+ * Copyright (C) Pavel Březina <pbrezina@redhat.com> 2021
+ *
+ *   ** NOTE! The following LGPL license applies to the tevent
+ *   ** 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
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <errno.h>
+#include <setjmp.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <signal.h>
+#include <unistd.h>
+
+#include <talloc.h>
+#include <tevent.h>
+#include <cmocka.h>
+
+struct test_ctx {
+	struct tevent_context *ev;
+
+	bool handler_skipped;
+	bool reattach_reset;
+
+	uint64_t (*get_tag)(const void *event);
+	void (*set_tag)(void *event, uint64_t tag);
+	uint64_t current_tag;
+
+	bool attach;
+	bool before_handler;
+	bool handler_called;
+	bool detach;
+};
+
+static void fd_handler(struct tevent_context *ev,
+		       struct tevent_fd *fde,
+		       uint16_t flags,
+		       void *private_data)
+{
+	struct test_ctx *tctx = (struct test_ctx *)private_data;
+	uint64_t tag = tevent_fd_get_tag(fde);
+	assert_true(tctx->attach);
+	assert_true(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+	tctx->handler_called = true;
+	assert_int_equal(tag, tctx->current_tag);
+	return;
+}
+
+static void timer_handler(struct tevent_context *ev,
+			  struct tevent_timer *te,
+			  struct timeval current_time,
+			  void *private_data)
+{
+	struct test_ctx *tctx = (struct test_ctx *)private_data;
+	uint64_t tag = tevent_timer_get_tag(te);
+	assert_true(tctx->attach);
+	assert_true(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+	tctx->handler_called = true;
+	assert_int_equal(tag, tctx->current_tag);
+	return;
+}
+
+static void signal_handler(struct tevent_context *ev,
+			   struct tevent_signal *se,
+			   int signum,
+			   int count,
+			   void *siginfo,
+			   void *private_data)
+{
+	struct test_ctx *tctx = (struct test_ctx *)private_data;
+	uint64_t tag = tevent_signal_get_tag(se);
+	assert_true(tctx->attach);
+	assert_true(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+	tctx->handler_called = true;
+	assert_int_equal(tag, tctx->current_tag);
+	return;
+}
+
+static void immediate_handler(struct tevent_context *ctx,
+			      struct tevent_immediate *im,
+			      void *private_data)
+{
+	struct test_ctx *tctx = (struct test_ctx *)private_data;
+	uint64_t tag = tevent_immediate_get_tag(im);
+	assert_true(tctx->attach);
+	assert_true(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+	tctx->handler_called = true;
+	assert_int_equal(tag, tctx->current_tag);
+	return;
+}
+
+static void immediate_handler_reschedule(struct tevent_context *ctx,
+					 struct tevent_immediate *im,
+					 void *private_data)
+{
+	struct test_ctx *tctx = (struct test_ctx *)private_data;
+	uint64_t tag = tevent_immediate_get_tag(im);
+	assert_true(tctx->attach);
+	assert_true(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+	tctx->handler_called = true;
+	assert_int_equal(tag, tctx->current_tag);
+
+	assert_false(tctx->reattach_reset);
+	tctx->reattach_reset = true;
+	tevent_schedule_immediate(im, tctx->ev, immediate_handler, tctx);
+	assert_false(tctx->reattach_reset);
+	assert_false(tctx->handler_skipped);
+	assert_true(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+	assert_int_not_equal(tag, tctx->current_tag);
+	tag = tevent_immediate_get_tag(im);
+	assert_int_equal(tag, tctx->current_tag);
+
+	tctx->handler_skipped = true;
+	tctx->reattach_reset = true;
+	tevent_schedule_immediate(im, tctx->ev, immediate_handler, tctx);
+	assert_false(tctx->reattach_reset);
+	assert_false(tctx->handler_skipped);
+	assert_true(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+	assert_int_not_equal(tag, tctx->current_tag);
+	tag = tevent_immediate_get_tag(im);
+	assert_int_equal(tag, tctx->current_tag);
+}
+
+static void fd_handler_free(struct tevent_context *ev,
+			    struct tevent_fd *fde,
+			    uint16_t flags,
+			    void *private_data)
+{
+	struct test_ctx *tctx = (struct test_ctx *)private_data;
+	uint64_t tag = tevent_fd_get_tag(fde);
+	assert_true(tctx->attach);
+	assert_true(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+	tctx->handler_called = true;
+	assert_int_equal(tag, tctx->current_tag);
+	TALLOC_FREE(fde);
+	assert_true(tctx->detach);
+	return;
+}
+
+static void timer_handler_free(struct tevent_context *ev,
+			       struct tevent_timer *te,
+			       struct timeval current_time,
+			       void *private_data)
+{
+	struct test_ctx *tctx = (struct test_ctx *)private_data;
+	uint64_t tag = tevent_timer_get_tag(te);
+	assert_true(tctx->attach);
+	assert_true(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+	tctx->handler_called = true;
+	assert_int_equal(tag, tctx->current_tag);
+	TALLOC_FREE(te);
+	assert_true(tctx->detach);
+	return;
+}
+
+static void signal_handler_free(struct tevent_context *ev,
+				struct tevent_signal *se,
+				int signum,
+				int count,
+				void *siginfo,
+				void *private_data)
+{
+	struct test_ctx *tctx = (struct test_ctx *)private_data;
+	uint64_t tag = tevent_signal_get_tag(se);
+	assert_true(tctx->attach);
+	assert_true(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+	tctx->handler_called = true;
+	assert_int_equal(tag, tctx->current_tag);
+	TALLOC_FREE(se);
+	assert_true(tctx->detach);
+	return;
+}
+
+static void immediate_handler_free(struct tevent_context *ctx,
+				   struct tevent_immediate *im,
+				   void *private_data)
+{
+	struct test_ctx *tctx = (struct test_ctx *)private_data;
+	uint64_t tag = tevent_immediate_get_tag(im);
+	assert_true(tctx->attach);
+	assert_true(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+	tctx->handler_called = true;
+	assert_int_equal(tag, tctx->current_tag);
+	TALLOC_FREE(im);
+	assert_true(tctx->detach);
+	return;
+}
+
+static void trace_event_cb(void *event,
+			   enum tevent_event_trace_point point,
+			   void *private_data)
+{
+	struct test_ctx *tctx = (struct test_ctx *)private_data;
+	uint64_t tag = tctx->get_tag(event);
+
+	switch (point) {
+	case TEVENT_EVENT_TRACE_ATTACH:
+		if (tctx->reattach_reset) {
+			assert_true(tctx->attach);
+			assert_true(tctx->detach);
+			tctx->attach = false;
+			tctx->before_handler = false;
+			tctx->handler_called = false;
+			tctx->detach = false;
+			tctx->handler_skipped = false;
+			tctx->reattach_reset = false;
+		}
+		assert_false(tctx->attach);
+		assert_false(tctx->before_handler);
+		assert_false(tctx->handler_called);
+		assert_false(tctx->detach);
+		tctx->attach = true;
+		assert_int_equal(tag, tctx->current_tag);
+		tag = ++tctx->current_tag;
+		tctx->set_tag(event, tag);
+		break;
+	case TEVENT_EVENT_TRACE_BEFORE_HANDLER:
+		assert_true(tctx->attach);
+		assert_false(tctx->before_handler);
+		assert_false(tctx->handler_called);
+		assert_false(tctx->detach);
+		tctx->before_handler = true;
+		assert_int_equal(tag, tctx->current_tag);
+		break;
+	case TEVENT_EVENT_TRACE_DETACH:
+		assert_true(tctx->attach);
+		if (tctx->handler_skipped) {
+			assert_false(tctx->before_handler);
+			assert_false(tctx->handler_called);
+		} else {
+			assert_true(tctx->before_handler);
+			assert_true(tctx->handler_called);
+		}
+		assert_false(tctx->detach);
+		tctx->detach = true;
+		assert_int_equal(tag, tctx->current_tag);
+		break;
+	}
+}
+
+static int test_setup(void **state)
+{
+	struct test_ctx *tctx;
+
+	tctx = talloc_zero(NULL, struct test_ctx);
+	assert_non_null(tctx);
+
+	tctx->ev = tevent_context_init(tctx);
+	assert_non_null(tctx->ev);
+
+	*state = tctx;
+	return 0;
+}
+
+static int test_teardown(void **state)
+{
+	struct test_ctx *tctx = (struct test_ctx *)(*state);
+	tctx->get_tag = NULL;
+	tctx->set_tag = NULL;
+	tevent_set_trace_fd_callback(tctx->ev, NULL, NULL);
+	tevent_set_trace_timer_callback(tctx->ev, NULL, NULL);
+	tevent_set_trace_signal_callback(tctx->ev, NULL, NULL);
+	tevent_set_trace_immediate_callback(tctx->ev, NULL, NULL);
+	TALLOC_FREE(tctx);
+	return 0;
+}
+
+static uint64_t fd_get_tag(const void *_event)
+{
+	const struct tevent_fd *event =
+		(const struct tevent_fd *)_event;
+
+	return tevent_fd_get_tag(event);
+}
+
+static void fd_set_tag(void *_event, uint64_t tag)
+{
+	struct tevent_fd *event =
+		(struct tevent_fd *)_event;
+
+	tevent_fd_set_tag(event, tag);
+}
+
+static uint64_t timer_get_tag(const void *_event)
+{
+	const struct tevent_timer *event =
+		(const struct tevent_timer *)_event;
+
+	return tevent_timer_get_tag(event);
+}
+
+static void timer_set_tag(void *_event, uint64_t tag)
+{
+	struct tevent_timer *event =
+		(struct tevent_timer *)_event;
+
+	tevent_timer_set_tag(event, tag);
+}
+
+static uint64_t signal_get_tag(const void *_event)
+{
+	const struct tevent_signal *event =
+		(const struct tevent_signal *)_event;
+
+	return tevent_signal_get_tag(event);
+}
+
+static void signal_set_tag(void *_event, uint64_t tag)
+{
+	struct tevent_signal *event =
+		(struct tevent_signal *)_event;
+
+	tevent_signal_set_tag(event, tag);
+}
+
+static uint64_t immediate_get_tag(const void *_event)
+{
+	const struct tevent_immediate *event =
+		(const struct tevent_immediate *)_event;
+
+	return tevent_immediate_get_tag(event);
+}
+
+static void immediate_set_tag(void *_event, uint64_t tag)
+{
+	struct tevent_immediate *event =
+		(struct tevent_immediate *)_event;
+
+	tevent_immediate_set_tag(event, tag);
+}
+
+static void test_trace_event_fd__loop(void **state)
+{
+	struct test_ctx *tctx = (struct test_ctx *)(*state);
+	struct tevent_fd *fde;
+
+	tctx->get_tag = fd_get_tag;
+	tctx->set_tag = fd_set_tag;
+	tevent_set_trace_fd_callback(tctx->ev, (tevent_trace_fd_callback_t)trace_event_cb, tctx);
+
+	assert_false(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	fde = tevent_add_fd(tctx->ev, tctx, 0, TEVENT_FD_WRITE, fd_handler, tctx);
+	assert_non_null(fde);
+	assert_true(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	TEVENT_FD_WRITEABLE(fde);
+	tevent_loop_once(tctx->ev);
+	assert_true(tctx->attach);
+	assert_true(tctx->before_handler);
+	assert_true(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	TALLOC_FREE(fde);
+	assert_true(tctx->attach);
+	assert_true(tctx->before_handler);
+	assert_true(tctx->handler_called);
+	assert_true(tctx->detach);
+}
+
+static void test_trace_event_fd__reset(void **state)
+{
+	struct test_ctx *tctx = (struct test_ctx *)(*state);
+	struct tevent_fd *fde;
+
+	tctx->get_tag = fd_get_tag;
+	tctx->set_tag = fd_set_tag;
+	tevent_set_trace_fd_callback(tctx->ev, (tevent_trace_fd_callback_t)trace_event_cb, tctx);
+
+	assert_false(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	fde = tevent_add_fd(tctx->ev, tctx, 0, TEVENT_FD_WRITE, fd_handler, tctx);
+	assert_non_null(fde);
+	assert_true(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	tctx->handler_skipped = true;
+	tevent_re_initialise(tctx->ev);
+	assert_true(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_true(tctx->detach);
+}
+
+static void test_trace_event_fd__free(void **state)
+{
+	struct test_ctx *tctx = (struct test_ctx *)(*state);
+	struct tevent_fd *fde;
+
+	tctx->get_tag = fd_get_tag;
+	tctx->set_tag = fd_set_tag;
+	tevent_set_trace_fd_callback(tctx->ev, (tevent_trace_fd_callback_t)trace_event_cb, tctx);
+
+	assert_false(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	fde = tevent_add_fd(tctx->ev, tctx, 0, TEVENT_FD_WRITE, fd_handler, tctx);
+	assert_non_null(fde);
+	assert_true(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	tctx->handler_skipped = true;
+	TALLOC_FREE(fde);
+	assert_true(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_true(tctx->detach);
+}
+
+static void test_trace_event_fd__free_in_handler(void **state)
+{
+	struct test_ctx *tctx = (struct test_ctx *)(*state);
+	struct tevent_fd *fde;
+
+	tctx->get_tag = fd_get_tag;
+	tctx->set_tag = fd_set_tag;
+	tevent_set_trace_fd_callback(tctx->ev, (tevent_trace_fd_callback_t)trace_event_cb, tctx);
+
+	assert_false(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	fde = tevent_add_fd(tctx->ev, tctx, 0, TEVENT_FD_WRITE, fd_handler_free, tctx);
+	assert_non_null(fde);
+	assert_true(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	TEVENT_FD_WRITEABLE(fde);
+	tevent_loop_once(tctx->ev);
+	assert_true(tctx->attach);
+	assert_true(tctx->before_handler);
+	assert_true(tctx->handler_called);
+	assert_true(tctx->detach);
+}
+
+static void test_trace_event_timer__loop(void **state)
+{
+	struct test_ctx *tctx = (struct test_ctx *)(*state);
+	struct tevent_timer *te;
+	struct timeval next;
+
+	tctx->get_tag = timer_get_tag;
+	tctx->set_tag = timer_set_tag;
+	tevent_set_trace_timer_callback(tctx->ev, (tevent_trace_timer_callback_t)trace_event_cb, tctx);
+
+	assert_false(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	next = tevent_timeval_current();
+	te = tevent_add_timer(tctx->ev, tctx, next, timer_handler, tctx);
+	assert_non_null(te);
+	assert_true(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	tevent_loop_once(tctx->ev);
+	assert_true(tctx->attach);
+	assert_true(tctx->before_handler);
+	assert_true(tctx->handler_called);
+	/* timer events are self destructing after calling the handler */
+	assert_true(tctx->detach);
+}
+
+static void test_trace_event_timer__reset(void **state)
+{
+	struct test_ctx *tctx = (struct test_ctx *)(*state);
+	struct tevent_timer *te;
+	struct timeval next;
+
+	tctx->get_tag = timer_get_tag;
+	tctx->set_tag = timer_set_tag;
+	tevent_set_trace_timer_callback(tctx->ev, (tevent_trace_timer_callback_t)trace_event_cb, tctx);
+
+	assert_false(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	next = tevent_timeval_current();
+	te = tevent_add_timer(tctx->ev, tctx, next, timer_handler, tctx);
+	assert_non_null(te);
+	assert_true(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+	assert_true(tctx->attach);
+
+	assert_false(tctx->reattach_reset);
+	tctx->handler_skipped = true;
+	tctx->reattach_reset = true;
+	next = tevent_timeval_current();
+	tevent_update_timer(te, next);
+	assert_false(tctx->reattach_reset);
+	assert_false(tctx->handler_skipped);
+	assert_true(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	tctx->handler_skipped = true;
+	tevent_re_initialise(tctx->ev);
+	assert_true(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_true(tctx->detach);
+}
+
+static void test_trace_event_timer__free(void **state)
+{
+	struct test_ctx *tctx = (struct test_ctx *)(*state);
+	struct tevent_timer *te;
+	struct timeval next;
+
+	tctx->get_tag = timer_get_tag;
+	tctx->set_tag = timer_set_tag;
+	tevent_set_trace_timer_callback(tctx->ev, (tevent_trace_timer_callback_t)trace_event_cb, tctx);
+
+	assert_false(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	next = tevent_timeval_current();
+	te = tevent_add_timer(tctx->ev, tctx, next, timer_handler, tctx);
+	assert_non_null(te);
+	assert_true(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+	assert_true(tctx->attach);
+
+	tctx->handler_skipped = true;
+	TALLOC_FREE(te);
+	assert_true(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_true(tctx->detach);
+}
+
+static void test_trace_event_timer__free_in_handler(void **state)
+{
+	struct test_ctx *tctx = (struct test_ctx *)(*state);
+	struct tevent_timer *te;
+	struct timeval next;
+
+	tctx->get_tag = timer_get_tag;
+	tctx->set_tag = timer_set_tag;
+	tevent_set_trace_timer_callback(tctx->ev, (tevent_trace_timer_callback_t)trace_event_cb, tctx);
+
+	assert_false(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	next = tevent_timeval_current();
+	te = tevent_add_timer(tctx->ev, tctx, next, timer_handler_free, tctx);
+	assert_non_null(te);
+	assert_true(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	tevent_loop_once(tctx->ev);
+	assert_true(tctx->attach);
+	assert_true(tctx->before_handler);
+	assert_true(tctx->handler_called);
+	assert_true(tctx->detach);
+}
+
+static void test_trace_event_signal__loop(void **state)
+{
+	struct test_ctx *tctx = (struct test_ctx *)(*state);
+	struct tevent_signal *se;
+
+	tctx->get_tag = signal_get_tag;
+	tctx->set_tag = signal_set_tag;
+	tevent_set_trace_signal_callback(tctx->ev, (tevent_trace_signal_callback_t)trace_event_cb, tctx);
+
+	assert_false(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	se = tevent_add_signal(tctx->ev, tctx, SIGUSR1, 0, signal_handler, tctx);
+	assert_non_null(se);
+	assert_true(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	kill(getpid(), SIGUSR1);
+	tevent_loop_once(tctx->ev);
+	assert_true(tctx->attach);
+	assert_true(tctx->before_handler);
+	assert_true(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	TALLOC_FREE(se);
+	assert_true(tctx->attach);
+	assert_true(tctx->before_handler);
+	assert_true(tctx->handler_called);
+	assert_true(tctx->detach);
+}
+
+static void test_trace_event_signal__reset(void **state)
+{
+	struct test_ctx *tctx = (struct test_ctx *)(*state);
+	struct tevent_signal *se;
+
+	tctx->get_tag = signal_get_tag;
+	tctx->set_tag = signal_set_tag;
+	tevent_set_trace_signal_callback(tctx->ev, (tevent_trace_signal_callback_t)trace_event_cb, tctx);
+
+	assert_false(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	se = tevent_add_signal(tctx->ev, tctx, SIGUSR1, 0, signal_handler, tctx);
+	assert_non_null(se);
+	assert_true(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	tctx->handler_skipped = true;
+	TALLOC_FREE(se);
+	assert_true(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_true(tctx->detach);
+}
+
+static void test_trace_event_signal__free(void **state)
+{
+	struct test_ctx *tctx = (struct test_ctx *)(*state);
+	struct tevent_signal *se;
+
+	tctx->get_tag = signal_get_tag;
+	tctx->set_tag = signal_set_tag;
+	tevent_set_trace_signal_callback(tctx->ev, (tevent_trace_signal_callback_t)trace_event_cb, tctx);
+
+	assert_false(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	se = tevent_add_signal(tctx->ev, tctx, SIGUSR1, 0, signal_handler, tctx);
+	assert_non_null(se);
+	assert_true(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	tctx->handler_skipped = true;
+	TALLOC_FREE(se);
+	assert_true(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_true(tctx->detach);
+}
+
+static void test_trace_event_signal__free_in_handler(void **state)
+{
+	struct test_ctx *tctx = (struct test_ctx *)(*state);
+	struct tevent_signal *se;
+
+	tctx->get_tag = signal_get_tag;
+	tctx->set_tag = signal_set_tag;
+	tevent_set_trace_signal_callback(tctx->ev, (tevent_trace_signal_callback_t)trace_event_cb, tctx);
+
+	assert_false(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	se = tevent_add_signal(tctx->ev, tctx, SIGUSR1, 0, signal_handler_free, tctx);
+	assert_non_null(se);
+	assert_true(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	kill(getpid(), SIGUSR1);
+	tevent_loop_once(tctx->ev);
+	assert_true(tctx->attach);
+	assert_true(tctx->before_handler);
+	assert_true(tctx->handler_called);
+	assert_true(tctx->detach);
+}
+
+static void test_trace_event_immediate__loop(void **state)
+{
+	struct test_ctx *tctx = (struct test_ctx *)(*state);
+	struct tevent_immediate *im;
+
+	tctx->get_tag = immediate_get_tag;
+	tctx->set_tag = immediate_set_tag;
+	tevent_set_trace_immediate_callback(tctx->ev, (tevent_trace_immediate_callback_t)trace_event_cb, tctx);
+
+	assert_false(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	im = tevent_create_immediate(tctx);
+	assert_non_null(im);
+
+	assert_false(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	tevent_schedule_immediate(im, tctx->ev, immediate_handler, tctx);
+	assert_true(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	tevent_loop_once(tctx->ev);
+	assert_true(tctx->attach);
+	assert_true(tctx->before_handler);
+	assert_true(tctx->handler_called);
+	/* immediate events are self detaching */
+	assert_true(tctx->detach);
+}
+
+static void test_trace_event_immediate__reset(void **state)
+{
+	struct test_ctx *tctx = (struct test_ctx *)(*state);
+	struct tevent_immediate *im;
+
+	tctx->get_tag = immediate_get_tag;
+	tctx->set_tag = immediate_set_tag;
+	tevent_set_trace_immediate_callback(tctx->ev, (tevent_trace_immediate_callback_t)trace_event_cb, tctx);
+
+	assert_false(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	im = tevent_create_immediate(tctx);
+	assert_non_null(im);
+
+	assert_false(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	tevent_schedule_immediate(im, tctx->ev, immediate_handler, tctx);
+	assert_true(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	tctx->handler_skipped = true;
+	tevent_re_initialise(tctx->ev);
+	assert_true(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_true(tctx->detach);
+}
+
+static void test_trace_event_immediate__free(void **state)
+{
+	struct test_ctx *tctx = (struct test_ctx *)(*state);
+	struct tevent_immediate *im;
+
+	tctx->get_tag = immediate_get_tag;
+	tctx->set_tag = immediate_set_tag;
+	tevent_set_trace_immediate_callback(tctx->ev, (tevent_trace_immediate_callback_t)trace_event_cb, tctx);
+
+	assert_false(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	im = tevent_create_immediate(tctx);
+	assert_non_null(im);
+
+	assert_false(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	tevent_schedule_immediate(im, tctx->ev, immediate_handler, tctx);
+	assert_true(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	tctx->handler_skipped = true;
+	TALLOC_FREE(im);
+	assert_true(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_true(tctx->detach);
+}
+
+static void test_trace_event_immediate__free_in_handler(void **state)
+{
+	struct test_ctx *tctx = (struct test_ctx *)(*state);
+	struct tevent_immediate *im;
+
+	tctx->get_tag = immediate_get_tag;
+	tctx->set_tag = immediate_set_tag;
+	tevent_set_trace_immediate_callback(tctx->ev, (tevent_trace_immediate_callback_t)trace_event_cb, tctx);
+
+	assert_false(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	im = tevent_create_immediate(tctx);
+	assert_non_null(im);
+
+	assert_false(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	tevent_schedule_immediate(im, tctx->ev, immediate_handler_free, tctx);
+	assert_true(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	tevent_loop_once(tctx->ev);
+	assert_true(tctx->attach);
+	assert_true(tctx->before_handler);
+	assert_true(tctx->handler_called);
+	assert_true(tctx->detach);
+}
+
+static void test_trace_event_immediate__reschedule(void **state)
+{
+	struct test_ctx *tctx = (struct test_ctx *)(*state);
+	struct tevent_immediate *im;
+
+	tctx->get_tag = immediate_get_tag;
+	tctx->set_tag = immediate_set_tag;
+	tevent_set_trace_immediate_callback(tctx->ev, (tevent_trace_immediate_callback_t)trace_event_cb, tctx);
+
+	assert_false(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	im = tevent_create_immediate(tctx);
+	assert_non_null(im);
+
+	assert_false(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	tevent_schedule_immediate(im, tctx->ev, immediate_handler, tctx);
+	assert_true(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	assert_false(tctx->reattach_reset);
+	tctx->handler_skipped = true;
+	tctx->reattach_reset = true;
+	tevent_schedule_immediate(im, tctx->ev, immediate_handler_reschedule, tctx);
+	assert_false(tctx->reattach_reset);
+	assert_false(tctx->handler_skipped);
+	assert_true(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	tevent_loop_once(tctx->ev);
+	assert_false(tctx->reattach_reset);
+	assert_true(tctx->attach);
+	assert_false(tctx->before_handler);
+	assert_false(tctx->handler_called);
+	assert_false(tctx->detach);
+
+	tevent_loop_once(tctx->ev);
+	assert_true(tctx->attach);
+	assert_true(tctx->before_handler);
+	assert_true(tctx->handler_called);
+	/* immediate events are self detaching */
+	assert_true(tctx->detach);
+}
+
+static void test_get_set_trace_fd_callback(void **state)
+{
+	struct test_ctx *tctx = (struct test_ctx *)(*state);
+	tevent_trace_fd_callback_t cb;
+	void *pvt;
+
+	tevent_get_trace_fd_callback(tctx->ev, &cb, &pvt);
+	assert_null(cb);
+	assert_null(pvt);
+
+	tevent_set_trace_fd_callback(tctx->ev, (tevent_trace_fd_callback_t)trace_event_cb, tctx);
+	tevent_get_trace_fd_callback(tctx->ev, &cb, &pvt);
+	assert_ptr_equal(cb, trace_event_cb);
+	assert_ptr_equal(pvt, tctx);
+
+	tevent_set_trace_fd_callback(tctx->ev, NULL, NULL);
+	tevent_get_trace_fd_callback(tctx->ev, &cb, &pvt);
+	assert_null(cb);
+	assert_null(pvt);
+}
+
+static void test_get_set_trace_timer_callback(void **state)
+{
+	struct test_ctx *tctx = (struct test_ctx *)(*state);
+	tevent_trace_timer_callback_t cb;
+	void *pvt;
+
+	tevent_get_trace_timer_callback(tctx->ev, &cb, &pvt);
+	assert_null(cb);
+	assert_null(pvt);
+
+	tevent_set_trace_timer_callback(tctx->ev, (tevent_trace_timer_callback_t)trace_event_cb, tctx);
+	tevent_get_trace_timer_callback(tctx->ev, &cb, &pvt);
+	assert_ptr_equal(cb, trace_event_cb);
+	assert_ptr_equal(pvt, tctx);
+
+	tevent_set_trace_timer_callback(tctx->ev, NULL, NULL);
+	tevent_get_trace_timer_callback(tctx->ev, &cb, &pvt);
+	assert_null(cb);
+	assert_null(pvt);
+}
+
+static void test_get_set_trace_signal_callback(void **state)
+{
+	struct test_ctx *tctx = (struct test_ctx *)(*state);
+	tevent_trace_signal_callback_t cb;
+	void *pvt;
+
+	tevent_get_trace_signal_callback(tctx->ev, &cb, &pvt);
+	assert_null(cb);
+	assert_null(pvt);
+
+	tevent_set_trace_signal_callback(tctx->ev, (tevent_trace_signal_callback_t)trace_event_cb, tctx);
+	tevent_get_trace_signal_callback(tctx->ev, &cb, &pvt);
+	assert_ptr_equal(cb, trace_event_cb);
+	assert_ptr_equal(pvt, tctx);
+
+	tevent_set_trace_signal_callback(tctx->ev, NULL, NULL);
+	tevent_get_trace_signal_callback(tctx->ev, &cb, &pvt);
+	assert_null(cb);
+	assert_null(pvt);
+}
+
+static void test_get_set_trace_immediate_callback(void **state)
+{
+	struct test_ctx *tctx = (struct test_ctx *)(*state);
+	tevent_trace_immediate_callback_t cb;
+	void *pvt;
+
+	tevent_get_trace_immediate_callback(tctx->ev, &cb, &pvt);
+	assert_null(cb);
+	assert_null(pvt);
+
+	tevent_set_trace_immediate_callback(tctx->ev, (tevent_trace_immediate_callback_t)trace_event_cb, tctx);
+	tevent_get_trace_immediate_callback(tctx->ev, &cb, &pvt);
+	assert_ptr_equal(cb, trace_event_cb);
+	assert_ptr_equal(pvt, tctx);
+
+	tevent_set_trace_immediate_callback(tctx->ev, NULL, NULL);
+	tevent_get_trace_immediate_callback(tctx->ev, &cb, &pvt);
+	assert_null(cb);
+	assert_null(pvt);
+}
+
+int main(int argc, char **argv)
+{
+	const struct CMUnitTest tests[] = {
+		cmocka_unit_test_setup_teardown(test_trace_event_fd__loop, test_setup, test_teardown),
+		cmocka_unit_test_setup_teardown(test_trace_event_fd__reset, test_setup, test_teardown),
+		cmocka_unit_test_setup_teardown(test_trace_event_fd__free, test_setup, test_teardown),
+		cmocka_unit_test_setup_teardown(test_trace_event_fd__free_in_handler, test_setup, test_teardown),
+		cmocka_unit_test_setup_teardown(test_trace_event_timer__loop, test_setup, test_teardown),
+		cmocka_unit_test_setup_teardown(test_trace_event_timer__reset, test_setup, test_teardown),
+		cmocka_unit_test_setup_teardown(test_trace_event_timer__free, test_setup, test_teardown),
+		cmocka_unit_test_setup_teardown(test_trace_event_timer__free_in_handler, test_setup, test_teardown),
+		cmocka_unit_test_setup_teardown(test_trace_event_signal__loop, test_setup, test_teardown),
+		cmocka_unit_test_setup_teardown(test_trace_event_signal__reset, test_setup, test_teardown),
+		cmocka_unit_test_setup_teardown(test_trace_event_signal__free, test_setup, test_teardown),
+		cmocka_unit_test_setup_teardown(test_trace_event_signal__free_in_handler, test_setup, test_teardown),
+		cmocka_unit_test_setup_teardown(test_trace_event_immediate__loop, test_setup, test_teardown),
+		cmocka_unit_test_setup_teardown(test_trace_event_immediate__reset, test_setup, test_teardown),
+		cmocka_unit_test_setup_teardown(test_trace_event_immediate__free, test_setup, test_teardown),
+		cmocka_unit_test_setup_teardown(test_trace_event_immediate__free_in_handler, test_setup, test_teardown),
+		cmocka_unit_test_setup_teardown(test_trace_event_immediate__reschedule, test_setup, test_teardown),
+		cmocka_unit_test_setup_teardown(test_get_set_trace_fd_callback, test_setup, test_teardown),
+		cmocka_unit_test_setup_teardown(test_get_set_trace_timer_callback, test_setup, test_teardown),
+		cmocka_unit_test_setup_teardown(test_get_set_trace_signal_callback, test_setup, test_teardown),
+		cmocka_unit_test_setup_teardown(test_get_set_trace_immediate_callback, test_setup, test_teardown),
+	};
+
+	cmocka_set_message_output(CM_OUTPUT_SUBUNIT);
+
+	return cmocka_run_group_tests(tests, NULL, NULL);
+}
diff -pruN 2:2.2.3-2/lib/tevent/tevent.c 2:2.4.2-0ubuntu1/lib/tevent/tevent.c
--- 2:2.2.3-2/lib/tevent/tevent.c	2021-10-28 15:29:47.588471700 +0000
+++ 2:2.4.2-0ubuntu1/lib/tevent/tevent.c	2022-01-24 12:18:16.330473700 +0000
@@ -166,14 +166,28 @@ const char **tevent_backend_list(TALLOC_
 {
 	const char **list = NULL;
 	struct tevent_ops_list *e;
+	size_t idx = 0;
 
 	tevent_backend_init();
 
 	for (e=tevent_backends;e;e=e->next) {
-		list = ev_str_list_add(list, e->name);
+		idx += 1;
 	}
 
-	talloc_steal(mem_ctx, list);
+	list = talloc_zero_array(mem_ctx, const char *, idx+1);
+	if (list == NULL) {
+		return NULL;
+	}
+
+	idx = 0;
+	for (e=tevent_backends;e;e=e->next) {
+		list[idx] = talloc_strdup(list, e->name);
+		if (list[idx] == NULL) {
+			TALLOC_FREE(list);
+			return NULL;
+		}
+		idx += 1;
+	}
 
 	return list;
 }
@@ -363,6 +377,7 @@ int tevent_common_context_destructor(str
 
 	for (fd = ev->fd_events; fd; fd = fn) {
 		fn = fd->next;
+		tevent_trace_fd_callback(fd->event_ctx, fd, TEVENT_EVENT_TRACE_DETACH);
 		fd->wrapper = NULL;
 		fd->event_ctx = NULL;
 		DLIST_REMOVE(ev->fd_events, fd);
@@ -371,6 +386,7 @@ int tevent_common_context_destructor(str
 	ev->last_zero_timer = NULL;
 	for (te = ev->timer_events; te; te = tn) {
 		tn = te->next;
+		tevent_trace_timer_callback(te->event_ctx, te, TEVENT_EVENT_TRACE_DETACH);
 		te->wrapper = NULL;
 		te->event_ctx = NULL;
 		DLIST_REMOVE(ev->timer_events, te);
@@ -378,6 +394,7 @@ int tevent_common_context_destructor(str
 
 	for (ie = ev->immediate_events; ie; ie = in) {
 		in = ie->next;
+		tevent_trace_immediate_callback(ie->event_ctx, ie, TEVENT_EVENT_TRACE_DETACH);
 		ie->wrapper = NULL;
 		ie->event_ctx = NULL;
 		ie->cancel_fn = NULL;
@@ -386,6 +403,7 @@ int tevent_common_context_destructor(str
 
 	for (se = ev->signal_events; se; se = sn) {
 		sn = se->next;
+		tevent_trace_signal_callback(se->event_ctx, se, TEVENT_EVENT_TRACE_DETACH);
 		se->wrapper = NULL;
 		se->event_ctx = NULL;
 		DLIST_REMOVE(ev->signal_events, se);
diff -pruN 2:2.2.3-2/lib/tevent/tevent_debug.c 2:2.4.2-0ubuntu1/lib/tevent/tevent_debug.c
--- 2:2.2.3-2/lib/tevent/tevent_debug.c	2021-10-28 15:29:47.588471700 +0000
+++ 2:2.4.2-0ubuntu1/lib/tevent/tevent_debug.c	2022-01-24 12:18:16.334473600 +0000
@@ -114,22 +114,149 @@ void tevent_set_trace_callback(struct te
 		return;
 	}
 
-	ev->tracing.callback = cb;
-	ev->tracing.private_data = private_data;
+	ev->tracing.point.callback = cb;
+	ev->tracing.point.private_data = private_data;
 }
 
 void tevent_get_trace_callback(struct tevent_context *ev,
 			       tevent_trace_callback_t *cb,
 			       void *private_data)
 {
-	*cb = ev->tracing.callback;
-	*(void**)private_data = ev->tracing.private_data;
+	*cb = ev->tracing.point.callback;
+	*(void**)private_data = ev->tracing.point.private_data;
 }
 
 void tevent_trace_point_callback(struct tevent_context *ev,
 				 enum tevent_trace_point tp)
 {
-	if (ev->tracing.callback != NULL) {
-		ev->tracing.callback(tp, ev->tracing.private_data);
+	if (ev->tracing.point.callback != NULL) {
+		ev->tracing.point.callback(tp, ev->tracing.point.private_data);
+	}
+}
+
+void tevent_set_trace_fd_callback(struct tevent_context *ev,
+				  tevent_trace_fd_callback_t cb,
+				  void *private_data)
+{
+	if (ev->wrapper.glue != NULL) {
+		ev = tevent_wrapper_main_ev(ev);
+		tevent_abort(ev, "tevent_set_trace_fd_callback() on wrapper");
+		return;
+	}
+
+	ev->tracing.fde.callback = cb;
+	ev->tracing.fde.private_data = private_data;
+}
+
+void tevent_get_trace_fd_callback(struct tevent_context *ev,
+				  tevent_trace_fd_callback_t *cb,
+				  void *p_private_data)
+{
+	*cb = ev->tracing.fde.callback;
+	*(void**)p_private_data = ev->tracing.fde.private_data;
+}
+
+void tevent_trace_fd_callback(struct tevent_context *ev,
+			      struct tevent_fd *fde,
+			      enum tevent_event_trace_point tp)
+{
+	if (ev->tracing.fde.callback != NULL) {
+		ev->tracing.fde.callback(fde, tp, ev->tracing.fde.private_data);
+	}
+}
+
+void tevent_set_trace_signal_callback(struct tevent_context *ev,
+				      tevent_trace_signal_callback_t cb,
+				      void *private_data)
+{
+	if (ev->wrapper.glue != NULL) {
+		ev = tevent_wrapper_main_ev(ev);
+		tevent_abort(ev, "tevent_set_trace_signal_callback() "
+			     "on wrapper");
+		return;
+	}
+
+	ev->tracing.se.callback = cb;
+	ev->tracing.se.private_data = private_data;
+}
+
+void tevent_get_trace_signal_callback(struct tevent_context *ev,
+				      tevent_trace_signal_callback_t *cb,
+				      void *p_private_data)
+{
+	*cb = ev->tracing.se.callback;
+	*(void**)p_private_data = ev->tracing.se.private_data;
+}
+
+void tevent_trace_signal_callback(struct tevent_context *ev,
+				  struct tevent_signal *se,
+				  enum tevent_event_trace_point tp)
+{
+	if (ev->tracing.se.callback != NULL) {
+		ev->tracing.se.callback(se, tp, ev->tracing.se.private_data);
+	}
+}
+
+void tevent_set_trace_timer_callback(struct tevent_context *ev,
+				     tevent_trace_timer_callback_t cb,
+				     void *private_data)
+{
+	if (ev->wrapper.glue != NULL) {
+		ev = tevent_wrapper_main_ev(ev);
+		tevent_abort(ev, "tevent_set_trace_timer_callback() "
+			     "on wrapper");
+		return;
+	}
+
+	ev->tracing.te.callback = cb;
+	ev->tracing.te.private_data = private_data;
+}
+
+void tevent_get_trace_timer_callback(struct tevent_context *ev,
+				     tevent_trace_timer_callback_t *cb,
+				     void *p_private_data)
+{
+	*cb = ev->tracing.te.callback;
+	*(void**)p_private_data = ev->tracing.te.private_data;
+}
+
+void tevent_trace_timer_callback(struct tevent_context *ev,
+				 struct tevent_timer *te,
+				 enum tevent_event_trace_point tp)
+{
+	if (ev->tracing.te.callback != NULL) {
+		ev->tracing.te.callback(te, tp, ev->tracing.te.private_data);
+	}
+}
+
+void tevent_set_trace_immediate_callback(struct tevent_context *ev,
+					 tevent_trace_immediate_callback_t cb,
+					 void *private_data)
+{
+	if (ev->wrapper.glue != NULL) {
+		ev = tevent_wrapper_main_ev(ev);
+		tevent_abort(ev, "tevent_set_trace_immediate_callback() "
+		             "on wrapper");
+		return;
+	}
+
+	ev->tracing.im.callback = cb;
+	ev->tracing.im.private_data = private_data;
+}
+
+void tevent_get_trace_immediate_callback(struct tevent_context *ev,
+					 tevent_trace_immediate_callback_t *cb,
+					 void *p_private_data)
+{
+	*cb = ev->tracing.im.callback;
+	*(void**)p_private_data = ev->tracing.im.private_data;
+}
+
+void tevent_trace_immediate_callback(struct tevent_context *ev,
+				     struct tevent_immediate *im,
+				     enum tevent_event_trace_point tp)
+{
+	if (ev->tracing.im.callback != NULL) {
+		ev->tracing.im.callback(im, tp, ev->tracing.im.private_data);
 	}
 }
diff -pruN 2:2.2.3-2/lib/tevent/tevent_fd.c 2:2.4.2-0ubuntu1/lib/tevent/tevent_fd.c
--- 2:2.2.3-2/lib/tevent/tevent_fd.c	2021-10-28 15:29:47.588471700 +0000
+++ 2:2.4.2-0ubuntu1/lib/tevent/tevent_fd.c	2022-01-24 12:18:16.334473600 +0000
@@ -38,6 +38,7 @@ int tevent_common_fd_destructor(struct t
 	fde->destroyed = true;
 
 	if (fde->event_ctx) {
+		tevent_trace_fd_callback(fde->event_ctx, fde, TEVENT_EVENT_TRACE_DETACH);
 		DLIST_REMOVE(fde->event_ctx->fd_events, fde);
 	}
 
@@ -85,10 +86,12 @@ struct tevent_fd *tevent_common_add_fd(s
 		.location	= location,
 	};
 
+	tevent_trace_fd_callback(fde->event_ctx, fde, TEVENT_EVENT_TRACE_ATTACH);
 	DLIST_ADD(ev->fd_events, fde);
 
 	talloc_set_destructor(fde, tevent_common_fd_destructor);
 
+
 	return fde;
 }
 uint16_t tevent_common_fd_get_flags(struct tevent_fd *fde)
@@ -135,6 +138,7 @@ int tevent_common_invoke_fd_handler(stru
 					fde->handler_name,
 					fde->location);
 	}
+	tevent_trace_fd_callback(fde->event_ctx, fde, TEVENT_EVENT_TRACE_BEFORE_HANDLER);
 	fde->handler(handler_ev, fde, flags, fde->private_data);
 	if (fde->wrapper != NULL) {
 		fde->wrapper->ops->after_fd_handler(
@@ -159,3 +163,21 @@ int tevent_common_invoke_fd_handler(stru
 
 	return 0;
 }
+
+void tevent_fd_set_tag(struct tevent_fd *fde, uint64_t tag)
+{
+	if (fde == NULL) {
+		return;
+	}
+
+	fde->tag = tag;
+}
+
+uint64_t tevent_fd_get_tag(const struct tevent_fd *fde)
+{
+	if (fde == NULL) {
+		return 0;
+	}
+
+	return fde->tag;
+}
diff -pruN 2:2.2.3-2/lib/tevent/tevent.h 2:2.4.2-0ubuntu1/lib/tevent/tevent.h
--- 2:2.2.3-2/lib/tevent/tevent.h	2021-11-02 22:53:09.479799300 +0000
+++ 2:2.4.2-0ubuntu1/lib/tevent/tevent.h	2022-01-24 12:18:16.334473600 +0000
@@ -33,6 +33,12 @@
 #include <sys/time.h>
 #include <stdbool.h>
 
+/* for old gcc releases that don't have the feature test macro __has_attribute */
+#ifndef __has_attribute
+#define __has_attribute(x) 0
+#endif
+
+
 struct tevent_context;
 struct tevent_ops;
 struct tevent_fd;
@@ -204,6 +210,22 @@ struct tevent_fd *_tevent_add_fd(struct
 		       #handler, __location__)
 #endif
 
+/**
+ * @brief Associate a custom tag with the event.
+ *
+ * This tag can be then retrieved with tevent_fd_get_tag()
+ *
+ * @param[in]  fde  The file descriptor event.
+ *
+ * @param[in]  tag  Custom tag.
+ */
+void tevent_fd_set_tag(struct tevent_fd *fde, uint64_t tag);
+
+/**
+ * @brief Get custom event tag.
+ */
+uint64_t tevent_fd_get_tag(const struct tevent_fd *fde);
+
 #ifdef DOXYGEN
 /**
  * @brief Add a timed event
@@ -262,6 +284,22 @@ struct tevent_timer *_tevent_add_timer(s
  */
 void tevent_update_timer(struct tevent_timer *te, struct timeval next_event);
 
+/**
+ * @brief Associate a custom tag with the event.
+ *
+ * This tag can be then retrieved with tevent_timer_get_tag()
+ *
+ * @param[in]  te   The timer event.
+ *
+ * @param[in]  tag  Custom tag.
+ */
+void tevent_timer_set_tag(struct tevent_timer *te, uint64_t tag);
+
+/**
+ * @brief Get custom event tag.
+ */
+uint64_t tevent_timer_get_tag(const struct tevent_timer *te);
+
 #ifdef DOXYGEN
 /**
  * Initialize an immediate event object
@@ -312,6 +350,22 @@ void _tevent_schedule_immediate(struct t
 				   #handler, __location__);
 #endif
 
+/**
+ * @brief Associate a custom tag with the event.
+ *
+ * This tag can be then retrieved with tevent_immediate_get_tag()
+ *
+ * @param[in]  im   The immediate event.
+ *
+ * @param[in]  tag  Custom tag.
+ */
+void tevent_immediate_set_tag(struct tevent_immediate *im, uint64_t tag);
+
+/**
+ * @brief Get custom event tag.
+ */
+uint64_t tevent_immediate_get_tag(const struct tevent_immediate *fde);
+
 #ifdef DOXYGEN
 /**
  * @brief Add a tevent signal handler
@@ -360,6 +414,22 @@ struct tevent_signal *_tevent_add_signal
 #endif
 
 /**
+ * @brief Associate a custom tag with the event.
+ *
+ * This tag can be then retrieved with tevent_signal_get_tag()
+ *
+ * @param[in]  fde  The signal event.
+ *
+ * @param[in]  tag  Custom tag.
+ */
+void tevent_signal_set_tag(struct tevent_signal *se, uint64_t tag);
+
+/**
+ * @brief Get custom event tag.
+ */
+uint64_t tevent_signal_get_tag(const struct tevent_signal *se);
+
+/**
  * @brief the number of supported signals
  *
  * This returns value of the configure time TEVENT_NUM_SIGNALS constant.
@@ -621,6 +691,155 @@ void tevent_get_trace_callback(struct te
 			       tevent_trace_callback_t *cb,
 			       void *private_data);
 
+enum tevent_event_trace_point {
+	/**
+	 * Corresponds to a trace point just before the event is added.
+	 */
+	TEVENT_EVENT_TRACE_ATTACH,
+
+	/**
+	 * Corresponds to a trace point just before the event is removed.
+	 */
+	TEVENT_EVENT_TRACE_DETACH,
+
+	/**
+	 * Corresponds to a trace point just before the event handler is called.
+	 */
+	TEVENT_EVENT_TRACE_BEFORE_HANDLER,
+};
+
+typedef void (*tevent_trace_fd_callback_t)(struct tevent_fd *fde,
+					   enum tevent_event_trace_point,
+					   void *private_data);
+
+typedef void (*tevent_trace_signal_callback_t)(struct tevent_signal *se,
+					       enum tevent_event_trace_point,
+					       void *private_data);
+
+typedef void (*tevent_trace_timer_callback_t)(struct tevent_timer *te,
+					      enum tevent_event_trace_point,
+					      void *private_data);
+
+typedef void (*tevent_trace_immediate_callback_t)(struct tevent_immediate *im,
+						  enum tevent_event_trace_point,
+						  void *private_data);
+
+/**
+ * Register a callback to be called at certain trace points of fd event.
+ *
+ * @param[in] ev             Event context
+ * @param[in] cb             Trace callback
+ * @param[in] private_data   Data to be passed to callback
+ *
+ * @note The callback will be called at trace points defined by
+ * tevent_event_trace_point. Call with NULL to reset.
+ */
+void tevent_set_trace_fd_callback(struct tevent_context *ev,
+				  tevent_trace_fd_callback_t cb,
+				  void *private_data);
+
+/**
+ * Retrieve the current trace callback of file descriptor event.
+ *
+ * @param[in] ev             Event context
+ * @param[out] cb            Registered trace callback
+ * @param[out] p_private_data  Registered data to be passed to callback
+ *
+ * @note This can be used to allow one component that wants to
+ * register a callback to respect the callback that another component
+ * has already registered.
+ */
+void tevent_get_trace_fd_callback(struct tevent_context *ev,
+				  tevent_trace_fd_callback_t *cb,
+				  void *p_private_data);
+
+/**
+ * Register a callback to be called at certain trace points of signal event.
+ *
+ * @param[in] ev             Event context
+ * @param[in] cb             Trace callback
+ * @param[in] private_data   Data to be passed to callback
+ *
+ * @note The callback will be called at trace points defined by
+ * tevent_event_trace_point. Call with NULL to reset.
+ */
+void tevent_set_trace_signal_callback(struct tevent_context *ev,
+				      tevent_trace_signal_callback_t cb,
+				      void *private_data);
+
+/**
+ * Retrieve the current trace callback of signal event.
+ *
+ * @param[in] ev             Event context
+ * @param[out] cb            Registered trace callback
+ * @param[out] p_private_data  Registered data to be passed to callback
+ *
+ * @note This can be used to allow one component that wants to
+ * register a callback to respect the callback that another component
+ * has already registered.
+ */
+void tevent_get_trace_signal_callback(struct tevent_context *ev,
+				      tevent_trace_signal_callback_t *cb,
+				      void *p_private_data);
+
+/**
+ * Register a callback to be called at certain trace points of timer event.
+ *
+ * @param[in] ev             Event context
+ * @param[in] cb             Trace callback
+ * @param[in] private_data   Data to be passed to callback
+ *
+ * @note The callback will be called at trace points defined by
+ * tevent_event_trace_point. Call with NULL to reset.
+ */
+void tevent_set_trace_timer_callback(struct tevent_context *ev,
+				     tevent_trace_timer_callback_t cb,
+				     void *private_data);
+
+/**
+ * Retrieve the current trace callback of timer event.
+ *
+ * @param[in] ev             Event context
+ * @param[out] cb            Registered trace callback
+ * @param[out] p_private_data  Registered data to be passed to callback
+ *
+ * @note This can be used to allow one component that wants to
+ * register a callback to respect the callback that another component
+ * has already registered.
+ */
+void tevent_get_trace_timer_callback(struct tevent_context *ev,
+				     tevent_trace_timer_callback_t *cb,
+				     void *p_private_data);
+
+/**
+ * Register a callback to be called at certain trace points of immediate event.
+ *
+ * @param[in] ev             Event context
+ * @param[in] cb             Trace callback
+ * @param[in] private_data   Data to be passed to callback
+ *
+ * @note The callback will be called at trace points defined by
+ * tevent_event_trace_point. Call with NULL to reset.
+ */
+void tevent_set_trace_immediate_callback(struct tevent_context *ev,
+					 tevent_trace_immediate_callback_t cb,
+					 void *private_data);
+
+/**
+ * Retrieve the current trace callback of immediate event.
+ *
+ * @param[in] ev             Event context
+ * @param[out] cb            Registered trace callback
+ * @param[out] p_private_data  Registered data to be passed to callback
+ *
+ * @note This can be used to allow one component that wants to
+ * register a callback to respect the callback that another component
+ * has already registered.
+ */
+void tevent_get_trace_immediate_callback(struct tevent_context *ev,
+					 tevent_trace_immediate_callback_t *cb,
+					 void *p_private_data);
+
 /**
  * @}
  */
@@ -2076,7 +2295,7 @@ void _tevent_threaded_schedule_immediate
 
 #ifdef TEVENT_DEPRECATED
 #ifndef _DEPRECATED_
-#ifdef HAVE___ATTRIBUTE__
+#if __has_attribute(deprecated) || (__GNUC__ >= 3)
 #define _DEPRECATED_ __attribute__ ((deprecated))
 #else
 #define _DEPRECATED_
diff -pruN 2:2.2.3-2/lib/tevent/tevent_immediate.c 2:2.4.2-0ubuntu1/lib/tevent/tevent_immediate.c
--- 2:2.2.3-2/lib/tevent/tevent_immediate.c	2021-10-28 15:29:47.588471700 +0000
+++ 2:2.4.2-0ubuntu1/lib/tevent/tevent_immediate.c	2022-01-24 12:18:16.334473600 +0000
@@ -33,12 +33,23 @@ static void tevent_common_immediate_canc
 {
 	const char *create_location = im->create_location;
 	bool busy = im->busy;
+	uint64_t tag = im->tag;
+	struct tevent_context *detach_ev_ctx = NULL;
 
 	if (im->destroyed) {
 		tevent_abort(im->event_ctx, "tevent_immediate use after free");
 		return;
 	}
 
+	if (im->detach_ev_ctx != NULL) {
+		detach_ev_ctx = im->detach_ev_ctx;
+		im->detach_ev_ctx = NULL;
+		tevent_trace_immediate_callback(detach_ev_ctx,
+						im,
+						TEVENT_EVENT_TRACE_DETACH);
+		return;
+	}
+
 	if (!im->event_ctx) {
 		return;
 	}
@@ -54,11 +65,20 @@ static void tevent_common_immediate_canc
 		im->cancel_fn(im);
 	}
 
+	if (busy && im->handler_name == NULL) {
+		detach_ev_ctx = im->event_ctx;
+	} else {
+		tevent_trace_immediate_callback(im->event_ctx,
+						im,
+						TEVENT_EVENT_TRACE_DETACH);
+	}
 	DLIST_REMOVE(im->event_ctx->immediate_events, im);
 
 	*im = (struct tevent_immediate) {
 		.create_location	= create_location,
 		.busy			= busy,
+		.tag			= tag,
+		.detach_ev_ctx		= detach_ev_ctx,
 	};
 
 	if (!busy) {
@@ -101,6 +121,7 @@ void tevent_common_schedule_immediate(st
 {
 	const char *create_location = im->create_location;
 	bool busy = im->busy;
+	uint64_t tag = im->tag;
 	struct tevent_wrapper_glue *glue = im->wrapper;
 
 	tevent_common_immediate_cancel(im);
@@ -118,8 +139,10 @@ void tevent_common_schedule_immediate(st
 		.create_location	= create_location,
 		.schedule_location	= location,
 		.busy			= busy,
+		.tag			= tag,
 	};
 
+	tevent_trace_immediate_callback(im->event_ctx, im, TEVENT_EVENT_TRACE_ATTACH);
 	DLIST_ADD_END(ev->immediate_events, im);
 	talloc_set_destructor(im, tevent_common_immediate_destructor);
 
@@ -163,6 +186,7 @@ int tevent_common_invoke_immediate_handl
 					cur.handler_name,
 					cur.schedule_location);
 	}
+	tevent_trace_immediate_callback(cur.event_ctx, im, TEVENT_EVENT_TRACE_BEFORE_HANDLER);
 	cur.handler(handler_ev, im, cur.private_data);
 	if (cur.wrapper != NULL) {
 		cur.wrapper->ops->after_immediate_handler(
@@ -176,6 +200,15 @@ int tevent_common_invoke_immediate_handl
 	}
 	im->busy = false;
 
+	/* The event was removed in tevent_common_immediate_cancel(). */
+	if (im->detach_ev_ctx != NULL) {
+		struct tevent_context *detach_ev_ctx = im->detach_ev_ctx;
+		im->detach_ev_ctx = NULL;
+		tevent_trace_immediate_callback(detach_ev_ctx,
+						im,
+						TEVENT_EVENT_TRACE_DETACH);
+	}
+
 	if (im->destroyed) {
 		talloc_set_destructor(im, NULL);
 		TALLOC_FREE(im);
@@ -208,3 +241,21 @@ bool tevent_common_loop_immediate(struct
 	return true;
 }
 
+
+void tevent_immediate_set_tag(struct tevent_immediate *im, uint64_t tag)
+{
+	if (im == NULL) {
+		return;
+	}
+
+	im->tag = tag;
+}
+
+uint64_t tevent_immediate_get_tag(const struct tevent_immediate *im)
+{
+	if (im == NULL) {
+		return 0;
+	}
+
+	return im->tag;
+}
diff -pruN 2:2.2.3-2/lib/tevent/tevent_internal.h 2:2.4.2-0ubuntu1/lib/tevent/tevent_internal.h
--- 2:2.2.3-2/lib/tevent/tevent_internal.h	2021-10-28 15:29:47.588471700 +0000
+++ 2:2.4.2-0ubuntu1/lib/tevent/tevent_internal.h	2022-01-24 12:18:16.334473600 +0000
@@ -204,6 +204,8 @@ struct tevent_fd {
 	/* this is private for the events_ops implementation */
 	uint64_t additional_flags;
 	void *additional_data;
+	/* custom tag that can be set by caller */
+	uint64_t tag;
 };
 
 struct tevent_timer {
@@ -221,6 +223,8 @@ struct tevent_timer {
 	const char *location;
 	/* this is private for the events_ops implementation */
 	void *additional_data;
+	/* custom tag that can be set by caller */
+	uint64_t tag;
 };
 
 struct tevent_immediate {
@@ -229,6 +233,7 @@ struct tevent_immediate {
 	struct tevent_wrapper_glue *wrapper;
 	bool busy;
 	bool destroyed;
+	struct tevent_context *detach_ev_ctx;
 	tevent_immediate_handler_t handler;
 	/* this is private for the specific handler */
 	void *private_data;
@@ -239,6 +244,8 @@ struct tevent_immediate {
 	/* this is private for the events_ops implementation */
 	void (*cancel_fn)(struct tevent_immediate *im);
 	void *additional_data;
+	/* custom tag that can be set by caller */
+	uint64_t tag;
 };
 
 struct tevent_signal {
@@ -257,6 +264,8 @@ struct tevent_signal {
 	const char *location;
 	/* this is private for the events_ops implementation */
 	void *additional_data;
+	/* custom tag that can be set by caller */
+	uint64_t tag;
 };
 
 struct tevent_threaded_context {
@@ -333,8 +342,30 @@ struct tevent_context {
 	} nesting;
 
 	struct {
-		tevent_trace_callback_t callback;
-		void *private_data;
+		struct {
+			tevent_trace_callback_t callback;
+			void *private_data;
+		} point;
+
+		struct {
+			tevent_trace_fd_callback_t callback;
+			void *private_data;
+		} fde;
+
+		struct {
+			tevent_trace_signal_callback_t callback;
+			void *private_data;
+		} se;
+
+		struct {
+			tevent_trace_timer_callback_t callback;
+			void *private_data;
+		} te;
+
+		struct {
+			tevent_trace_immediate_callback_t callback;
+			void *private_data;
+		} im;
 	} tracing;
 
 	struct {
@@ -469,3 +500,19 @@ bool tevent_port_init(void);
 
 void tevent_trace_point_callback(struct tevent_context *ev,
 				 enum tevent_trace_point);
+
+void tevent_trace_fd_callback(struct tevent_context *ev,
+			      struct tevent_fd *fde,
+			      enum tevent_event_trace_point);
+
+void tevent_trace_signal_callback(struct tevent_context *ev,
+				  struct tevent_signal *se,
+				  enum tevent_event_trace_point);
+
+void tevent_trace_timer_callback(struct tevent_context *ev,
+				 struct tevent_timer *te,
+				 enum tevent_event_trace_point);
+
+void tevent_trace_immediate_callback(struct tevent_context *ev,
+				     struct tevent_immediate *im,
+				     enum tevent_event_trace_point);
diff -pruN 2:2.2.3-2/lib/tevent/tevent_signal.c 2:2.4.2-0ubuntu1/lib/tevent/tevent_signal.c
--- 2:2.2.3-2/lib/tevent/tevent_signal.c	2021-10-28 15:29:47.588471700 +0000
+++ 2:2.4.2-0ubuntu1/lib/tevent/tevent_signal.c	2022-01-24 12:18:16.334473600 +0000
@@ -194,6 +194,7 @@ static int tevent_signal_destructor(stru
 	TALLOC_FREE(se->additional_data);
 
 	if (se->event_ctx != NULL) {
+		tevent_trace_signal_callback(se->event_ctx, se, TEVENT_EVENT_TRACE_DETACH);
 		DLIST_REMOVE(se->event_ctx->signal_events, se);
 	}
 
@@ -327,6 +328,7 @@ struct tevent_signal *tevent_common_add_
 	sigemptyset(&set);
 	sigaddset(&set, signum);
 	sigprocmask(SIG_BLOCK, &set, &oldset);
+	tevent_trace_signal_callback(se->event_ctx, se, TEVENT_EVENT_TRACE_ATTACH);
 	DLIST_ADD(sig_state->sig_handlers[signum], sl);
 	sigprocmask(SIG_SETMASK, &oldset, NULL);
 
@@ -367,6 +369,7 @@ int tevent_common_invoke_signal_handler(
 						se->handler_name,
 						se->location);
 	}
+	tevent_trace_signal_callback(se->event_ctx, se, TEVENT_EVENT_TRACE_BEFORE_HANDLER);
 	se->handler(handler_ev, se, signum, count, siginfo, se->private_data);
 	if (se->wrapper != NULL) {
 		se->wrapper->ops->after_signal_handler(
@@ -516,3 +519,21 @@ void tevent_cleanup_pending_signal_handl
 	talloc_set_destructor(se, NULL);
 	return;
 }
+
+void tevent_signal_set_tag(struct tevent_signal *se, uint64_t tag)
+{
+	if (se == NULL) {
+		return;
+	}
+
+	se->tag = tag;
+}
+
+uint64_t tevent_signal_get_tag(const struct tevent_signal *se)
+{
+	if (se == NULL) {
+		return 0;
+	}
+
+	return se->tag;
+}
diff -pruN 2:2.2.3-2/lib/tevent/tevent_timed.c 2:2.4.2-0ubuntu1/lib/tevent/tevent_timed.c
--- 2:2.2.3-2/lib/tevent/tevent_timed.c	2021-10-28 15:29:47.588471700 +0000
+++ 2:2.4.2-0ubuntu1/lib/tevent/tevent_timed.c	2022-01-24 12:18:16.334473600 +0000
@@ -1,4 +1,4 @@
-/* 
+/*
    Unix SMB/CIFS implementation.
 
    common events code for timed events
@@ -32,7 +32,7 @@
 #include "tevent_util.h"
 
 /**
-  compare two timeval structures. 
+  compare two timeval structures.
   Return -1 if tv1 < tv2
   Return 0 if tv1 == tv2
   Return 1 if tv1 > tv2
@@ -151,6 +151,8 @@ static int tevent_common_timed_destructo
 	if (te->event_ctx->last_zero_timer == te) {
 		te->event_ctx->last_zero_timer = DLIST_PREV(te);
 	}
+
+	tevent_trace_timer_callback(te->event_ctx, te, TEVENT_EVENT_TRACE_DETACH);
 	DLIST_REMOVE(te->event_ctx->timer_events, te);
 
 	te->event_ctx = NULL;
@@ -216,6 +218,7 @@ static void tevent_common_insert_timer(s
 		prev_te = cur_te;
 	}
 
+	tevent_trace_timer_callback(te->event_ctx, te, TEVENT_EVENT_TRACE_ATTACH);
 	DLIST_ADD_AFTER(ev->timer_events, te, prev_te);
 }
 
@@ -255,6 +258,7 @@ static struct tevent_timer *tevent_commo
 
 	talloc_set_destructor(te, tevent_common_timed_destructor);
 
+
 	tevent_debug(ev, TEVENT_DEBUG_TRACE,
 		     "Added timed event \"%s\": %p\n",
 		     handler_name, te);
@@ -306,6 +310,7 @@ void tevent_update_timer(struct tevent_t
 	if (ev->last_zero_timer == te) {
 		te->event_ctx->last_zero_timer = DLIST_PREV(te);
 	}
+	tevent_trace_timer_callback(te->event_ctx, te, TEVENT_EVENT_TRACE_DETACH);
 	DLIST_REMOVE(ev->timer_events, te);
 
 	te->next_event = next_event;
@@ -367,6 +372,7 @@ int tevent_common_invoke_timer_handler(s
 					te->handler_name,
 					te->location);
 	}
+	tevent_trace_timer_callback(te->event_ctx, te, TEVENT_EVENT_TRACE_BEFORE_HANDLER);
 	te->handler(handler_ev, te, current_time, te->private_data);
 	if (te->wrapper != NULL) {
 		te->wrapper->ops->after_timer_handler(
@@ -386,6 +392,11 @@ int tevent_common_invoke_timer_handler(s
 		     "Ending timer event %p \"%s\"\n",
 		     te, te->handler_name);
 
+	/* The callback was already called when freed from the handler. */
+	if (!te->destroyed) {
+		tevent_trace_timer_callback(te->event_ctx, te, TEVENT_EVENT_TRACE_DETACH);
+	}
+
 	te->wrapper = NULL;
 	te->event_ctx = NULL;
 	talloc_set_destructor(te, NULL);
@@ -447,3 +458,20 @@ struct timeval tevent_common_loop_timer_
 	return tevent_timeval_zero();
 }
 
+void tevent_timer_set_tag(struct tevent_timer *te, uint64_t tag)
+{
+	if (te == NULL) {
+		return;
+	}
+
+	te->tag = tag;
+}
+
+uint64_t tevent_timer_get_tag(const struct tevent_timer *te)
+{
+	if (te == NULL) {
+		return 0;
+	}
+
+	return te->tag;
+}
diff -pruN 2:2.2.3-2/lib/tevent/tevent_util.c 2:2.4.2-0ubuntu1/lib/tevent/tevent_util.c
--- 2:2.2.3-2/lib/tevent/tevent_util.c	2021-10-28 15:29:47.588471700 +0000
+++ 2:2.4.2-0ubuntu1/lib/tevent/tevent_util.c	2022-01-24 12:18:16.334473600 +0000
@@ -30,36 +30,6 @@
 #include <fcntl.h>
 
 /**
-  return the number of elements in a string list
-*/
-size_t ev_str_list_length(const char **list)
-{
-	size_t ret;
-	for (ret=0;list && list[ret];ret++) /* noop */ ;
-	return ret;
-}
-
-/**
-  add an entry to a string list
-*/
-const char **ev_str_list_add(const char **list, const char *s)
-{
-	size_t len = ev_str_list_length(list);
-	const char **ret;
-
-	ret = talloc_realloc(NULL, list, const char *, len+2);
-	if (ret == NULL) return NULL;
-
-	ret[len] = talloc_strdup(ret, s);
-	if (ret[len] == NULL) return NULL;
-
-	ret[len+1] = NULL;
-
-	return ret;
-}
-
-
-/**
  Set a fd into blocking/nonblocking mode. Uses POSIX O_NONBLOCK if available,
  else
   if SYSV use O_NDELAY
diff -pruN 2:2.2.3-2/lib/tevent/tevent_util.h 2:2.4.2-0ubuntu1/lib/tevent/tevent_util.h
--- 2:2.2.3-2/lib/tevent/tevent_util.h	2021-10-28 15:29:47.588471700 +0000
+++ 2:2.4.2-0ubuntu1/lib/tevent/tevent_util.h	2022-01-24 12:18:16.334473600 +0000
@@ -173,9 +173,7 @@ do { \
 
 #endif /* _DLINKLIST_H */
 
-const char **ev_str_list_add(const char **list, const char *s);
 int ev_set_blocking(int fd, bool set);
-size_t ev_str_list_length(const char **list);
 bool ev_set_close_on_exec(int fd);
 
 /* Defined here so we can build against older talloc versions that don't
diff -pruN 2:2.2.3-2/lib/tevent/wscript 2:2.4.2-0ubuntu1/lib/tevent/wscript
--- 2:2.2.3-2/lib/tevent/wscript	2021-10-28 15:29:47.588471700 +0000
+++ 2:2.4.2-0ubuntu1/lib/tevent/wscript	2022-01-24 12:18:16.334473600 +0000
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 
 APPNAME = 'tevent'
-VERSION = '0.10.2'
+VERSION = '0.11.0'
 
 import sys, os
 
@@ -15,9 +15,12 @@ out = 'bin'
 
 import wafsamba
 from wafsamba import samba_dist, samba_utils
-from waflib import Options, Logs, Context
+from waflib import Options, Logs, Context, Errors
 
-samba_dist.DIST_DIRS('lib/tevent:. lib/replace:lib/replace lib/talloc:lib/talloc buildtools:buildtools third_party/waf:third_party/waf')
+samba_dist.DIST_DIRS('''lib/tevent:. lib/replace:lib/replace
+                        lib/talloc:lib/talloc buildtools:buildtools
+                        third_party/cmocka:third_party/cmocka
+                        third_party/waf:third_party/waf''')
 
 def options(opt):
     opt.BUILTIN_DEFAULT('replace')
@@ -30,6 +33,14 @@ def configure(conf):
     conf.RECURSE('lib/replace')
     conf.RECURSE('lib/talloc')
 
+    if conf.CHECK_FOR_THIRD_PARTY():
+        conf.RECURSE('third_party/cmocka')
+    else:
+        if not conf.CHECK_CMOCKA():
+            raise Errors.WafError('cmocka development package have not been found.\nIf third_party is installed, check that it is in the proper place.')
+        else:
+            conf.define('USING_SYSTEM_CMOCKA', 1)
+
     conf.env.standalone_tevent = conf.IN_LAUNCH_DIR()
 
     if not conf.env.standalone_tevent:
@@ -71,6 +82,9 @@ def build(bld):
     bld.RECURSE('lib/replace')
     bld.RECURSE('lib/talloc')
 
+    if bld.CHECK_FOR_THIRD_PARTY():
+        bld.RECURSE('third_party/cmocka')
+
     SRC = '''tevent.c tevent_debug.c tevent_fd.c tevent_immediate.c
              tevent_queue.c tevent_req.c tevent_wrapper.c
              tevent_poll.c tevent_threads.c
@@ -121,6 +135,15 @@ def build(bld):
                          pattern='tevent.py',
                          installdir='python')
 
+    bld.SAMBA_BINARY('test_tevent_tag',
+                     source='tests/test_tevent_tag.c',
+                     deps='cmocka tevent',
+                     install=False)
+
+    bld.SAMBA_BINARY('test_tevent_trace',
+                     source='tests/test_tevent_trace.c',
+                     deps='cmocka tevent',
+                     install=False)
 
 def test(ctx):
     '''test tevent'''
@@ -130,8 +153,18 @@ def test(ctx):
     samba_utils.ADD_LD_LIBRARY_PATH('bin/shared/private')
 
     pyret = samba_utils.RUN_PYTHON_TESTS(['bindings.py'])
-    sys.exit(pyret)
 
+    unit_test_ret = 0
+    unit_tests = [
+        'test_tevent_tag',
+        'test_tevent_trace',
+    ]
+
+    for unit_test in unit_tests:
+        unit_test_cmd = os.path.join(Context.g_module.out, unit_test)
+        unit_test_ret = unit_test_ret or samba_utils.RUN_COMMAND(unit_test_cmd)
+
+    sys.exit(pyret or unit_test_ret)
 
 def dist():
     '''makes a tarball for distribution'''
Binary files 2:2.2.3-2/tests/guidindexpackv1.ldb and 2:2.4.2-0ubuntu1/tests/guidindexpackv1.ldb differ
diff -pruN 2:2.2.3-2/tests/ldb_key_value_test.c 2:2.4.2-0ubuntu1/tests/ldb_key_value_test.c
--- 2:2.2.3-2/tests/ldb_key_value_test.c	2021-11-02 22:53:09.471799400 +0000
+++ 2:2.4.2-0ubuntu1/tests/ldb_key_value_test.c	2022-01-24 12:18:16.326473700 +0000
@@ -76,8 +76,7 @@ int ldb_kv_increase_sequence_number(stru
 	return LDB_SUCCESS;
 }
 
-struct test_ctx {
-};
+struct test_ctx { uint8_t dummy; };
 
 static int setup(void **state)
 {
diff -pruN 2:2.2.3-2/tests/ldb_kv_ops_test.c 2:2.4.2-0ubuntu1/tests/ldb_kv_ops_test.c
--- 2:2.2.3-2/tests/ldb_kv_ops_test.c	2021-11-02 22:53:09.471799400 +0000
+++ 2:2.4.2-0ubuntu1/tests/ldb_kv_ops_test.c	2022-01-24 12:18:16.326473700 +0000
@@ -1717,8 +1717,11 @@ static void test_get_size(void **state)
 	/*
 	 * The tdb implementation of get_size over estimates for sparse files
 	 * which is perfectly acceptable for it's intended use.
+	 * mipsel, ia64: 9994
+	 * ppc64el, powerpc, ppc64: 13369
+	 * sparc64: 5046
 	 */
-	assert_in_range(size, 2500, 5000);
+	assert_in_range(size, 2500, 15000);
 #endif
 
 	/*
@@ -1746,8 +1749,11 @@ static void test_get_size(void **state)
 	/*
 	 * The tdb implementation of get_size over estimates for sparse files
 	 * which is perfectly acceptable for it's intended use.
+	 * mipsel, ia64: 9994
+	 * ppc64el, powerpc, ppc64: 13369
+	 * sparc64: 5046
 	 */
-	assert_in_range(size, 2500, 5000);
+	assert_in_range(size, 2500, 15000);
 #endif
 	talloc_free(tmp_ctx);
 }
diff -pruN 2:2.2.3-2/tests/ldb_lmdb_free_list_test.c 2:2.4.2-0ubuntu1/tests/ldb_lmdb_free_list_test.c
--- 2:2.2.3-2/tests/ldb_lmdb_free_list_test.c	2021-10-28 15:29:47.580471800 +0000
+++ 2:2.4.2-0ubuntu1/tests/ldb_lmdb_free_list_test.c	2022-01-24 12:18:16.326473700 +0000
@@ -77,7 +77,7 @@
 #endif /* TEST_BE */
 
 const int RECORD_SIZE = 6144;
-const int ITERATIONS = 3;
+const int ITERATIONS = 192;
 
 struct test_ctx {
 	struct tevent_context *ev;
@@ -155,9 +155,9 @@ static int setup(void **state)
 				 "@IDX_DN_GUID: GUID\n"
 				 "\n";
 	/*
-	 * Use a 64KiB DB for this test
+	 * Use a 1MiB DB for this test
 	 */
-	const char *options[] = {"lmdb_env_size:65536", NULL};
+	const char *options[] = {"lmdb_env_size:1048576", NULL};
 
 	noconn_setup((void **)&test_ctx);
 
diff -pruN 2:2.2.3-2/tests/ldb_match_test.c 2:2.4.2-0ubuntu1/tests/ldb_match_test.c
--- 2:2.2.3-2/tests/ldb_match_test.c	2021-11-02 21:52:47.529864300 +0000
+++ 2:2.4.2-0ubuntu1/tests/ldb_match_test.c	2022-01-24 12:18:16.326473700 +0000
@@ -193,9 +193,11 @@ static void test_wildcard_match(void **s
 		TEST_ENTRY("The value.......end", "*e*d*", true, true),
 		TEST_ENTRY("end", "*e*d*", true, true),
 		TEST_ENTRY("end", "  *e*d*", true, true),
+		TEST_ENTRY("1.0.0.0.0.0.0.0aaaaaaaaaaaa", "*aaaaa", true, true),
 		TEST_ENTRY("1.0..0.0.0.0.0.0.0aAaaaAAAAAAA", "*a", true,  true),
 		TEST_ENTRY("1.0.0.0.0.0.0.0.0.0.0aaaa", "*aaaaa", false, true),
 		TEST_ENTRY("1.0.0.0.0.0.0.0.0.0.0", "*0.0", true, true),
+		TEST_ENTRY("1.0.0.0.0.0.0.0.0.0.0", "*0.0.0", true, true),
 		TEST_ENTRY("1.0.0.0.0.0.0.0.0.0", "1*0*0*0*0*0*0*0*0*0", true,
 			   true),
 		TEST_ENTRY("1.0.0.0.0.0.0.0.0", "1*0*0*0*0*0*0*0*0*0", false,
diff -pruN 2:2.2.3-2/tests/ldb_parse_test.c 2:2.4.2-0ubuntu1/tests/ldb_parse_test.c
--- 2:2.2.3-2/tests/ldb_parse_test.c	2021-11-02 22:53:09.471799400 +0000
+++ 2:2.4.2-0ubuntu1/tests/ldb_parse_test.c	2022-01-24 12:18:16.326473700 +0000
@@ -27,9 +27,7 @@
 
 #include "../include/ldb.h"
 
-struct test_ctx
-{
-};
+struct test_ctx { uint8_t dummy; };
 
 static int setup(void **state)
 {
diff -pruN 2:2.2.3-2/tests/ldb_tdb_test.c 2:2.4.2-0ubuntu1/tests/ldb_tdb_test.c
--- 2:2.2.3-2/tests/ldb_tdb_test.c	2021-10-28 15:29:47.580471800 +0000
+++ 2:2.4.2-0ubuntu1/tests/ldb_tdb_test.c	2022-01-24 12:18:16.326473700 +0000
@@ -1,5 +1,5 @@
 /*
- * lmdb backend specific tests for ldb
+ * tdb backend specific tests for ldb
  *
  *  Copyright (C) Andrew Bartlett <abartlet@samba.org> 2018
  *
@@ -19,7 +19,7 @@
  */
 
 /*
- * lmdb backend specific tests for ldb
+ * tdb backend specific tests for ldb
  *
  * Setup and tear down code copied  from ldb_mod_op_test.c
  */
diff -pruN 2:2.2.3-2/tests/python/api.py 2:2.4.2-0ubuntu1/tests/python/api.py
--- 2:2.2.3-2/tests/python/api.py	2021-11-02 21:52:47.529864300 +0000
+++ 2:2.4.2-0ubuntu1/tests/python/api.py	2022-01-24 12:18:16.326473700 +0000
@@ -12,7 +12,6 @@ import ldb
 import shutil
 import errno
 
-PY3 = sys.version_info > (3, 0)
 
 TDB_PREFIX = "tdb://"
 MDB_PREFIX = "mdb://"
@@ -169,12 +168,9 @@ class SimpleLdb(LdbBaseTest):
         except UnicodeDecodeError as e:
                 raise
         except TypeError as te:
-            if PY3:
-               p3errors = ["argument 2 must be str, not bytes",
-                           "Can't convert 'bytes' object to str implicitly"]
-               self.assertIn(str(te), p3errors)
-            else:
-               raise
+           p3errors = ["argument 2 must be str, not bytes",
+                       "Can't convert 'bytes' object to str implicitly"]
+           self.assertIn(str(te), p3errors)
 
     def test_search_attrs(self):
         l = ldb.Ldb(self.url(), flags=self.flags())
@@ -3047,27 +3043,38 @@ class LdbMsgTests(TestCase):
         self.msg.dn = ldb.Dn(ldb.Ldb(), "dc=foo28")
         self.assertEqual(1, len(self.msg.items()))
 
+    def test_items(self):
+        self.msg["foo"] = ["foo"]
+        self.msg["bar"] = ["bar"]
+        try:
+            items = self.msg.items()
+        except:
+            self.fail()
+        self.assertEqual([("foo", ldb.MessageElement(["foo"])),
+                          ("bar", ldb.MessageElement(["bar"]))],
+                         items)
+
+        self.msg.dn = ldb.Dn(ldb.Ldb(), "dc=test")
+        try:
+            items = self.msg.items()
+        except:
+            self.fail()
+        self.assertEqual([("dn", ldb.Dn(ldb.Ldb(), "dc=test")),
+                          ("foo", ldb.MessageElement(["foo"])),
+                          ("bar", ldb.MessageElement(["bar"]))],
+                         items)
+
     def test_repr(self):
         self.msg.dn = ldb.Dn(ldb.Ldb(), "dc=foo29")
         self.msg["dc"] = b"foo"
-        if PY3:
-            self.assertIn(repr(self.msg), [
-                "Message({'dn': Dn('dc=foo29'), 'dc': MessageElement([b'foo'])})",
-                "Message({'dc': MessageElement([b'foo']), 'dn': Dn('dc=foo29')})",
-            ])
-            self.assertIn(repr(self.msg.text), [
-                "Message({'dn': Dn('dc=foo29'), 'dc': MessageElement([b'foo'])}).text",
-                "Message({'dc': MessageElement([b'foo']), 'dn': Dn('dc=foo29')}).text",
-            ])
-        else:
-            self.assertIn(repr(self.msg), [
-                "Message({'dn': Dn('dc=foo29'), 'dc': MessageElement(['foo'])})",
-                "Message({'dc': MessageElement(['foo']), 'dn': Dn('dc=foo29')})",
-            ])
-            self.assertIn(repr(self.msg.text), [
-                "Message({'dn': Dn('dc=foo29'), 'dc': MessageElement(['foo'])}).text",
-                "Message({'dc': MessageElement(['foo']), 'dn': Dn('dc=foo29')}).text",
-            ])
+        self.assertIn(repr(self.msg), [
+            "Message({'dn': Dn('dc=foo29'), 'dc': MessageElement([b'foo'])})",
+            "Message({'dc': MessageElement([b'foo']), 'dn': Dn('dc=foo29')})",
+        ])
+        self.assertIn(repr(self.msg.text), [
+            "Message({'dn': Dn('dc=foo29'), 'dc': MessageElement([b'foo'])}).text",
+            "Message({'dc': MessageElement([b'foo']), 'dn': Dn('dc=foo29')}).text",
+        ])
 
     def test_len(self):
         self.assertEqual(0, len(self.msg))
@@ -3336,20 +3343,12 @@ class MessageElementTests(TestCase):
 
     def test_repr(self):
         x = ldb.MessageElement([b"foo"])
-        if PY3:
-            self.assertEqual("MessageElement([b'foo'])", repr(x))
-            self.assertEqual("MessageElement([b'foo']).text", repr(x.text))
-        else:
-            self.assertEqual("MessageElement(['foo'])", repr(x))
-            self.assertEqual("MessageElement(['foo']).text", repr(x.text))
+        self.assertEqual("MessageElement([b'foo'])", repr(x))
+        self.assertEqual("MessageElement([b'foo']).text", repr(x.text))
         x = ldb.MessageElement([b"foo", b"bla"])
         self.assertEqual(2, len(x))
-        if PY3:
-            self.assertEqual("MessageElement([b'foo',b'bla'])", repr(x))
-            self.assertEqual("MessageElement([b'foo',b'bla']).text", repr(x.text))
-        else:
-            self.assertEqual("MessageElement(['foo','bla'])", repr(x))
-            self.assertEqual("MessageElement(['foo','bla']).text", repr(x.text))
+        self.assertEqual("MessageElement([b'foo',b'bla'])", repr(x))
+        self.assertEqual("MessageElement([b'foo',b'bla']).text", repr(x.text))
 
     def test_get_item(self):
         x = ldb.MessageElement([b"foo", b"bar"])
@@ -3380,12 +3379,8 @@ class MessageElementTests(TestCase):
 
     def test_extended(self):
         el = ldb.MessageElement([b"456"], ldb.FLAG_MOD_ADD, "bla")
-        if PY3:
-            self.assertEqual("MessageElement([b'456'])", repr(el))
-            self.assertEqual("MessageElement([b'456']).text", repr(el.text))
-        else:
-            self.assertEqual("MessageElement(['456'])", repr(el))
-            self.assertEqual("MessageElement(['456']).text", repr(el.text))
+        self.assertEqual("MessageElement([b'456'])", repr(el))
+        self.assertEqual("MessageElement([b'456']).text", repr(el.text))
 
     def test_bad_text(self):
         el = ldb.MessageElement(b'\xba\xdd')
diff -pruN 2:2.2.3-2/tests/python/index.py 2:2.4.2-0ubuntu1/tests/python/index.py
--- 2:2.2.3-2/tests/python/index.py	2021-10-28 15:29:47.584471700 +0000
+++ 2:2.4.2-0ubuntu1/tests/python/index.py	2022-01-24 12:18:16.326473700 +0000
@@ -30,7 +30,6 @@ import sys
 import ldb
 import shutil
 
-PY3 = sys.version_info > (3, 0)
 
 TDB_PREFIX = "tdb://"
 MDB_PREFIX = "mdb://"
diff -pruN 2:2.2.3-2/tests/test-generic.sh 2:2.4.2-0ubuntu1/tests/test-generic.sh
--- 2:2.2.3-2/tests/test-generic.sh	2021-10-28 15:29:47.584471700 +0000
+++ 2:2.4.2-0ubuntu1/tests/test-generic.sh	2022-01-24 12:18:16.326473700 +0000
@@ -86,7 +86,7 @@ $VALGRIND ldbsearch '(&(uid=uham)(title=
 # to see if the first argument is an expression or not
 $VALGRIND ldbsearch '((' uid || exit 1
 $VALGRIND ldbsearch '(objectclass=)' uid || exit 1
-$VALGRIND ldbsearch -b 'cn=Hampster Ursula,ou=Alumni Association,ou=People,o=University of Michigan,c=TEST' -s base "" sn || exit 1
+$VALGRIND ldbsearch -b 'cn=Hampster Ursula,ou=Alumni Association,ou=People,o=University of Michigan,c=TEST' --scope=base "" sn || exit 1
 
 echo "Test wildcard match"
 $VALGRIND ldbadd $LDBDIR/tests/test-wildcard.ldif  || exit 1
@@ -101,7 +101,7 @@ echo "Starting ldbtest indexed"
 $VALGRIND ldbtest --num-records 100 --num-searches 500  || exit 1
 
 echo "Testing one level search"
-count=`$VALGRIND ldbsearch -b 'ou=Groups,o=University of Michigan,c=TEST' -s one 'objectclass=*' none |grep '^dn' | wc -l`
+count=`$VALGRIND ldbsearch -b 'ou=Groups,o=University of Michigan,c=TEST' --scope=one 'objectclass=*' none |grep '^dn' | wc -l`
 if [ $count != 3 ]; then
     echo returned $count records - expected 3
     exit 1
@@ -141,7 +141,7 @@ checkcount() {
     scope=$2
     basedn=$3
     expression="$4"
-    n=`$VALGRIND ldbsearch -s "$scope" -b "$basedn" "$expression" | grep '^dn' | wc -l`
+    n=`$VALGRIND ldbsearch --scope="$scope" -b "$basedn" "$expression" | grep '^dn' | wc -l`
     if [ $n != $count ]; then
 	echo "Got $n but expected $count for $expression"
 	exit 1
diff -pruN 2:2.2.3-2/tests/test_ldb_dn.c 2:2.4.2-0ubuntu1/tests/test_ldb_dn.c
--- 2:2.2.3-2/tests/test_ldb_dn.c	2021-10-28 15:29:47.584471700 +0000
+++ 2:2.4.2-0ubuntu1/tests/test_ldb_dn.c	2022-01-24 12:18:16.326473700 +0000
@@ -190,7 +190,6 @@ static void test_ldb_dn_explode(void **s
 		 * special, invalid, linear, and ext_linear are set before
 		 * explode
 		 */
-		fprintf(stderr, "%zu «%s»: ", i, tests[i].strdn);
 		linear = ldb_dn_get_linearized(dn);
 		assert_true((linear == NULL) == (tests[i].linearized == NULL));
 		assert_string_equal(linear,
@@ -209,8 +208,8 @@ static void test_ldb_dn_explode(void **s
 
 		/* comp nums are set by explode */
 		result = ldb_dn_validate(dn);
-		fprintf(stderr, "res %i lin «%s» ext «%s»\n",
-			result, linear, ext_linear);
+		print_error("test %zu «%s»: res %i lin «%s» ext «%s»\n",
+			    i, tests[i].strdn, result, linear, ext_linear);
 		
 		assert_true(result == tests[i].explode_result);
 		assert_int_equal(ldb_dn_get_comp_num(dn),
diff -pruN 2:2.2.3-2/tests/test-tdb-features.sh 2:2.4.2-0ubuntu1/tests/test-tdb-features.sh
--- 2:2.2.3-2/tests/test-tdb-features.sh	2021-10-28 15:29:47.584471700 +0000
+++ 2:2.4.2-0ubuntu1/tests/test-tdb-features.sh	2022-01-24 12:18:16.326473700 +0000
@@ -124,10 +124,10 @@ checkone() {
     count=$1
     base="$2"
     expression="$3"
-    n=`$VALGRIND ldbsearch -s one -b "$base" "$expression" | grep '^dn' | wc -l`
+    n=`$VALGRIND ldbsearch --scope=one -b "$base" "$expression" | grep '^dn' | wc -l`
     if [ $n != $count ]; then
 	echo "Got $n but expected $count for $expression"
-	$VALGRIND ldbsearch -s one -b "$base" "$expression"
+	$VALGRIND ldbsearch --scope=one -b "$base" "$expression"
 	exit 1
     fi
     echo "OK: $count $expression"
diff -pruN 2:2.2.3-2/third_party/cmocka/wscript 2:2.4.2-0ubuntu1/third_party/cmocka/wscript
--- 2:2.2.3-2/third_party/cmocka/wscript	2021-10-28 15:29:47.812472800 +0000
+++ 2:2.4.2-0ubuntu1/third_party/cmocka/wscript	2022-01-24 12:18:16.566474700 +0000
@@ -3,6 +3,7 @@
 from waflib import Options
 
 def configure(conf):
+    conf.CHECK_FUNCS('strsignal')
     conf.CHECK_FUNCS('longjmp siglongjmp')
 
     if conf.CHECK_CMOCKA():
@@ -19,6 +20,7 @@ def build(bld):
 
     bld.SAMBA_LIBRARY('cmocka',
                       source='cmocka.c',
+                      cflags='-DHAVE_CONFIG_H=1',
                       deps=extra_libs,
                       allow_warnings=True,
                       private_library=True)
diff -pruN 2:2.2.3-2/third_party/waf/waflib/Build.py 2:2.4.2-0ubuntu1/third_party/waf/waflib/Build.py
--- 2:2.2.3-2/third_party/waf/waflib/Build.py	2021-11-02 22:53:09.735801500 +0000
+++ 2:2.4.2-0ubuntu1/third_party/waf/waflib/Build.py	2022-01-24 12:47:35.016466100 +0000
@@ -753,10 +753,12 @@ class BuildContext(Context.Context):
 		else:
 			ln = self.launch_node()
 			if ln.is_child_of(self.bldnode):
-				Logs.warn('Building from the build directory, forcing --targets=*')
+				if Logs.verbose > 1:
+					Logs.warn('Building from the build directory, forcing --targets=*')
 				ln = self.srcnode
 			elif not ln.is_child_of(self.srcnode):
-				Logs.warn('CWD %s is not under %s, forcing --targets=* (run distclean?)', ln.abspath(), self.srcnode.abspath())
+				if Logs.verbose > 1:
+					Logs.warn('CWD %s is not under %s, forcing --targets=* (run distclean?)', ln.abspath(), self.srcnode.abspath())
 				ln = self.srcnode
 
 			def is_post(tg, ln):
diff -pruN 2:2.2.3-2/third_party/waf/waflib/Configure.py 2:2.4.2-0ubuntu1/third_party/waf/waflib/Configure.py
--- 2:2.2.3-2/third_party/waf/waflib/Configure.py	2021-11-02 22:53:09.735801500 +0000
+++ 2:2.4.2-0ubuntu1/third_party/waf/waflib/Configure.py	2022-01-24 12:18:16.802476000 +0000
@@ -508,23 +508,27 @@ def find_binary(self, filenames, exts, p
 @conf
 def run_build(self, *k, **kw):
 	"""
-	Create a temporary build context to execute a build. A reference to that build
-	context is kept on self.test_bld for debugging purposes, and you should not rely
-	on it too much (read the note on the cache below).
-	The parameters given in the arguments to this function are passed as arguments for
-	a single task generator created in the build. Only three parameters are obligatory:
+	Create a temporary build context to execute a build. A temporary reference to that build
+	context is kept on self.test_bld for debugging purposes.
+	The arguments to this function are passed to a single task generator for that build.
+	Only three parameters are mandatory:
 
 	:param features: features to pass to a task generator created in the build
 	:type features: list of string
 	:param compile_filename: file to create for the compilation (default: *test.c*)
 	:type compile_filename: string
-	:param code: code to write in the filename to compile
+	:param code: input file contents
 	:type code: string
 
-	Though this function returns *0* by default, the build may set an attribute named *retval* on the
+	Though this function returns *0* by default, the build may bind attribute named *retval* on the
 	build context object to return a particular value. See :py:func:`waflib.Tools.c_config.test_exec_fun` for example.
 
-	This function also features a cache which can be enabled by the following option::
+	The temporary builds creates a temporary folder; the name of that folder is calculated
+	by hashing input arguments to this function, with the exception of :py:class:`waflib.ConfigSet.ConfigSet`
+	objects which are used for both reading and writing values.
+
+	This function also features a cache which is disabled by default; that cache relies
+	on the hash value calculated as indicated above::
 
 		def options(opt):
 			opt.add_option('--confcache', dest='confcache', default=0,
@@ -538,7 +542,10 @@ def run_build(self, *k, **kw):
 	buf = []
 	for key in sorted(kw.keys()):
 		v = kw[key]
-		if hasattr(v, '__call__'):
+		if isinstance(v, ConfigSet.ConfigSet):
+			# values are being written to, so they are excluded from contributing to the hash
+			continue
+		elif hasattr(v, '__call__'):
 			buf.append(Utils.h_fun(v))
 		else:
 			buf.append(str(v))
diff -pruN 2:2.2.3-2/third_party/waf/waflib/Context.py 2:2.4.2-0ubuntu1/third_party/waf/waflib/Context.py
--- 2:2.2.3-2/third_party/waf/waflib/Context.py	2021-11-02 22:53:09.735801500 +0000
+++ 2:2.4.2-0ubuntu1/third_party/waf/waflib/Context.py	2022-01-24 12:47:35.016466100 +0000
@@ -6,20 +6,30 @@
 Classes and functions enabling the command system
 """
 
-import os, re, imp, sys
+import os, re, sys
 from waflib import Utils, Errors, Logs
 import waflib.Node
 
+if sys.hexversion > 0x3040000:
+	import types
+	class imp(object):
+		new_module = lambda x: types.ModuleType(x)
+else:
+	import imp
+
 # the following 3 constants are updated on each new release (do not touch)
-HEXVERSION=0x2001200
+HEXVERSION=0x2001500
 """Constant updated on new releases"""
 
-WAFVERSION="2.0.18"
+WAFVERSION="2.0.21"
 """Constant updated on new releases"""
 
-WAFREVISION="314689b8994259a84f0de0aaef74d7ce91f541ad"
+WAFREVISION="edde20a6425a5c3eb6b47d5f3f5c4fbc93fed5f4"
 """Git revision when the waf version is updated"""
 
+WAFNAME="waf"
+"""Application name displayed on --help"""
+
 ABI = 20
 """Version of the build data cache file format (used in :py:const:`waflib.Context.DBFILE`)"""
 
@@ -520,7 +530,7 @@ class Context(ctx):
 		"""
 		Prints a configuration message of the form ``msg: result``.
 		The second part of the message will be in colors. The output
-		can be disabled easly by setting ``in_msg`` to a positive value::
+		can be disabled easily by setting ``in_msg`` to a positive value::
 
 			def configure(conf):
 				self.in_msg = 1
diff -pruN 2:2.2.3-2/third_party/waf/waflib/extras/boost.py 2:2.4.2-0ubuntu1/third_party/waf/waflib/extras/boost.py
--- 2:2.2.3-2/third_party/waf/waflib/extras/boost.py	2021-11-02 22:53:09.735801500 +0000
+++ 2:2.4.2-0ubuntu1/third_party/waf/waflib/extras/boost.py	2022-01-24 12:18:16.806475900 +0000
@@ -270,10 +270,12 @@ def boost_get_libs(self, *k, **kw):
 				return file
 		return None
 
+	# extensions from Tools.ccroot.lib_patterns
+	wo_ext = re.compile(r"\.(a|so|lib|dll|dylib)(\.[0-9\.]+)?$")
 	def format_lib_name(name):
 		if name.startswith('lib') and self.env.CC_NAME != 'msvc':
 			name = name[3:]
-		return name[:name.rfind('.')]
+		return wo_ext.sub("", name)
 
 	def match_libs(lib_names, is_static):
 		libs = []
@@ -522,4 +524,3 @@ def install_boost(self):
 		except:
 			continue
 install_boost.done = False
-
diff -pruN 2:2.2.3-2/third_party/waf/waflib/extras/c_dumbpreproc.py 2:2.4.2-0ubuntu1/third_party/waf/waflib/extras/c_dumbpreproc.py
--- 2:2.2.3-2/third_party/waf/waflib/extras/c_dumbpreproc.py	2021-11-02 22:53:09.735801500 +0000
+++ 2:2.4.2-0ubuntu1/third_party/waf/waflib/extras/c_dumbpreproc.py	2022-01-24 12:18:16.806475900 +0000
@@ -66,7 +66,7 @@ class dumb_parser(parser):
 			if x == c_preproc.POPFILE:
 				self.currentnode_stack.pop()
 				continue
-			self.tryfind(y)
+			self.tryfind(y, env=env)
 
 c_preproc.c_parser = dumb_parser
 
diff -pruN 2:2.2.3-2/third_party/waf/waflib/extras/clang_compilation_database.py 2:2.4.2-0ubuntu1/third_party/waf/waflib/extras/clang_compilation_database.py
--- 2:2.2.3-2/third_party/waf/waflib/extras/clang_compilation_database.py	2021-11-02 22:53:09.735801500 +0000
+++ 2:2.4.2-0ubuntu1/third_party/waf/waflib/extras/clang_compilation_database.py	2022-01-24 12:47:35.016466100 +0000
@@ -1,6 +1,7 @@
 #!/usr/bin/env python
 # encoding: utf-8
 # Christoph Koke, 2013
+# Alibek Omarov, 2019
 
 """
 Writes the c and cpp compile commands into build/compile_commands.json
@@ -8,14 +9,23 @@ see http://clang.llvm.org/docs/JSONCompi
 
 Usage:
 
-    def configure(conf):
-        conf.load('compiler_cxx')
-        ...
-        conf.load('clang_compilation_database')
+	Load this tool in `options` to be able to generate database
+	by request in command-line and before build:
+
+	$ waf clangdb
+
+	def options(opt):
+		opt.load('clang_compilation_database')
+
+	Otherwise, load only in `configure` to generate it always before build.
+
+	def configure(conf):
+		conf.load('compiler_cxx')
+		...
+		conf.load('clang_compilation_database')
 """
 
-import sys, os, json, shlex, pipes
-from waflib import Logs, TaskGen, Task
+from waflib import Logs, TaskGen, Task, Build, Scripting
 
 Task.Task.keep_last_cmd = True
 
@@ -23,63 +33,103 @@ Task.Task.keep_last_cmd = True
 @TaskGen.after_method('process_use')
 def collect_compilation_db_tasks(self):
 	"Add a compilation database entry for compiled tasks"
-	try:
-		clang_db = self.bld.clang_compilation_database_tasks
-	except AttributeError:
-		clang_db = self.bld.clang_compilation_database_tasks = []
-		self.bld.add_post_fun(write_compilation_database)
+	if not isinstance(self.bld, ClangDbContext):
+		return
 
 	tup = tuple(y for y in [Task.classes.get(x) for x in ('c', 'cxx')] if y)
 	for task in getattr(self, 'compiled_tasks', []):
 		if isinstance(task, tup):
-			clang_db.append(task)
+			self.bld.clang_compilation_database_tasks.append(task)
 
-def write_compilation_database(ctx):
-	"Write the clang compilation database as JSON"
-	database_file = ctx.bldnode.make_node('compile_commands.json')
-	Logs.info('Build commands will be stored in %s', database_file.path_from(ctx.path))
-	try:
-		root = json.load(database_file)
-	except IOError:
-		root = []
-	clang_db = dict((x['file'], x) for x in root)
-	for task in getattr(ctx, 'clang_compilation_database_tasks', []):
+class ClangDbContext(Build.BuildContext):
+	'''generates compile_commands.json by request'''
+	cmd = 'clangdb'
+	clang_compilation_database_tasks = []
+
+	def write_compilation_database(self):
+		"""
+		Write the clang compilation database as JSON
+		"""
+		database_file = self.bldnode.make_node('compile_commands.json')
+		Logs.info('Build commands will be stored in %s', database_file.path_from(self.path))
 		try:
-			cmd = task.last_cmd
-		except AttributeError:
-			continue
-		directory = getattr(task, 'cwd', ctx.variant_dir)
-		f_node = task.inputs[0]
-		filename = os.path.relpath(f_node.abspath(), directory)
-		entry = {
-			"directory": directory,
-			"arguments": cmd,
-			"file": filename,
-		}
-		clang_db[filename] = entry
-	root = list(clang_db.values())
-	database_file.write(json.dumps(root, indent=2))
-
-# Override the runnable_status function to do a dummy/dry run when the file doesn't need to be compiled.
-# This will make sure compile_commands.json is always fully up to date.
-# Previously you could end up with a partial compile_commands.json if the build failed.
-for x in ('c', 'cxx'):
-	if x not in Task.classes:
-		continue
-
-	t = Task.classes[x]
-
-	def runnable_status(self):
-		def exec_command(cmd, **kw):
-			pass
-
-		run_status = self.old_runnable_status()
-		if run_status == Task.SKIP_ME:
-			setattr(self, 'old_exec_command', getattr(self, 'exec_command', None))
-			setattr(self, 'exec_command', exec_command)
-			self.run()
-			setattr(self, 'exec_command', getattr(self, 'old_exec_command', None))
-		return run_status
+			root = database_file.read_json()
+		except IOError:
+			root = []
+		clang_db = dict((x['file'], x) for x in root)
+		for task in self.clang_compilation_database_tasks:
+			try:
+				cmd = task.last_cmd
+			except AttributeError:
+				continue
+			f_node = task.inputs[0]
+			filename = f_node.path_from(task.get_cwd())
+			entry = {
+				"directory": task.get_cwd().abspath(),
+				"arguments": cmd,
+				"file": filename,
+			}
+			clang_db[filename] = entry
+		root = list(clang_db.values())
+		database_file.write_json(root)
+
+	def execute(self):
+		"""
+		Build dry run
+		"""
+		self.restore()
+
+		if not self.all_envs:
+			self.load_envs()
+
+		self.recurse([self.run_dir])
+		self.pre_build()
+
+		# we need only to generate last_cmd, so override
+		# exec_command temporarily
+		def exec_command(self, *k, **kw):
+			return 0
+
+		for g in self.groups:
+			for tg in g:
+				try:
+					f = tg.post
+				except AttributeError:
+					pass
+				else:
+					f()
+
+				if isinstance(tg, Task.Task):
+					lst = [tg]
+				else: lst = tg.tasks
+				for tsk in lst:
+					tup = tuple(y for y in [Task.classes.get(x) for x in ('c', 'cxx')] if y)
+					if isinstance(tsk, tup):
+						old_exec = tsk.exec_command
+						tsk.exec_command = exec_command
+						tsk.run()
+						tsk.exec_command = old_exec
+
+		self.write_compilation_database()
+
+EXECUTE_PATCHED = False
+def patch_execute():
+	global EXECUTE_PATCHED
+
+	if EXECUTE_PATCHED:
+		return
+
+	def new_execute_build(self):
+		"""
+		Invoke clangdb command before build
+		"""
+		if self.cmd.startswith('build'):
+			Scripting.run_command('clangdb')
+
+		old_execute_build(self)
+
+	old_execute_build = getattr(Build.BuildContext, 'execute_build', None)
+	setattr(Build.BuildContext, 'execute_build', new_execute_build)
+	EXECUTE_PATCHED = True
 
-	setattr(t, 'old_runnable_status', getattr(t, 'runnable_status', None))
-	setattr(t, 'runnable_status', runnable_status)
+patch_execute()
diff -pruN 2:2.2.3-2/third_party/waf/waflib/extras/doxygen.py 2:2.4.2-0ubuntu1/third_party/waf/waflib/extras/doxygen.py
--- 2:2.2.3-2/third_party/waf/waflib/extras/doxygen.py	2021-11-02 22:53:09.735801500 +0000
+++ 2:2.4.2-0ubuntu1/third_party/waf/waflib/extras/doxygen.py	2022-01-24 12:18:16.806475900 +0000
@@ -69,6 +69,7 @@ def parse_doxy(txt):
 class doxygen(Task.Task):
 	vars  = ['DOXYGEN', 'DOXYFLAGS']
 	color = 'BLUE'
+	ext_in = [ '.py', '.c', '.h', '.java', '.pb.cc' ]
 
 	def runnable_status(self):
 		'''
@@ -207,10 +208,10 @@ def process_doxy(self):
 		self.bld.fatal('doxygen file %s not found' % self.doxyfile)
 
 	# the task instance
-	dsk = self.create_task('doxygen', node)
+	dsk = self.create_task('doxygen', node, always_run=getattr(self, 'always', False))
 
 	if getattr(self, 'doxy_tar', None):
-		tsk = self.create_task('tar')
+		tsk = self.create_task('tar', always_run=getattr(self, 'always', False))
 		tsk.input_tasks = [dsk]
 		tsk.set_outputs(self.path.find_or_declare(self.doxy_tar))
 		if self.doxy_tar.endswith('bz2'):
diff -pruN 2:2.2.3-2/third_party/waf/waflib/extras/file_to_object.py 2:2.4.2-0ubuntu1/third_party/waf/waflib/extras/file_to_object.py
--- 2:2.2.3-2/third_party/waf/waflib/extras/file_to_object.py	2021-11-02 22:53:09.735801500 +0000
+++ 2:2.4.2-0ubuntu1/third_party/waf/waflib/extras/file_to_object.py	2022-01-24 12:18:16.806475900 +0000
@@ -31,7 +31,7 @@ Known issues:
 
 """
 
-import os
+import os, sys
 from waflib import Task, TaskGen, Errors
 
 def filename_c_escape(x):
@@ -95,12 +95,17 @@ class file_to_object_c(Task.Task):
 
 		name = "_binary_" + "".join(name)
 
+		def char_to_num(ch):
+			if sys.version_info[0] < 3:
+				return ord(ch)
+			return ch
+
 		data = self.inputs[0].read('rb')
 		lines, line = [], []
 		for idx_byte, byte in enumerate(data):
 			line.append(byte)
 			if len(line) > 15 or idx_byte == size-1:
-				lines.append(", ".join(("0x%02x" % ord(x)) for x in line))
+				lines.append(", ".join(("0x%02x" % char_to_num(x)) for x in line))
 				line = []
 		data = ",\n ".join(lines)
 
diff -pruN 2:2.2.3-2/third_party/waf/waflib/extras/gccdeps.py 2:2.4.2-0ubuntu1/third_party/waf/waflib/extras/gccdeps.py
--- 2:2.2.3-2/third_party/waf/waflib/extras/gccdeps.py	2021-11-02 22:53:09.735801500 +0000
+++ 2:2.4.2-0ubuntu1/third_party/waf/waflib/extras/gccdeps.py	2022-01-24 12:18:16.806475900 +0000
@@ -27,7 +27,7 @@ if not c_preproc.go_absolute:
 	gccdeps_flags = ['-MMD']
 
 # Third-party tools are allowed to add extra names in here with append()
-supported_compilers = ['gcc', 'icc', 'clang']
+supported_compilers = ['gas', 'gcc', 'icc', 'clang']
 
 def scan(self):
 	if not self.__class__.__name__ in self.env.ENABLE_GCCDEPS:
@@ -163,10 +163,25 @@ def post_run(self):
 def sig_implicit_deps(self):
 	if not self.__class__.__name__ in self.env.ENABLE_GCCDEPS:
 		return super(self.derived_gccdeps, self).sig_implicit_deps()
+	bld = self.generator.bld
+
 	try:
-		return Task.Task.sig_implicit_deps(self)
-	except Errors.WafError:
-		return Utils.SIG_NIL
+		return self.compute_sig_implicit_deps()
+	except Errors.TaskNotReady:
+		raise ValueError("Please specify the build order precisely with gccdeps (asm/c/c++ tasks)")
+	except EnvironmentError:
+		# If a file is renamed, assume the dependencies are stale and must be recalculated
+		for x in bld.node_deps.get(self.uid(), []):
+			if not x.is_bld() and not x.exists():
+				try:
+					del x.parent.children[x.name]
+				except KeyError:
+					pass
+
+	key = self.uid()
+	bld.node_deps[key] = []
+	bld.raw_deps[key] = []
+	return Utils.SIG_NIL
 
 def wrap_compiled_task(classname):
 	derived_class = type(classname, (Task.classes[classname],), {})
@@ -175,14 +190,14 @@ def wrap_compiled_task(classname):
 	derived_class.scan = scan
 	derived_class.sig_implicit_deps = sig_implicit_deps
 
-for k in ('c', 'cxx'):
+for k in ('asm', 'c', 'cxx'):
 	if k in Task.classes:
 		wrap_compiled_task(k)
 
 @before_method('process_source')
 @feature('force_gccdeps')
 def force_gccdeps(self):
-	self.env.ENABLE_GCCDEPS = ['c', 'cxx']
+	self.env.ENABLE_GCCDEPS = ['asm', 'c', 'cxx']
 
 def configure(conf):
 	# in case someone provides a --enable-gccdeps command-line option
@@ -191,6 +206,15 @@ def configure(conf):
 
 	global gccdeps_flags
 	flags = conf.env.GCCDEPS_FLAGS or gccdeps_flags
+	if conf.env.ASM_NAME in supported_compilers:
+		try:
+			conf.check(fragment='', features='asm force_gccdeps', asflags=flags, compile_filename='test.S', msg='Checking for asm flags %r' % ''.join(flags))
+		except Errors.ConfigurationError:
+			pass
+		else:
+			conf.env.append_value('ASFLAGS', flags)
+			conf.env.append_unique('ENABLE_GCCDEPS', 'asm')
+
 	if conf.env.CC_NAME in supported_compilers:
 		try:
 			conf.check(fragment='int main() { return 0; }', features='c force_gccdeps', cflags=flags, msg='Checking for c flags %r' % ''.join(flags))
diff -pruN 2:2.2.3-2/third_party/waf/waflib/extras/javatest.py 2:2.4.2-0ubuntu1/third_party/waf/waflib/extras/javatest.py
--- 2:2.2.3-2/third_party/waf/waflib/extras/javatest.py	2021-11-02 22:53:09.735801500 +0000
+++ 2:2.4.2-0ubuntu1/third_party/waf/waflib/extras/javatest.py	2022-01-24 12:18:16.806475900 +0000
@@ -1,6 +1,6 @@
 #! /usr/bin/env python
 # encoding: utf-8
-# Federico Pellegrin, 2017 (fedepell)
+# Federico Pellegrin, 2019 (fedepell)
 
 """
 Provides Java Unit test support using :py:class:`waflib.Tools.waf_unit_test.utest`
@@ -11,6 +11,10 @@ standard waf unit test environment. It h
 but should be easily expandable to other frameworks given the flexibility of
 ut_str provided by the standard waf unit test environment.
 
+The extra takes care also of managing non-java dependencies (ie. C/C++ libraries
+using JNI or Python modules via JEP) and setting up the environment needed to run
+them.
+
 Example usage:
 
 def options(opt):
@@ -20,15 +24,15 @@ def configure(conf):
 	conf.load('java javatest')
 
 def build(bld):
-	
+
 	[ ... mainprog is built here ... ]
 
 	bld(features = 'javac javatest',
-		srcdir     = 'test/', 
-		outdir     = 'test', 
+		srcdir     = 'test/',
+		outdir     = 'test',
 		sourcepath = ['test'],
-		classpath  = [ 'src' ], 
-		basedir    = 'test', 
+		classpath  = [ 'src' ],
+		basedir    = 'test',
 		use = ['JAVATEST', 'mainprog'], # mainprog is the program being tested in src/
 		ut_str = 'java -cp ${CLASSPATH} ${JTRUNNER} ${SRC}',
 		jtest_source = bld.path.ant_glob('test/*.xml'),
@@ -53,10 +57,107 @@ The runner class presence on the system
 """
 
 import os
-from waflib import Task, TaskGen, Options
+from waflib import Task, TaskGen, Options, Errors, Utils, Logs
+from waflib.Tools import ccroot
+
+JAR_RE = '**/*'
+
+def _process_use_rec(self, name):
+	"""
+	Recursively process ``use`` for task generator with name ``name``..
+	Used by javatest_process_use.
+	"""
+	if name in self.javatest_use_not or name in self.javatest_use_seen:
+		return
+	try:
+		tg = self.bld.get_tgen_by_name(name)
+	except Errors.WafError:
+		self.javatest_use_not.add(name)
+		return
+
+	self.javatest_use_seen.append(name)
+	tg.post()
+
+	for n in self.to_list(getattr(tg, 'use', [])):
+		_process_use_rec(self, n)
 
 @TaskGen.feature('javatest')
-@TaskGen.after_method('apply_java', 'use_javac_files', 'set_classpath')
+@TaskGen.after_method('process_source', 'apply_link', 'use_javac_files')
+def javatest_process_use(self):
+	"""
+	Process the ``use`` attribute which contains a list of task generator names and store
+	paths that later is used to populate the unit test runtime environment.
+	"""
+	self.javatest_use_not = set()
+	self.javatest_use_seen = []
+	self.javatest_libpaths = [] # strings or Nodes
+	self.javatest_pypaths = [] # strings or Nodes
+	self.javatest_dep_nodes = []
+
+	names = self.to_list(getattr(self, 'use', []))
+	for name in names:
+		_process_use_rec(self, name)
+
+	def extend_unique(lst, varlst):
+		ext = []
+		for x in varlst:
+			if x not in lst:
+				ext.append(x)
+		lst.extend(ext)
+
+	# Collect type specific info needed to construct a valid runtime environment
+	# for the test.
+	for name in self.javatest_use_seen:
+		tg = self.bld.get_tgen_by_name(name)
+
+		# Python-Java embedding crosstools such as JEP
+		if 'py' in tg.features:
+			# Python dependencies are added to PYTHONPATH
+			pypath = getattr(tg, 'install_from', tg.path)
+
+			if 'buildcopy' in tg.features:
+				# Since buildcopy is used we assume that PYTHONPATH in build should be used,
+				# not source
+				extend_unique(self.javatest_pypaths, [pypath.get_bld().abspath()])
+
+				# Add buildcopy output nodes to dependencies
+				extend_unique(self.javatest_dep_nodes, [o for task in getattr(tg, 'tasks', []) for o in getattr(task, 'outputs', [])])
+			else:
+				# If buildcopy is not used, depend on sources instead
+				extend_unique(self.javatest_dep_nodes, tg.source)
+				extend_unique(self.javatest_pypaths, [pypath.abspath()])
+
+
+		if getattr(tg, 'link_task', None):
+			# For tasks with a link_task (C, C++, D et.c.) include their library paths:
+			if not isinstance(tg.link_task, ccroot.stlink_task):
+				extend_unique(self.javatest_dep_nodes, tg.link_task.outputs)
+				extend_unique(self.javatest_libpaths, tg.link_task.env.LIBPATH)
+
+				if 'pyext' in tg.features:
+					# If the taskgen is extending Python we also want to add the interpreter libpath.
+					extend_unique(self.javatest_libpaths, tg.link_task.env.LIBPATH_PYEXT)
+				else:
+					# Only add to libpath if the link task is not a Python extension
+					extend_unique(self.javatest_libpaths, [tg.link_task.outputs[0].parent.abspath()])
+
+		if 'javac' in tg.features or 'jar' in tg.features:
+			if hasattr(tg, 'jar_task'):
+				# For Java JAR tasks depend on generated JAR
+				extend_unique(self.javatest_dep_nodes, tg.jar_task.outputs)
+			else:
+				# For Java non-JAR ones we need to glob generated files (Java output files are not predictable)
+				if hasattr(tg, 'outdir'):
+					base_node = tg.outdir
+				else:
+					base_node = tg.path.get_bld()
+
+				self.javatest_dep_nodes.extend([dx for dx in base_node.ant_glob(JAR_RE, remove=False, quiet=True)])
+
+
+
+@TaskGen.feature('javatest')
+@TaskGen.after_method('apply_java', 'use_javac_files', 'set_classpath', 'javatest_process_use')
 def make_javatest(self):
 	"""
 	Creates a ``utest`` task with a populated environment for Java Unit test execution
@@ -65,6 +166,9 @@ def make_javatest(self):
 	tsk = self.create_task('utest')
 	tsk.set_run_after(self.javac_task)
 
+	# Dependencies from recursive use analysis
+	tsk.dep_nodes.extend(self.javatest_dep_nodes)
+
 	# Put test input files as waf_unit_test relies on that for some prints and log generation
 	# If jtest_source is there, this is specially useful for passing XML for TestNG
 	# that contain test specification, use that as inputs, otherwise test sources
@@ -97,6 +201,21 @@ def make_javatest(self):
 
 	if not hasattr(self, 'ut_env'):
 		self.ut_env = dict(os.environ)
+		def add_paths(var, lst):
+			# Add list of paths to a variable, lst can contain strings or nodes
+			lst = [ str(n) for n in lst ]
+			Logs.debug("ut: %s: Adding paths %s=%s", self, var, lst)
+			self.ut_env[var] = os.pathsep.join(lst) + os.pathsep + self.ut_env.get(var, '')
+
+		add_paths('PYTHONPATH', self.javatest_pypaths)
+
+		if Utils.is_win32:
+			add_paths('PATH', self.javatest_libpaths)
+		elif Utils.unversioned_sys_platform() == 'darwin':
+			add_paths('DYLD_LIBRARY_PATH', self.javatest_libpaths)
+			add_paths('LD_LIBRARY_PATH', self.javatest_libpaths)
+		else:
+			add_paths('LD_LIBRARY_PATH', self.javatest_libpaths)
 
 def configure(ctx):
 	cp = ctx.env.CLASSPATH or '.'
diff -pruN 2:2.2.3-2/third_party/waf/waflib/extras/msvcdeps.py 2:2.4.2-0ubuntu1/third_party/waf/waflib/extras/msvcdeps.py
--- 2:2.2.3-2/third_party/waf/waflib/extras/msvcdeps.py	2021-11-02 22:53:09.735801500 +0000
+++ 2:2.4.2-0ubuntu1/third_party/waf/waflib/extras/msvcdeps.py	2022-01-24 12:18:16.806475900 +0000
@@ -150,11 +150,25 @@ def scan(self):
 def sig_implicit_deps(self):
 	if self.env.CC_NAME not in supported_compilers:
 		return super(self.derived_msvcdeps, self).sig_implicit_deps()
+	bld = self.generator.bld
 
 	try:
-		return Task.Task.sig_implicit_deps(self)
-	except Errors.WafError:
-		return Utils.SIG_NIL
+		return self.compute_sig_implicit_deps()
+	except Errors.TaskNotReady:
+		raise ValueError("Please specify the build order precisely with msvcdeps (c/c++ tasks)")
+	except EnvironmentError:
+		# If a file is renamed, assume the dependencies are stale and must be recalculated
+		for x in bld.node_deps.get(self.uid(), []):
+			if not x.is_bld() and not x.exists():
+				try:
+					del x.parent.children[x.name]
+				except KeyError:
+					pass
+
+	key = self.uid()
+	bld.node_deps[key] = []
+	bld.raw_deps[key] = []
+	return Utils.SIG_NIL
 
 def exec_command(self, cmd, **kw):
 	if self.env.CC_NAME not in supported_compilers:
@@ -211,11 +225,14 @@ def exec_command(self, cmd, **kw):
 			# get one from the exception object
 			ret = getattr(e, 'returncode', 1)
 
+		Logs.debug('msvcdeps: Running for: %s' % self.inputs[0])
 		for line in raw_out.splitlines():
 			if line.startswith(INCLUDE_PATTERN):
-				inc_path = line[len(INCLUDE_PATTERN):].strip()
+				# Only strip whitespace after log to preserve
+				# dependency structure in debug output
+				inc_path = line[len(INCLUDE_PATTERN):]
 				Logs.debug('msvcdeps: Regex matched %s', inc_path)
-				self.msvcdeps_paths.append(inc_path)
+				self.msvcdeps_paths.append(inc_path.strip())
 			else:
 				out.append(line)
 
diff -pruN 2:2.2.3-2/third_party/waf/waflib/extras/msvc_pdb.py 2:2.4.2-0ubuntu1/third_party/waf/waflib/extras/msvc_pdb.py
--- 2:2.2.3-2/third_party/waf/waflib/extras/msvc_pdb.py	1970-01-01 00:00:00.000000000 +0000
+++ 2:2.4.2-0ubuntu1/third_party/waf/waflib/extras/msvc_pdb.py	2022-01-24 12:18:16.806475900 +0000
@@ -0,0 +1,46 @@
+#!/usr/bin/env python
+# encoding: utf-8
+# Rafaël Kooi 2019
+
+from waflib import TaskGen
+
+@TaskGen.feature('c', 'cxx', 'fc')
+@TaskGen.after_method('propagate_uselib_vars')
+def add_pdb_per_object(self):
+	"""For msvc/fortran, specify a unique compile pdb per object, to work
+	around LNK4099. Flags are updated with a unique /Fd flag based on the
+	task output name. This is separate from the link pdb.
+	"""
+	if not hasattr(self, 'compiled_tasks'):
+		return
+
+	link_task = getattr(self, 'link_task', None)
+
+	for task in self.compiled_tasks:
+		if task.inputs and task.inputs[0].name.lower().endswith('.rc'):
+			continue
+
+		add_pdb = False
+		for flagname in ('CFLAGS', 'CXXFLAGS', 'FCFLAGS'):
+			# several languages may be used at once
+			for flag in task.env[flagname]:
+				if flag[1:].lower() == 'zi':
+					add_pdb = True
+					break
+
+		if add_pdb:
+			node = task.outputs[0].change_ext('.pdb')
+			pdb_flag = '/Fd:' + node.abspath()
+
+			for flagname in ('CFLAGS', 'CXXFLAGS', 'FCFLAGS'):
+				buf = [pdb_flag]
+				for flag in task.env[flagname]:
+					if flag[1:3] == 'Fd' or flag[1:].lower() == 'fs' or flag[1:].lower() == 'mp':
+						continue
+					buf.append(flag)
+				task.env[flagname] = buf
+
+			if link_task and not node in link_task.dep_nodes:
+				link_task.dep_nodes.append(node)
+			if not node in task.outputs:
+				task.outputs.append(node)
diff -pruN 2:2.2.3-2/third_party/waf/waflib/extras/pch.py 2:2.4.2-0ubuntu1/third_party/waf/waflib/extras/pch.py
--- 2:2.2.3-2/third_party/waf/waflib/extras/pch.py	2021-11-02 22:53:09.735801500 +0000
+++ 2:2.4.2-0ubuntu1/third_party/waf/waflib/extras/pch.py	2022-01-24 12:18:16.806475900 +0000
@@ -90,7 +90,7 @@ def apply_pch(self):
 
 	if getattr(self, 'name', None):
 		try:
-			task = self.bld.pch_tasks["%s.%s" % (self.name, self.idx)]
+			task = self.bld.pch_tasks[self.name]
 			self.bld.fatal("Duplicated 'pch' task with name %r" % "%s.%s" % (self.name, self.idx))
 		except KeyError:
 			pass
@@ -104,7 +104,7 @@ def apply_pch(self):
 
 	self.pch_task = task
 	if getattr(self, 'name', None):
-		self.bld.pch_tasks["%s.%s" % (self.name, self.idx)] = task
+		self.bld.pch_tasks[self.name] = task
 
 @TaskGen.feature('cxx')
 @TaskGen.after_method('process_source', 'propagate_uselib_vars')
diff -pruN 2:2.2.3-2/third_party/waf/waflib/extras/pytest.py 2:2.4.2-0ubuntu1/third_party/waf/waflib/extras/pytest.py
--- 2:2.2.3-2/third_party/waf/waflib/extras/pytest.py	2021-11-02 22:53:09.735801500 +0000
+++ 2:2.4.2-0ubuntu1/third_party/waf/waflib/extras/pytest.py	2022-01-24 12:18:16.806475900 +0000
@@ -40,6 +40,8 @@ the following environment variables for
 
    - `pytest_libpath` attribute is used to manually specify additional linker paths.
 
+3. Java class search path (CLASSPATH) of any Java/Javalike dependency
+
 Note: `pytest` cannot automatically determine the correct `PYTHONPATH` for `pyext` taskgens
       because the extension might be part of a Python package or used standalone:
 
@@ -119,6 +121,7 @@ def pytest_process_use(self):
 	self.pytest_use_seen = []
 	self.pytest_paths = [] # strings or Nodes
 	self.pytest_libpaths = [] # strings or Nodes
+	self.pytest_javapaths = [] # strings or Nodes
 	self.pytest_dep_nodes = []
 
 	names = self.to_list(getattr(self, 'use', []))
@@ -157,6 +160,17 @@ def pytest_process_use(self):
 				extend_unique(self.pytest_dep_nodes, tg.source)
 				extend_unique(self.pytest_paths, [pypath.abspath()])
 
+		if 'javac' in tg.features:
+			# If a JAR is generated point to that, otherwise to directory
+			if getattr(tg, 'jar_task', None):
+				extend_unique(self.pytest_javapaths, [tg.jar_task.outputs[0].abspath()])
+			else:
+				extend_unique(self.pytest_javapaths, [tg.path.get_bld()])
+
+			# And add respective dependencies if present
+			if tg.use_lst:
+				extend_unique(self.pytest_javapaths, tg.use_lst)
+
 		if getattr(tg, 'link_task', None):
 			# For tasks with a link_task (C, C++, D et.c.) include their library paths:
 			if not isinstance(tg.link_task, ccroot.stlink_task):
@@ -212,8 +226,9 @@ def make_pytest(self):
 			Logs.debug("ut: %s: Adding paths %s=%s", self, var, lst)
 			self.ut_env[var] = os.pathsep.join(lst) + os.pathsep + self.ut_env.get(var, '')
 
-		# Prepend dependency paths to PYTHONPATH and LD_LIBRARY_PATH
+		# Prepend dependency paths to PYTHONPATH, CLASSPATH and LD_LIBRARY_PATH
 		add_paths('PYTHONPATH', self.pytest_paths)
+		add_paths('CLASSPATH', self.pytest_javapaths)
 
 		if Utils.is_win32:
 			add_paths('PATH', self.pytest_libpaths)
diff -pruN 2:2.2.3-2/third_party/waf/waflib/extras/sphinx.py 2:2.4.2-0ubuntu1/third_party/waf/waflib/extras/sphinx.py
--- 2:2.2.3-2/third_party/waf/waflib/extras/sphinx.py	2021-11-02 22:53:09.735801500 +0000
+++ 2:2.4.2-0ubuntu1/third_party/waf/waflib/extras/sphinx.py	2022-01-24 12:18:16.806475900 +0000
@@ -20,7 +20,7 @@ def build(bld):
 
 from waflib.Node import Node
 from waflib import Utils
-from waflib.Task import Task
+from waflib import Task
 from waflib.TaskGen import feature, after_method
 
 
@@ -55,13 +55,9 @@ def build_sphinx(self):
     sphinx_build_task.set_outputs(self.path.get_bld())
 
     # the sphinx-build results are in <build + output_format> directory
-    sphinx_output_directory = self.path.get_bld().make_node(self.env.SPHINX_OUTPUT_FORMAT)
-    sphinx_output_directory.mkdir()
+    self.sphinx_output_directory = self.path.get_bld().make_node(self.env.SPHINX_OUTPUT_FORMAT)
+    self.sphinx_output_directory.mkdir()
     Utils.def_attrs(self, install_path=get_install_path(self))
-    self.add_install_files(install_to=self.install_path,
-                           install_from=sphinx_output_directory.ant_glob('**/*'),
-                           cwd=sphinx_output_directory,
-                           relative_trick=True)
 
 
 def get_install_path(tg):
@@ -73,9 +69,37 @@ def get_install_path(tg):
         return tg.env.DOCDIR
 
 
-class SphinxBuildingTask(Task):
+class SphinxBuildingTask(Task.Task):
     color = 'BOLD'
     run_str = '${SPHINX_BUILD} -M ${SPHINX_OUTPUT_FORMAT} ${SRC} ${TGT} ${SPHINX_OPTIONS}'
 
     def keyword(self):
         return 'Compiling (%s)' % self.env.SPHINX_OUTPUT_FORMAT
+
+    def runnable_status(self):
+
+        for x in self.run_after:
+            if not x.hasrun:
+                return Task.ASK_LATER
+
+        self.signature()
+        ret = Task.Task.runnable_status(self)
+        if ret == Task.SKIP_ME:
+            # in case the files were removed
+            self.add_install()
+        return ret
+
+
+    def post_run(self):
+        self.add_install()
+        return Task.Task.post_run(self)
+
+
+    def add_install(self):
+        nodes = self.generator.sphinx_output_directory.ant_glob('**/*', quiet=True)
+        self.outputs += nodes
+        self.generator.add_install_files(install_to=self.generator.install_path,
+                                         install_from=nodes,
+                                         postpone=False,
+                                         cwd=self.generator.sphinx_output_directory,
+                                         relative_trick=True)
diff -pruN 2:2.2.3-2/third_party/waf/waflib/extras/wafcache.py 2:2.4.2-0ubuntu1/third_party/waf/waflib/extras/wafcache.py
--- 2:2.2.3-2/third_party/waf/waflib/extras/wafcache.py	1970-01-01 00:00:00.000000000 +0000
+++ 2:2.4.2-0ubuntu1/third_party/waf/waflib/extras/wafcache.py	2022-01-24 12:47:35.016466100 +0000
@@ -0,0 +1,550 @@
+#! /usr/bin/env python
+# encoding: utf-8
+# Thomas Nagy, 2019 (ita)
+
+"""
+Filesystem-based cache system to share and re-use build artifacts
+
+Cache access operations (copy to and from) are delegated to
+independent pre-forked worker subprocesses.
+
+The following environment variables may be set:
+* WAFCACHE: several possibilities:
+  - File cache:
+    absolute path of the waf cache (~/.cache/wafcache_user,
+    where `user` represents the currently logged-in user)
+  - URL to a cache server, for example:
+    export WAFCACHE=http://localhost:8080/files/
+    in that case, GET/POST requests are made to urls of the form
+    http://localhost:8080/files/000000000/0 (cache management is delegated to the server)
+  - GCS, S3 or MINIO bucket
+    gs://my-bucket/    (uses gsutil command line tool or WAFCACHE_CMD)
+    s3://my-bucket/    (uses aws command line tool or WAFCACHE_CMD)
+    minio://my-bucket/ (uses mc command line tool or WAFCACHE_CMD)
+* WAFCACHE_CMD: bucket upload/download command, for example:
+    WAFCACHE_CMD="gsutil cp %{SRC} %{TGT}"
+  Note that the WAFCACHE bucket value is used for the source or destination
+  depending on the operation (upload or download). For example, with:
+    WAFCACHE="gs://mybucket/"
+  the following commands may be run:
+    gsutil cp build/myprogram  gs://mybucket/aa/aaaaa/1
+    gsutil cp gs://mybucket/bb/bbbbb/2 build/somefile
+* WAFCACHE_NO_PUSH: if set, disables pushing to the cache
+* WAFCACHE_VERBOSITY: if set, displays more detailed cache operations
+
+File cache specific options:
+  Files are copied using hard links by default; if the cache is located
+  onto another partition, the system switches to file copies instead.
+* WAFCACHE_TRIM_MAX_FOLDER: maximum amount of tasks to cache (1M)
+* WAFCACHE_EVICT_MAX_BYTES: maximum amount of cache size in bytes (10GB)
+* WAFCACHE_EVICT_INTERVAL_MINUTES: minimum time interval to try
+                                   and trim the cache (3 minutess)
+
+Usage::
+
+	def build(bld):
+		bld.load('wafcache')
+		...
+
+To troubleshoot::
+
+	waf clean build --zones=wafcache
+"""
+
+import atexit, base64, errno, fcntl, getpass, os, re, shutil, sys, time, traceback, urllib3, shlex
+try:
+	import subprocess32 as subprocess
+except ImportError:
+	import subprocess
+
+base_cache = os.path.expanduser('~/.cache/')
+if not os.path.isdir(base_cache):
+	base_cache = '/tmp/'
+default_wafcache_dir = os.path.join(base_cache, 'wafcache_' + getpass.getuser())
+
+CACHE_DIR = os.environ.get('WAFCACHE', default_wafcache_dir)
+WAFCACHE_CMD = os.environ.get('WAFCACHE_CMD')
+TRIM_MAX_FOLDERS = int(os.environ.get('WAFCACHE_TRIM_MAX_FOLDER', 1000000))
+EVICT_INTERVAL_MINUTES = int(os.environ.get('WAFCACHE_EVICT_INTERVAL_MINUTES', 3))
+EVICT_MAX_BYTES = int(os.environ.get('WAFCACHE_EVICT_MAX_BYTES', 10**10))
+WAFCACHE_NO_PUSH = 1 if os.environ.get('WAFCACHE_NO_PUSH') else 0
+WAFCACHE_VERBOSITY = 1 if os.environ.get('WAFCACHE_VERBOSITY') else 0
+OK = "ok"
+
+re_waf_cmd = re.compile('(?P<src>%{SRC})|(?P<tgt>%{TGT})')
+
+try:
+	import cPickle
+except ImportError:
+	import pickle as cPickle
+
+if __name__ != '__main__':
+	from waflib import Task, Logs, Utils, Build
+
+def can_retrieve_cache(self):
+	"""
+	New method for waf Task classes
+	"""
+	if not self.outputs:
+		return False
+
+	self.cached = False
+
+	sig = self.signature()
+	ssig = Utils.to_hex(self.uid() + sig)
+
+	files_to = [node.abspath() for node in self.outputs]
+	err = cache_command(ssig, [], files_to)
+	if err.startswith(OK):
+		if WAFCACHE_VERBOSITY:
+			Logs.pprint('CYAN', '  Fetched %r from cache' % files_to)
+		else:
+			Logs.debug('wafcache: fetched %r from cache', files_to)
+	else:
+		if WAFCACHE_VERBOSITY:
+			Logs.pprint('YELLOW', '  No cache entry %s' % files_to)
+		else:
+			Logs.debug('wafcache: No cache entry %s: %s', files_to, err)
+		return False
+
+	self.cached = True
+	return True
+
+def put_files_cache(self):
+	"""
+	New method for waf Task classes
+	"""
+	if WAFCACHE_NO_PUSH or getattr(self, 'cached', None) or not self.outputs:
+		return
+
+	bld = self.generator.bld
+	sig = self.signature()
+	ssig = Utils.to_hex(self.uid() + sig)
+
+	files_from = [node.abspath() for node in self.outputs]
+	err = cache_command(ssig, files_from, [])
+
+	if err.startswith(OK):
+		if WAFCACHE_VERBOSITY:
+			Logs.pprint('CYAN', '  Successfully uploaded %s to cache' % files_from)
+		else:
+			Logs.debug('wafcache: Successfully uploaded %r to cache', files_from)
+	else:
+		if WAFCACHE_VERBOSITY:
+			Logs.pprint('RED', '  Error caching step results %s: %s' % (files_from, err))
+		else:
+			Logs.debug('wafcache: Error caching results %s: %s', files_from, err)
+
+	bld.task_sigs[self.uid()] = self.cache_sig
+
+def hash_env_vars(self, env, vars_lst):
+	"""
+	Reimplement BuildContext.hash_env_vars so that the resulting hash does not depend on local paths
+	"""
+	if not env.table:
+		env = env.parent
+		if not env:
+			return Utils.SIG_NIL
+
+	idx = str(id(env)) + str(vars_lst)
+	try:
+		cache = self.cache_env
+	except AttributeError:
+		cache = self.cache_env = {}
+	else:
+		try:
+			return self.cache_env[idx]
+		except KeyError:
+			pass
+
+	v = str([env[a] for a in vars_lst])
+	v = v.replace(self.srcnode.abspath().__repr__()[:-1], '')
+	m = Utils.md5()
+	m.update(v.encode())
+	ret = m.digest()
+
+	Logs.debug('envhash: %r %r', ret, v)
+
+	cache[idx] = ret
+
+	return ret
+
+def uid(self):
+	"""
+	Reimplement Task.uid() so that the signature does not depend on local paths
+	"""
+	try:
+		return self.uid_
+	except AttributeError:
+		m = Utils.md5()
+		src = self.generator.bld.srcnode
+		up = m.update
+		up(self.__class__.__name__.encode())
+		for x in self.inputs + self.outputs:
+			up(x.path_from(src).encode())
+		self.uid_ = m.digest()
+		return self.uid_
+
+
+def make_cached(cls):
+	"""
+	Enable the waf cache for a given task class
+	"""
+	if getattr(cls, 'nocache', None) or getattr(cls, 'has_cache', False):
+		return
+
+	m1 = getattr(cls, 'run', None)
+	def run(self):
+		if getattr(self, 'nocache', False):
+			return m1(self)
+		if self.can_retrieve_cache():
+			return 0
+		return m1(self)
+	cls.run = run
+
+	m2 = getattr(cls, 'post_run', None)
+	def post_run(self):
+		if getattr(self, 'nocache', False):
+			return m2(self)
+		ret = m2(self)
+		self.put_files_cache()
+		if hasattr(self, 'chmod'):
+			for node in self.outputs:
+				os.chmod(node.abspath(), self.chmod)
+		return ret
+	cls.post_run = post_run
+	cls.has_cache = True
+
+process_pool = []
+def get_process():
+	"""
+	Returns a worker process that can process waf cache commands
+	The worker process is assumed to be returned to the process pool when unused
+	"""
+	try:
+		return process_pool.pop()
+	except IndexError:
+		filepath = os.path.dirname(os.path.abspath(__file__)) + os.sep + 'wafcache.py'
+		cmd = [sys.executable, '-c', Utils.readf(filepath)]
+		return subprocess.Popen(cmd, stdout=subprocess.PIPE, stdin=subprocess.PIPE, bufsize=0)
+
+def atexit_pool():
+	for k in process_pool:
+		try:
+			os.kill(k.pid, 9)
+		except OSError:
+			pass
+		else:
+			k.wait()
+atexit.register(atexit_pool)
+
+def build(bld):
+	"""
+	Called during the build process to enable file caching
+	"""
+	if process_pool:
+		# already called once
+		return
+
+	# pre-allocation
+	processes = [get_process() for x in range(bld.jobs)]
+	process_pool.extend(processes)
+
+	Task.Task.can_retrieve_cache = can_retrieve_cache
+	Task.Task.put_files_cache = put_files_cache
+	Task.Task.uid = uid
+	Build.BuildContext.hash_env_vars = hash_env_vars
+	for x in reversed(list(Task.classes.values())):
+		make_cached(x)
+
+def cache_command(sig, files_from, files_to):
+	"""
+	Create a command for cache worker processes, returns a pickled
+	base64-encoded tuple containing the task signature, a list of files to
+	cache and a list of files files to get from cache (one of the lists
+	is assumed to be empty)
+	"""
+	proc = get_process()
+
+	obj = base64.b64encode(cPickle.dumps([sig, files_from, files_to]))
+	proc.stdin.write(obj)
+	proc.stdin.write('\n'.encode())
+	proc.stdin.flush()
+	obj = proc.stdout.readline()
+	if not obj:
+		raise OSError('Preforked sub-process %r died' % proc.pid)
+	process_pool.append(proc)
+	return cPickle.loads(base64.b64decode(obj))
+
+try:
+	copyfun = os.link
+except NameError:
+	copyfun = shutil.copy2
+
+def atomic_copy(orig, dest):
+	"""
+	Copy files to the cache, the operation is atomic for a given file
+	"""
+	global copyfun
+	tmp = dest + '.tmp'
+	up = os.path.dirname(dest)
+	try:
+		os.makedirs(up)
+	except OSError:
+		pass
+
+	try:
+		copyfun(orig, tmp)
+	except OSError as e:
+		if e.errno == errno.EXDEV:
+			copyfun = shutil.copy2
+			copyfun(orig, tmp)
+		else:
+			raise
+	os.rename(tmp, dest)
+
+def lru_trim():
+	"""
+	the cache folders take the form:
+	`CACHE_DIR/0b/0b180f82246d726ece37c8ccd0fb1cde2650d7bfcf122ec1f169079a3bfc0ab9`
+	they are listed in order of last access, and then removed
+	until the amount of folders is within TRIM_MAX_FOLDERS and the total space
+	taken by files is less than EVICT_MAX_BYTES
+	"""
+	lst = []
+	for up in os.listdir(CACHE_DIR):
+		if len(up) == 2:
+			sub = os.path.join(CACHE_DIR, up)
+			for hval in os.listdir(sub):
+				path = os.path.join(sub, hval)
+
+				size = 0
+				for fname in os.listdir(path):
+					size += os.lstat(os.path.join(path, fname)).st_size
+				lst.append((os.stat(path).st_mtime, size, path))
+
+	lst.sort(key=lambda x: x[0])
+	lst.reverse()
+
+	tot = sum(x[1] for x in lst)
+	while tot > EVICT_MAX_BYTES or len(lst) > TRIM_MAX_FOLDERS:
+		_, tmp_size, path = lst.pop()
+		tot -= tmp_size
+
+		tmp = path + '.tmp'
+		try:
+			shutil.rmtree(tmp)
+		except OSError:
+			pass
+		try:
+			os.rename(path, tmp)
+		except OSError:
+			sys.stderr.write('Could not rename %r to %r' % (path, tmp))
+		else:
+			try:
+				shutil.rmtree(tmp)
+			except OSError:
+				sys.stderr.write('Could not remove %r' % tmp)
+	sys.stderr.write("Cache trimmed: %r bytes in %r folders left\n" % (tot, len(lst)))
+
+
+def lru_evict():
+	"""
+	Reduce the cache size
+	"""
+	lockfile = os.path.join(CACHE_DIR, 'all.lock')
+	try:
+		st = os.stat(lockfile)
+	except EnvironmentError as e:
+		if e.errno == errno.ENOENT:
+			with open(lockfile, 'w') as f:
+				f.write('')
+			return
+		else:
+			raise
+
+	if st.st_mtime < time.time() - EVICT_INTERVAL_MINUTES * 60:
+		# check every EVICT_INTERVAL_MINUTES minutes if the cache is too big
+		# OCLOEXEC is unnecessary because no processes are spawned
+		fd = os.open(lockfile, os.O_RDWR | os.O_CREAT, 0o755)
+		try:
+			try:
+				fcntl.flock(fd, fcntl.LOCK_EX | fcntl.LOCK_NB)
+			except EnvironmentError:
+				sys.stderr.write('another process is running!\n')
+				pass
+			else:
+				# now dow the actual cleanup
+				lru_trim()
+				os.utime(lockfile, None)
+		finally:
+			os.close(fd)
+
+class netcache(object):
+	def __init__(self):
+		self.http = urllib3.PoolManager()
+
+	def url_of(self, sig, i):
+		return "%s/%s/%s" % (CACHE_DIR, sig, i)
+
+	def upload(self, file_path, sig, i):
+		url = self.url_of(sig, i)
+		with open(file_path, 'rb') as f:
+			file_data = f.read()
+		r = self.http.request('POST', url, timeout=60,
+			fields={ 'file': ('%s/%s' % (sig, i), file_data), })
+		if r.status >= 400:
+			raise OSError("Invalid status %r %r" % (url, r.status))
+
+	def download(self, file_path, sig, i):
+		url = self.url_of(sig, i)
+		with self.http.request('GET', url, preload_content=False, timeout=60) as inf:
+			if inf.status >= 400:
+				raise OSError("Invalid status %r %r" % (url, inf.status))
+			with open(file_path, 'wb') as out:
+				shutil.copyfileobj(inf, out)
+
+	def copy_to_cache(self, sig, files_from, files_to):
+		try:
+			for i, x in enumerate(files_from):
+				if not os.path.islink(x):
+					self.upload(x, sig, i)
+		except Exception:
+			return traceback.format_exc()
+		return OK
+
+	def copy_from_cache(self, sig, files_from, files_to):
+		try:
+			for i, x in enumerate(files_to):
+				self.download(x, sig, i)
+		except Exception:
+			return traceback.format_exc()
+		return OK
+
+class fcache(object):
+	def __init__(self):
+		if not os.path.exists(CACHE_DIR):
+			os.makedirs(CACHE_DIR)
+		if not os.path.exists(CACHE_DIR):
+			raise ValueError('Could not initialize the cache directory')
+
+	def copy_to_cache(self, sig, files_from, files_to):
+		"""
+		Copy files to the cache, existing files are overwritten,
+		and the copy is atomic only for a given file, not for all files
+		that belong to a given task object
+		"""
+		try:
+			for i, x in enumerate(files_from):
+				dest = os.path.join(CACHE_DIR, sig[:2], sig, str(i))
+				atomic_copy(x, dest)
+		except Exception:
+			return traceback.format_exc()
+		else:
+			# attempt trimming if caching was successful:
+			# we may have things to trim!
+			lru_evict()
+		return OK
+
+	def copy_from_cache(self, sig, files_from, files_to):
+		"""
+		Copy files from the cache
+		"""
+		try:
+			for i, x in enumerate(files_to):
+				orig = os.path.join(CACHE_DIR, sig[:2], sig, str(i))
+				atomic_copy(orig, x)
+
+			# success! update the cache time
+			os.utime(os.path.join(CACHE_DIR, sig[:2], sig), None)
+		except Exception:
+			return traceback.format_exc()
+		return OK
+
+class bucket_cache(object):
+	def bucket_copy(self, source, target):
+		if WAFCACHE_CMD:
+			def replacer(match):
+				if match.group('src'):
+					return source
+				elif match.group('tgt'):
+					return target
+			cmd = [re_waf_cmd.sub(replacer, x) for x in shlex.split(WAFCACHE_CMD)]
+		elif CACHE_DIR.startswith('s3://'):
+			cmd = ['aws', 's3', 'cp', source, target]
+		elif CACHE_DIR.startswith('gs://'):
+			cmd = ['gsutil', 'cp', source, target]
+		else:
+			cmd = ['mc', 'cp', source, target]
+
+		proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+		out, err = proc.communicate()
+		if proc.returncode:
+			raise OSError('Error copy %r to %r using: %r (exit %r):\n  out:%s\n  err:%s' % (
+				source, target, cmd, proc.returncode, out.decode(), err.decode()))
+
+	def copy_to_cache(self, sig, files_from, files_to):
+		try:
+			for i, x in enumerate(files_from):
+				dest = os.path.join(CACHE_DIR, sig[:2], sig, str(i))
+				self.bucket_copy(x, dest)
+		except Exception:
+			return traceback.format_exc()
+		return OK
+
+	def copy_from_cache(self, sig, files_from, files_to):
+		try:
+			for i, x in enumerate(files_to):
+				orig = os.path.join(CACHE_DIR, sig[:2], sig, str(i))
+				self.bucket_copy(orig, x)
+		except EnvironmentError:
+			return traceback.format_exc()
+		return OK
+
+def loop(service):
+	"""
+	This function is run when this file is run as a standalone python script,
+	it assumes a parent process that will communicate the commands to it
+	as pickled-encoded tuples (one line per command)
+
+	The commands are to copy files to the cache or copy files from the
+	cache to a target destination
+	"""
+	# one operation is performed at a single time by a single process
+	# therefore stdin never has more than one line
+	txt = sys.stdin.readline().strip()
+	if not txt:
+		# parent process probably ended
+		sys.exit(1)
+	ret = OK
+
+	[sig, files_from, files_to] = cPickle.loads(base64.b64decode(txt))
+	if files_from:
+		# TODO return early when pushing files upstream
+		ret = service.copy_to_cache(sig, files_from, files_to)
+	elif files_to:
+		# the build process waits for workers to (possibly) obtain files from the cache
+		ret = service.copy_from_cache(sig, files_from, files_to)
+	else:
+		ret = "Invalid command"
+
+	obj = base64.b64encode(cPickle.dumps(ret))
+	sys.stdout.write(obj.decode())
+	sys.stdout.write('\n')
+	sys.stdout.flush()
+
+if __name__ == '__main__':
+	if CACHE_DIR.startswith('s3://') or CACHE_DIR.startswith('gs://') or CACHE_DIR.startswith('minio://'):
+		if CACHE_DIR.startswith('minio://'):
+			CACHE_DIR = CACHE_DIR[8:]   # minio doesn't need the protocol part, uses config aliases
+		service = bucket_cache()
+	elif CACHE_DIR.startswith('http'):
+		service = netcache()
+	else:
+		service = fcache()
+	while 1:
+		try:
+			loop(service)
+		except KeyboardInterrupt:
+			break
+
diff -pruN 2:2.2.3-2/third_party/waf/waflib/extras/xcode6.py 2:2.4.2-0ubuntu1/third_party/waf/waflib/extras/xcode6.py
--- 2:2.2.3-2/third_party/waf/waflib/extras/xcode6.py	2021-11-02 22:53:09.739801400 +0000
+++ 2:2.4.2-0ubuntu1/third_party/waf/waflib/extras/xcode6.py	2022-01-24 12:18:16.806475900 +0000
@@ -99,7 +99,7 @@ env.PROJ_CONFIGURATION = {
 		...
 	}
 	'Release': {
-		'ARCHS' x86_64'
+		'ARCHS': x86_64'
 		...
 	}
 }
@@ -163,12 +163,12 @@ class XCodeNode(object):
 			result = result + "\t\t}"
 			return result
 		elif isinstance(value, str):
-			return "\"%s\"" % value
+			return '"%s"' % value.replace('"', '\\\\\\"')
 		elif isinstance(value, list):
 			result = "(\n"
 			for i in value:
-				result = result + "\t\t\t%s,\n" % self.tostring(i)
-			result = result + "\t\t)"
+				result = result + "\t\t\t\t%s,\n" % self.tostring(i)
+			result = result + "\t\t\t)"
 			return result
 		elif isinstance(value, XCodeNode):
 			return value._id
@@ -565,13 +565,13 @@ def process_xcode(self):
 	# Override target specific build settings
 	bldsettings = {
 		'HEADER_SEARCH_PATHS': ['$(inherited)'] + self.env['INCPATHS'],
-		'LIBRARY_SEARCH_PATHS': ['$(inherited)'] + Utils.to_list(self.env.LIBPATH) + Utils.to_list(self.env.STLIBPATH) + Utils.to_list(self.env.LIBDIR) ,
+		'LIBRARY_SEARCH_PATHS': ['$(inherited)'] + Utils.to_list(self.env.LIBPATH) + Utils.to_list(self.env.STLIBPATH) + Utils.to_list(self.env.LIBDIR),
 		'FRAMEWORK_SEARCH_PATHS': ['$(inherited)'] + Utils.to_list(self.env.FRAMEWORKPATH),
-		'OTHER_LDFLAGS': libs + ' ' + frameworks,
-		'OTHER_LIBTOOLFLAGS': bld.env['LINKFLAGS'],
+		'OTHER_LDFLAGS': libs + ' ' + frameworks + ' ' + ' '.join(bld.env['LINKFLAGS']),
 		'OTHER_CPLUSPLUSFLAGS': Utils.to_list(self.env['CXXFLAGS']),
 		'OTHER_CFLAGS': Utils.to_list(self.env['CFLAGS']),
-		'INSTALL_PATH': []
+		'INSTALL_PATH': [],
+		'GCC_PREPROCESSOR_DEFINITIONS': self.env['DEFINES']
 	}
 
 	# Install path
@@ -591,7 +591,7 @@ def process_xcode(self):
 
 	# The keys represents different build configuration, e.g. Debug, Release and so on..
 	# Insert our generated build settings to all configuration names
-	keys = set(settings.keys() + bld.env.PROJ_CONFIGURATION.keys())
+	keys = set(settings.keys()) | set(bld.env.PROJ_CONFIGURATION.keys())
 	for k in keys:
 		if k in settings:
 			settings[k].update(bldsettings)
diff -pruN 2:2.2.3-2/third_party/waf/waflib/Options.py 2:2.4.2-0ubuntu1/third_party/waf/waflib/Options.py
--- 2:2.2.3-2/third_party/waf/waflib/Options.py	2021-11-02 22:53:09.735801500 +0000
+++ 2:2.4.2-0ubuntu1/third_party/waf/waflib/Options.py	2022-01-24 12:18:16.802476000 +0000
@@ -44,7 +44,7 @@ class opt_parser(optparse.OptionParser):
 	"""
 	def __init__(self, ctx, allow_unknown=False):
 		optparse.OptionParser.__init__(self, conflict_handler='resolve', add_help_option=False,
-			version='waf %s (%s)' % (Context.WAFVERSION, Context.WAFREVISION))
+			version='%s %s (%s)' % (Context.WAFNAME, Context.WAFVERSION, Context.WAFREVISION))
 		self.formatter.width = Logs.get_term_cols()
 		self.ctx = ctx
 		self.allow_unknown = allow_unknown
@@ -62,6 +62,21 @@ class opt_parser(optparse.OptionParser):
 				else:
 					self.error(str(e))
 
+	def _process_long_opt(self, rargs, values):
+		# --custom-option=-ftxyz is interpreted as -f -t... see #2280
+		if self.allow_unknown:
+			back = [] + rargs
+			try:
+				optparse.OptionParser._process_long_opt(self, rargs, values)
+			except optparse.BadOptionError:
+				while rargs:
+					rargs.pop()
+				rargs.extend(back)
+				rargs.pop(0)
+				raise
+		else:
+			optparse.OptionParser._process_long_opt(self, rargs, values)
+
 	def print_usage(self, file=None):
 		return self.print_help(file)
 
@@ -96,11 +111,11 @@ class opt_parser(optparse.OptionParser):
 		lst.sort()
 		ret = '\n'.join(lst)
 
-		return '''waf [commands] [options]
+		return '''%s [commands] [options]
 
-Main commands (example: ./waf build -j4)
+Main commands (example: ./%s build -j4)
 %s
-''' % ret
+''' % (Context.WAFNAME, Context.WAFNAME, ret)
 
 
 class OptionsContext(Context.Context):
@@ -141,9 +156,9 @@ class OptionsContext(Context.Context):
 		gr.add_option('-o', '--out', action='store', default='', help='build dir for the project', dest='out')
 		gr.add_option('-t', '--top', action='store', default='', help='src dir for the project', dest='top')
 
-		gr.add_option('--no-lock-in-run', action='store_true', default='', help=optparse.SUPPRESS_HELP, dest='no_lock_in_run')
-		gr.add_option('--no-lock-in-out', action='store_true', default='', help=optparse.SUPPRESS_HELP, dest='no_lock_in_out')
-		gr.add_option('--no-lock-in-top', action='store_true', default='', help=optparse.SUPPRESS_HELP, dest='no_lock_in_top')
+		gr.add_option('--no-lock-in-run', action='store_true', default=os.environ.get('NO_LOCK_IN_RUN', ''), help=optparse.SUPPRESS_HELP, dest='no_lock_in_run')
+		gr.add_option('--no-lock-in-out', action='store_true', default=os.environ.get('NO_LOCK_IN_OUT', ''), help=optparse.SUPPRESS_HELP, dest='no_lock_in_out')
+		gr.add_option('--no-lock-in-top', action='store_true', default=os.environ.get('NO_LOCK_IN_TOP', ''), help=optparse.SUPPRESS_HELP, dest='no_lock_in_top')
 
 		default_prefix = getattr(Context.g_module, 'default_prefix', os.environ.get('PREFIX'))
 		if not default_prefix:
@@ -282,6 +297,8 @@ class OptionsContext(Context.Context):
 			elif arg != 'options':
 				commands.append(arg)
 
+		if options.jobs < 1:
+			options.jobs = 1
 		for name in 'top out destdir prefix bindir libdir'.split():
 			# those paths are usually expanded from Context.launch_dir
 			if getattr(options, name, None):
diff -pruN 2:2.2.3-2/third_party/waf/waflib/Scripting.py 2:2.4.2-0ubuntu1/third_party/waf/waflib/Scripting.py
--- 2:2.2.3-2/third_party/waf/waflib/Scripting.py	2021-11-02 22:53:09.735801500 +0000
+++ 2:2.4.2-0ubuntu1/third_party/waf/waflib/Scripting.py	2022-01-24 12:18:16.802476000 +0000
@@ -306,7 +306,7 @@ def distclean(ctx):
 
 	# remove a build folder, if any
 	cur = '.'
-	if ctx.options.no_lock_in_top:
+	if os.environ.get('NO_LOCK_IN_TOP') or ctx.options.no_lock_in_top:
 		cur = ctx.options.out
 
 	try:
@@ -333,9 +333,9 @@ def distclean(ctx):
 			remove_and_log(env.out_dir, shutil.rmtree)
 
 		env_dirs = [env.out_dir]
-		if not ctx.options.no_lock_in_top:
+		if not (os.environ.get('NO_LOCK_IN_TOP') or ctx.options.no_lock_in_top):
 			env_dirs.append(env.top_dir)
-		if not ctx.options.no_lock_in_run:
+		if not (os.environ.get('NO_LOCK_IN_RUN') or ctx.options.no_lock_in_run):
 			env_dirs.append(env.run_dir)
 		for k in env_dirs:
 			p = os.path.join(k, Options.lockfile)
diff -pruN 2:2.2.3-2/third_party/waf/waflib/Tools/asm.py 2:2.4.2-0ubuntu1/third_party/waf/waflib/Tools/asm.py
--- 2:2.2.3-2/third_party/waf/waflib/Tools/asm.py	2021-11-02 22:53:09.735801500 +0000
+++ 2:2.4.2-0ubuntu1/third_party/waf/waflib/Tools/asm.py	2022-01-24 12:18:16.802476000 +0000
@@ -56,13 +56,11 @@ class asm(Task.Task):
 	Compiles asm files by gas/nasm/yasm/...
 	"""
 	color = 'BLUE'
-	run_str = '${AS} ${ASFLAGS} ${ASMPATH_ST:INCPATHS} ${DEFINES_ST:DEFINES} ${AS_SRC_F}${SRC} ${AS_TGT_F}${TGT}'
+	run_str = '${AS} ${ASFLAGS} ${ASMPATH_ST:INCPATHS} ${ASMDEFINES_ST:DEFINES} ${AS_SRC_F}${SRC} ${AS_TGT_F}${TGT}'
 
 	def scan(self):
 		if self.env.ASM_NAME == 'gas':
 			return c_preproc.scan(self)
-			Logs.warn('There is no dependency scanner for Nasm!')
-			return  [[], []]
 		elif self.env.ASM_NAME == 'nasm':
 			Logs.warn('The Nasm dependency scanner is incomplete!')
 
@@ -106,3 +104,4 @@ class asmstlib(stlink_task):
 
 def configure(conf):
 	conf.env.ASMPATH_ST = '-I%s'
+	conf.env.ASMDEFINES_ST = '-D%s'
diff -pruN 2:2.2.3-2/third_party/waf/waflib/Tools/c_aliases.py 2:2.4.2-0ubuntu1/third_party/waf/waflib/Tools/c_aliases.py
--- 2:2.2.3-2/third_party/waf/waflib/Tools/c_aliases.py	2021-11-02 22:53:09.735801500 +0000
+++ 2:2.4.2-0ubuntu1/third_party/waf/waflib/Tools/c_aliases.py	2022-01-24 12:18:16.802476000 +0000
@@ -38,7 +38,7 @@ def sniff_features(**kw):
 	:return: the list of features for a task generator processing the source files
 	:rtype: list of string
 	"""
-	exts = get_extensions(kw['source'])
+	exts = get_extensions(kw.get('source', []))
 	typ = kw['typ']
 	feats = []
 
@@ -72,7 +72,7 @@ def sniff_features(**kw):
 				feats.append(x + typ)
 				will_link = True
 		if not will_link and not kw.get('features', []):
-			raise Errors.WafError('Cannot link from %r, try passing eg: features="c cprogram"?' % kw)
+			raise Errors.WafError('Unable to determine how to link %r, try adding eg: features="c cshlib"?' % kw)
 	return feats
 
 def set_features(kw, typ):
diff -pruN 2:2.2.3-2/third_party/waf/waflib/Tools/c_config.py 2:2.4.2-0ubuntu1/third_party/waf/waflib/Tools/c_config.py
--- 2:2.2.3-2/third_party/waf/waflib/Tools/c_config.py	2021-11-02 22:53:09.735801500 +0000
+++ 2:2.4.2-0ubuntu1/third_party/waf/waflib/Tools/c_config.py	2022-01-24 12:18:16.802476000 +0000
@@ -68,6 +68,7 @@ MACRO_TO_DEST_CPU = {
 '__s390__'    : 's390',
 '__sh__'      : 'sh',
 '__xtensa__'  : 'xtensa',
+'__e2k__'     : 'e2k',
 }
 
 @conf
@@ -86,6 +87,10 @@ def parse_flags(self, line, uselib_store
 	:type uselib_store: string
 	:param env: config set or conf.env by default
 	:type env: :py:class:`waflib.ConfigSet.ConfigSet`
+	:param force_static: force usage of static libraries
+	:type force_static: bool default False
+	:param posix: usage of POSIX mode for shlex lexical analiysis library
+	:type posix: bool default True
 	"""
 
 	assert(isinstance(line, str))
@@ -103,6 +108,8 @@ def parse_flags(self, line, uselib_store
 	lex.commenters = ''
 	lst = list(lex)
 
+	so_re = re.compile(r"\.so(?:\.[0-9]+)*$")
+
 	# append_unique is not always possible
 	# for example, apple flags may require both -arch i386 and -arch ppc
 	uselib = uselib_store
@@ -144,7 +151,7 @@ def parse_flags(self, line, uselib_store
 		elif x.startswith('-std='):
 			prefix = 'CXXFLAGS' if '++' in x else 'CFLAGS'
 			app(prefix, x)
-		elif x.startswith('+') or x in ('-pthread', '-fPIC', '-fpic', '-fPIE', '-fpie'):
+		elif x.startswith('+') or x in ('-pthread', '-fPIC', '-fpic', '-fPIE', '-fpie', '-flto', '-fno-lto'):
 			app('CFLAGS', x)
 			app('CXXFLAGS', x)
 			app('LINKFLAGS', x)
@@ -180,7 +187,7 @@ def parse_flags(self, line, uselib_store
 			app('CFLAGS', tmp)
 			app('CXXFLAGS', tmp)
 			app('LINKFLAGS', tmp)
-		elif x.endswith(('.a', '.so', '.dylib', '.lib')):
+		elif x.endswith(('.a', '.dylib', '.lib')) or so_re.search(x):
 			appu('LINKFLAGS', x) # not cool, #762
 		else:
 			self.to_log('Unhandled flag %r' % x)
@@ -246,6 +253,8 @@ def exec_cfg(self, kw):
 	* if modversion is given, then return the module version
 	* else, execute the *-config* program with the *args* and *variables* given, and set the flags on the *conf.env.FLAGS_name* variable
 
+	:param path: the **-config program to use**
+	:type path: list of string
 	:param atleast_pkgconfig_version: minimum pkg-config version to use (disable other tests)
 	:type atleast_pkgconfig_version: string
 	:param package: package name, for example *gtk+-2.0*
@@ -260,6 +269,12 @@ def exec_cfg(self, kw):
 	:type variables: list of string
 	:param define_variable: additional variables to define (also in conf.env.PKG_CONFIG_DEFINES)
 	:type define_variable: dict(string: string)
+	:param pkg_config_path: paths where pkg-config should search for .pc config files (overrides env.PKG_CONFIG_PATH if exists)
+	:type pkg_config_path: string, list of directories separated by colon
+	:param force_static: force usage of static libraries
+	:type force_static: bool default False
+	:param posix: usage of POSIX mode for shlex lexical analiysis library
+	:type posix: bool default True
 	"""
 
 	path = Utils.to_list(kw['path'])
@@ -334,6 +349,7 @@ def check_cfg(self, *k, **kw):
 	"""
 	Checks for configuration flags using a **-config**-like program (pkg-config, sdl-config, etc).
 	This wraps internal calls to :py:func:`waflib.Tools.c_config.validate_cfg` and :py:func:`waflib.Tools.c_config.exec_cfg`
+	so check exec_cfg parameters descriptions for more details on kw passed
 
 	A few examples::
 
@@ -1267,10 +1283,11 @@ def multicheck(self, *k, **kw):
 	tasks = []
 
 	id_to_task = {}
-	for dct in k:
+	for counter, dct in enumerate(k):
 		x = Task.classes['cfgtask'](bld=bld, env=None)
 		tasks.append(x)
 		x.args = dct
+		x.args['multicheck_counter'] = counter
 		x.bld = bld
 		x.conf = self
 		x.args = dct
diff -pruN 2:2.2.3-2/third_party/waf/waflib/Tools/compiler_c.py 2:2.4.2-0ubuntu1/third_party/waf/waflib/Tools/compiler_c.py
--- 2:2.2.3-2/third_party/waf/waflib/Tools/compiler_c.py	2021-11-02 22:53:09.735801500 +0000
+++ 2:2.4.2-0ubuntu1/third_party/waf/waflib/Tools/compiler_c.py	2022-01-24 12:18:16.802476000 +0000
@@ -37,7 +37,7 @@ from waflib.Logs import debug
 
 c_compiler = {
 'win32':  ['msvc', 'gcc', 'clang'],
-'cygwin': ['gcc'],
+'cygwin': ['gcc', 'clang'],
 'darwin': ['clang', 'gcc'],
 'aix':    ['xlc', 'gcc', 'clang'],
 'linux':  ['gcc', 'clang', 'icc'],
diff -pruN 2:2.2.3-2/third_party/waf/waflib/Tools/compiler_cxx.py 2:2.4.2-0ubuntu1/third_party/waf/waflib/Tools/compiler_cxx.py
--- 2:2.2.3-2/third_party/waf/waflib/Tools/compiler_cxx.py	2021-11-02 22:53:09.735801500 +0000
+++ 2:2.4.2-0ubuntu1/third_party/waf/waflib/Tools/compiler_cxx.py	2022-01-24 12:18:16.802476000 +0000
@@ -38,7 +38,7 @@ from waflib.Logs import debug
 
 cxx_compiler = {
 'win32':  ['msvc', 'g++', 'clang++'],
-'cygwin': ['g++'],
+'cygwin': ['g++', 'clang++'],
 'darwin': ['clang++', 'g++'],
 'aix':    ['xlc++', 'g++', 'clang++'],
 'linux':  ['g++', 'clang++', 'icpc'],
diff -pruN 2:2.2.3-2/third_party/waf/waflib/Tools/c_tests.py 2:2.4.2-0ubuntu1/third_party/waf/waflib/Tools/c_tests.py
--- 2:2.2.3-2/third_party/waf/waflib/Tools/c_tests.py	2021-11-02 22:53:09.735801500 +0000
+++ 2:2.4.2-0ubuntu1/third_party/waf/waflib/Tools/c_tests.py	2022-01-24 12:18:16.802476000 +0000
@@ -180,9 +180,15 @@ def check_large_file(self, **kw):
 ########################################################################################
 
 ENDIAN_FRAGMENT = '''
+#ifdef _MSC_VER
+#define testshlib_EXPORT __declspec(dllexport)
+#else
+#define testshlib_EXPORT
+#endif
+
 short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
 short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
-int use_ascii (int i) {
+int testshlib_EXPORT use_ascii (int i) {
 	return ascii_mm[i] + ascii_ii[i];
 }
 short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
@@ -208,12 +214,12 @@ class grep_for_endianness(Task.Task):
 			return -1
 
 @feature('grep_for_endianness')
-@after_method('process_source')
+@after_method('apply_link')
 def grep_for_endianness_fun(self):
 	"""
 	Used by the endianness configuration test
 	"""
-	self.create_task('grep_for_endianness', self.compiled_tasks[0].outputs[0])
+	self.create_task('grep_for_endianness', self.link_task.outputs[0])
 
 @conf
 def check_endianness(self):
@@ -223,7 +229,8 @@ def check_endianness(self):
 	tmp = []
 	def check_msg(self):
 		return tmp[0]
-	self.check(fragment=ENDIAN_FRAGMENT, features='c grep_for_endianness',
+
+	self.check(fragment=ENDIAN_FRAGMENT, features='c cshlib grep_for_endianness',
 		msg='Checking for endianness', define='ENDIANNESS', tmp=tmp,
 		okmsg=check_msg, confcache=None)
 	return tmp[0]
diff -pruN 2:2.2.3-2/third_party/waf/waflib/Tools/fc.py 2:2.4.2-0ubuntu1/third_party/waf/waflib/Tools/fc.py
--- 2:2.2.3-2/third_party/waf/waflib/Tools/fc.py	2021-11-02 22:53:09.735801500 +0000
+++ 2:2.4.2-0ubuntu1/third_party/waf/waflib/Tools/fc.py	2022-01-24 12:18:16.802476000 +0000
@@ -13,8 +13,8 @@ from waflib.TaskGen import extension
 from waflib.Configure import conf
 
 ccroot.USELIB_VARS['fc'] = set(['FCFLAGS', 'DEFINES', 'INCLUDES', 'FCPPFLAGS'])
-ccroot.USELIB_VARS['fcprogram_test'] = ccroot.USELIB_VARS['fcprogram'] = set(['LIB', 'STLIB', 'LIBPATH', 'STLIBPATH', 'LINKFLAGS', 'RPATH', 'LINKDEPS'])
-ccroot.USELIB_VARS['fcshlib'] = set(['LIB', 'STLIB', 'LIBPATH', 'STLIBPATH', 'LINKFLAGS', 'RPATH', 'LINKDEPS'])
+ccroot.USELIB_VARS['fcprogram_test'] = ccroot.USELIB_VARS['fcprogram'] = set(['LIB', 'STLIB', 'LIBPATH', 'STLIBPATH', 'LINKFLAGS', 'RPATH', 'LINKDEPS', 'LDFLAGS'])
+ccroot.USELIB_VARS['fcshlib'] = set(['LIB', 'STLIB', 'LIBPATH', 'STLIBPATH', 'LINKFLAGS', 'RPATH', 'LINKDEPS', 'LDFLAGS'])
 ccroot.USELIB_VARS['fcstlib'] = set(['ARFLAGS', 'LINKDEPS'])
 
 @extension('.f','.F','.f90','.F90','.for','.FOR','.f95','.F95','.f03','.F03','.f08','.F08')
diff -pruN 2:2.2.3-2/third_party/waf/waflib/Tools/irixcc.py 2:2.4.2-0ubuntu1/third_party/waf/waflib/Tools/irixcc.py
--- 2:2.2.3-2/third_party/waf/waflib/Tools/irixcc.py	2021-11-02 22:53:09.735801500 +0000
+++ 2:2.4.2-0ubuntu1/third_party/waf/waflib/Tools/irixcc.py	2022-01-24 12:18:16.802476000 +0000
@@ -13,22 +13,11 @@ from waflib.Configure import conf
 @conf
 def find_irixcc(conf):
 	v = conf.env
-	cc = None
-	if v.CC:
-		cc = v.CC
-	elif 'CC' in conf.environ:
-		cc = conf.environ['CC']
-	if not cc:
-		cc = conf.find_program('cc', var='CC')
-	if not cc:
-		conf.fatal('irixcc was not found')
-
+	cc = conf.find_program('cc', var='CC')
 	try:
 		conf.cmd_and_log(cc + ['-version'])
 	except Errors.WafError:
 		conf.fatal('%r -version could not be executed' % cc)
-
-	v.CC = cc
 	v.CC_NAME = 'irix'
 
 @conf
@@ -57,7 +46,6 @@ def irixcc_common_flags(conf):
 
 def configure(conf):
 	conf.find_irixcc()
-	conf.find_cpp()
 	conf.find_ar()
 	conf.irixcc_common_flags()
 	conf.cc_load_tools()
diff -pruN 2:2.2.3-2/third_party/waf/waflib/Tools/javaw.py 2:2.4.2-0ubuntu1/third_party/waf/waflib/Tools/javaw.py
--- 2:2.2.3-2/third_party/waf/waflib/Tools/javaw.py	2021-11-02 22:53:09.735801500 +0000
+++ 2:2.4.2-0ubuntu1/third_party/waf/waflib/Tools/javaw.py	2022-01-24 12:18:16.802476000 +0000
@@ -251,7 +251,7 @@ def use_javac_files(self):
 					base_node = tg.path.get_bld()
 
 				self.use_lst.append(base_node.abspath())
-				self.javac_task.dep_nodes.extend([x for x in base_node.ant_glob(JAR_RE, remove=False, quiet=True)])
+				self.javac_task.dep_nodes.extend([dx for dx in base_node.ant_glob(JAR_RE, remove=False, quiet=True)])
 
 				for tsk in tg.tasks:
 					self.javac_task.set_run_after(tsk)
diff -pruN 2:2.2.3-2/third_party/waf/waflib/Tools/msvc.py 2:2.4.2-0ubuntu1/third_party/waf/waflib/Tools/msvc.py
--- 2:2.2.3-2/third_party/waf/waflib/Tools/msvc.py	2021-11-02 22:53:09.735801500 +0000
+++ 2:2.4.2-0ubuntu1/third_party/waf/waflib/Tools/msvc.py	2022-01-24 12:47:35.016466100 +0000
@@ -99,7 +99,13 @@ all_icl_platforms = [ ('intel64', 'amd64
 """List of icl platforms"""
 
 def options(opt):
-	opt.add_option('--msvc_version', type='string', help = 'msvc version, eg: "msvc 10.0,msvc 9.0"', default='')
+	default_ver = ''
+	vsver = os.getenv('VSCMD_VER')
+	if vsver:
+		m = re.match(r'(^\d+\.\d+).*', vsver)
+		if m:
+			default_ver = 'msvc %s' % m.group(1)
+	opt.add_option('--msvc_version', type='string', help = 'msvc version, eg: "msvc 10.0,msvc 9.0"', default=default_ver)
 	opt.add_option('--msvc_targets', type='string', help = 'msvc targets, eg: "x64,arm"', default='')
 	opt.add_option('--no-msvc-lazy', action='store_false', help = 'lazily check msvc target environments', default=True, dest='msvc_lazy')
 
diff -pruN 2:2.2.3-2/third_party/waf/waflib/Tools/python.py 2:2.4.2-0ubuntu1/third_party/waf/waflib/Tools/python.py
--- 2:2.2.3-2/third_party/waf/waflib/Tools/python.py	2021-11-02 22:53:09.735801500 +0000
+++ 2:2.4.2-0ubuntu1/third_party/waf/waflib/Tools/python.py	2022-01-24 12:47:35.016466100 +0000
@@ -620,7 +620,7 @@ def configure(conf):
 	v.PYO = getattr(Options.options, 'pyo', 1)
 
 	try:
-		v.PYTAG = conf.cmd_and_log(conf.env.PYTHON + ['-c', "import imp;print(imp.get_tag())"]).strip()
+		v.PYTAG = conf.cmd_and_log(conf.env.PYTHON + ['-c', "import sys\ntry:\n print(sys.implementation.cache_tag)\nexcept AttributeError:\n import imp\n print(imp.get_tag())\n"]).strip()
 	except Errors.WafError:
 		pass
 
diff -pruN 2:2.2.3-2/third_party/waf/waflib/Tools/qt5.py 2:2.4.2-0ubuntu1/third_party/waf/waflib/Tools/qt5.py
--- 2:2.2.3-2/third_party/waf/waflib/Tools/qt5.py	2021-11-02 22:53:09.735801500 +0000
+++ 2:2.4.2-0ubuntu1/third_party/waf/waflib/Tools/qt5.py	2022-01-24 12:47:35.016466100 +0000
@@ -57,7 +57,23 @@ A few options (--qt{dir,bin,...}) and en
 (QT5_{ROOT,DIR,MOC,UIC,XCOMPILE}) allow finer tuning of the tool,
 tool path selection, etc; please read the source for more info.
 
-The detection uses pkg-config on Linux by default. To force static library detection use:
+The detection uses pkg-config on Linux by default. The list of
+libraries to be requested to pkg-config is formulated by scanning
+in the QTLIBS directory (that can be passed via --qtlibs or by
+setting the environment variable QT5_LIBDIR otherwise is derived
+by querying qmake for QT_INSTALL_LIBS directory) for shared/static
+libraries present.
+Alternatively the list of libraries to be requested via pkg-config
+can be set using the qt5_vars attribute, ie:
+
+      conf.qt5_vars = ['Qt5Core', 'Qt5Gui', 'Qt5Widgets', 'Qt5Test'];
+
+This can speed up configuration phase if needed libraries are
+known beforehand, can improve detection on systems with a
+sparse QT5 libraries installation (ie. NIX) and can improve
+detection of some header-only Qt modules (ie. Qt5UiPlugin).
+
+To force static library detection use:
 QT5_XCOMPILE=1 QT5_FORCE_STATIC=1 waf configure
 """
 
@@ -466,6 +482,9 @@ def configure(self):
 
 	The detection uses the program ``pkg-config`` through :py:func:`waflib.Tools.config_c.check_cfg`
 	"""
+	if 'COMPILER_CXX' not in self.env:
+		self.fatal('No CXX compiler defined: did you forget to configure compiler_cxx first?')
+
 	self.find_qt5_binaries()
 	self.set_qt5_libs_dir()
 	self.set_qt5_libs_to_check()
@@ -478,12 +497,9 @@ def configure(self):
 	if not has_xml:
 		Logs.error('No xml.sax support was found, rcc dependencies will be incomplete!')
 
-	if 'COMPILER_CXX' not in self.env:
-		self.fatal('No CXX compiler defined: did you forget to configure compiler_cxx first?')
-
 	# Qt5 may be compiled with '-reduce-relocations' which requires dependent programs to have -fPIE or -fPIC?
-	frag = '#include <QApplication>\nint main(int argc, char **argv) {return 0;}\n'
-	uses = 'QT5CORE QT5WIDGETS QT5GUI'
+	frag = '#include <QMap>\nint main(int argc, char **argv) {QMap<int,int> m;return m.keys().size();}\n'
+	uses = 'QT5CORE'
 	for flag in [[], '-fPIE', '-fPIC', '-std=c++11' , ['-std=c++11', '-fPIE'], ['-std=c++11', '-fPIC']]:
 		msg = 'See if Qt files compile '
 		if flag:
@@ -499,7 +515,7 @@ def configure(self):
 
 	# FreeBSD does not add /usr/local/lib and the pkg-config files do not provide it either :-/
 	if Utils.unversioned_sys_platform() == 'freebsd':
-		frag = '#include <QApplication>\nint main(int argc, char **argv) { QApplication app(argc, argv); return NULL != (void*) (&app);}\n'
+		frag = '#include <QMap>\nint main(int argc, char **argv) {QMap<int,int> m;return m.keys().size();}\n'
 		try:
 			self.check(features='qt5 cxx cxxprogram', use=uses, fragment=frag, msg='Can we link Qt programs on FreeBSD directly?')
 		except self.errors.ConfigurationError:
@@ -637,7 +653,7 @@ def set_qt5_libs_dir(self):
 		except Errors.WafError:
 			qtdir = self.cmd_and_log(env.QMAKE + ['-query', 'QT_INSTALL_PREFIX']).strip()
 			qtlibs = os.path.join(qtdir, 'lib')
-	self.msg('Found the Qt5 libraries in', qtlibs)
+	self.msg('Found the Qt5 library path', qtlibs)
 	env.QTLIBS = qtlibs
 
 @conf
diff -pruN 2:2.2.3-2/third_party/waf/waflib/Tools/waf_unit_test.py 2:2.4.2-0ubuntu1/third_party/waf/waflib/Tools/waf_unit_test.py
--- 2:2.2.3-2/third_party/waf/waflib/Tools/waf_unit_test.py	2021-11-02 22:53:09.735801500 +0000
+++ 2:2.4.2-0ubuntu1/third_party/waf/waflib/Tools/waf_unit_test.py	2022-01-24 12:47:35.016466100 +0000
@@ -97,6 +97,7 @@ def make_interpreted_test(self):
 		if isinstance(v, str):
 			v = v.split(os.pathsep)
 		self.ut_env[k] = os.pathsep.join(p + v)
+	self.env.append_value('UT_DEPS', ['%r%r' % (key, self.ut_env[key]) for key in self.ut_env])
 
 @feature('test')
 @after_method('apply_link', 'process_use')
@@ -108,7 +109,8 @@ def make_test(self):
 	tsk = self.create_task('utest', self.link_task.outputs)
 	if getattr(self, 'ut_str', None):
 		self.ut_run, lst = Task.compile_fun(self.ut_str, shell=getattr(self, 'ut_shell', False))
-		tsk.vars = lst + tsk.vars
+		tsk.vars = tsk.vars + lst
+		self.env.append_value('UT_DEPS', self.ut_str)
 
 	self.handle_ut_cwd('ut_cwd')
 
@@ -139,6 +141,10 @@ def make_test(self):
 	if not hasattr(self, 'ut_cmd'):
 		self.ut_cmd = getattr(Options.options, 'testcmd', False)
 
+	self.env.append_value('UT_DEPS', str(self.ut_cmd))
+	self.env.append_value('UT_DEPS', self.ut_paths)
+	self.env.append_value('UT_DEPS', ['%r%r' % (key, self.ut_env[key]) for key in self.ut_env])
+
 @taskgen_method
 def add_test_results(self, tup):
 	"""Override and return tup[1] to interrupt the build immediately if a test does not run"""
@@ -159,7 +165,7 @@ class utest(Task.Task):
 	"""
 	color = 'PINK'
 	after = ['vnum', 'inst']
-	vars = []
+	vars = ['UT_DEPS']
 
 	def runnable_status(self):
 		"""
diff -pruN 2:2.2.3-2/third_party/waf/waflib/Utils.py 2:2.4.2-0ubuntu1/third_party/waf/waflib/Utils.py
--- 2:2.2.3-2/third_party/waf/waflib/Utils.py	2021-11-02 22:53:09.735801500 +0000
+++ 2:2.4.2-0ubuntu1/third_party/waf/waflib/Utils.py	2022-01-24 12:47:35.016466100 +0000
@@ -891,7 +891,7 @@ def run_prefork_process(cmd, kwargs, car
 	"""
 	Delegates process execution to a pre-forked process instance.
 	"""
-	if not 'env' in kwargs:
+	if not kwargs.get('env'):
 		kwargs['env'] = dict(os.environ)
 	try:
 		obj = base64.b64encode(cPickle.dumps([cmd, kwargs, cargs]))
diff -pruN 2:2.2.3-2/wscript 2:2.4.2-0ubuntu1/wscript
--- 2:2.2.3-2/wscript	2021-11-02 22:53:09.471799400 +0000
+++ 2:2.4.2-0ubuntu1/wscript	2022-01-24 12:47:34.956465700 +0000
@@ -1,8 +1,8 @@
 #!/usr/bin/env python
 
 APPNAME = 'ldb'
-# For Samba 4.13.x
-VERSION = '2.2.3'
+# For Samba 4.15.x
+VERSION = '2.4.2'
 
 import sys, os
 
