Samba4 Port: hdb & ldb Interfaces
This page aims to reduce the confusion about
- Three hdb libraries (one for Samba4, two for heimdal);
- Samba4's LDB library, and
- Samba4's ldb library.
Contents
- 1 Heimdal's hdb Interface to Samba4's LDB
- 2 Heimdal's internal hdb library
- 3 Samba's internal ldb library
- 3.1 ldb basic calls
- 3.2 ldb_attr_ calls
- 3.3 ldb_build_..._req calls
- 3.4 ldb_dn_ calls
- 3.5 ldb_extended_ calls
- 3.6 ldb_get_ calls
- 3.7 ldb_ldif_ calls
- 3.8 ldb_module_ calls
- 3.9 ldb_..._module_ops calls
- 3.10 ldb_msg_ calls
- 3.11 ldb_next_
- 3.12 ldb_request
- 3.13 ldb_schema_ calls
- 3.14 ldb_set_ calls
- 3.15 ldb_transaction_ calls
- 3.16 ldb_val_ calls
- 3.17 ldb miscellaneous calls
Heimdal's hdb Interface to Samba4's LDB
Samba4's file kdc/hdb-samba4.c contains the LDB_ functions, which only that file uses directly.
In Samba4's heimdal/lib/hdb/hdb.h, Heimdal's HDB structure contains "hdb-" prefixed function-pointers to the LDB functions. Only Heimdal uses this function-pointer interface to Samba4's LDB_ functions:
- (HDB *)->hdb_dbc = NULL;
- (HDB *)->hdb_open = LDB_open;
- (HDB *)->hdb_close = LDB_close;
- (HDB *)->hdb_fetch = LDB_fetch;
- (HDB *)->hdb_store = LDB_store;
- (HDB *)->hdb_remove = LDB_remove;
- (HDB *)->hdb_firstkey = LDB_firstkey;
- (HDB *)->hdb_nextkey = LDB_nextkey;
- (HDB *)->hdb_lock = LDB_lock;
- (HDB *)->hdb_unlock = LDB_unlock;
- (HDB *)->hdb_rename = LDB_rename;
- (HDB *)->hdb__get = NULL;
- (HDB *)->hdb__put = NULL;
- (HDB *)->hdb__del = NULL;
- (HDB *)->hdb_destroy = LDB_destroy;
Samba4's hdb_ library also includes an event-handler (local fcn invoked via a function-pointer):
- hdb_ldb_free_entry in kdc/hdb-samba4.c
This function-pointer gets used by both heimdal & Samba4.
Heimdal's internal hdb library
This library isn't completely "internal," because four of these routines get used by Samba, too:
- initialize_hdb_error_table_r
- free_hdb_entry
- hdb_enctype2key
- hdb_free_entry
Further, the global struct hdb_kt_ops{} gets used only by Samba4.
Entry-point | heimdal/lib/hdb file | Used by |
copy_hdb_entry | asn1_hdb_entry.c | no |
copy_hdb_entry_alias | asn1_hdb_entry_alias.c | no |
decode_hdb_entry | asn1_hdb_entry.c | no |
decode_hdb_entry_alias | asn1_hdb_entry_alias.c | no |
encode_hdb_entry | asn1_hdb_entry.c | no |
encode_hdb_entry_alias | asn1_hdb_entry_alias.c | no |
free_hdb_entry | asn1_hdb_entry.c | both + |
free_hdb_entry_alias | asn1_hdb_entry_alias.c | heimdal |
initialize_hdb_error_table | hdb_err.c | no |
initialize_hdb_error_table_r | hdb_err.c | both |
length_hdb_entry | asn1_hdb_entry.c | no |
length_hdb_entry_alias | asn1_hdb_entry_alias.c | no |
_hdb_find_master_key | mkey.c | heimdal + |
_hdb_mkey_decrypt | mkey.c | heimdal + |
_hdb_mkey_version | mkey.c | heimdal |
hdb_add_master_key | mkey.c | no |
hdb_check_db_format | hdb.c | heimdal + |
hdb_clear_extension | ext.c | heimdal |
hdb_clear_master_key | mkey.c | heimdal + |
hdb_create | hdb.c | heimdal |
hdb_db_dir | dbinfo.c | heimdal + |
hdb_dbinfo_get_acl_file | dbinfo.c | no |
hdb_dbinfo_get_binding | dbinfo.c | no |
hdb_dbinfo_get_dbname | dbinfo.c | no |
hdb_dbinfo_get_label | dbinfo.c | no |
hdb_dbinfo_get_log_file | dbinfo.c | no |
hdb_dbinfo_get_mkey_file | dbinfo.c | no |
hdb_dbinfo_get_next | dbinfo.c | no |
hdb_dbinfo_get_realm | dbinfo.c | no |
hdb_free_dbinfo | dbinfo.c | no |
hdb_get_dbinfo | dbinfo.c | no |
hdb_default_db | dbinfo.c | no |
hdb_init_db | hdb.c | heimdal |
hdb_enctype2key | hdb.c | both ++ |
hdb_entry_check_mandatory | ext.c | no |
hdb_entry_clear_password | ext.c | no |
hdb_entry_get_aliases | ext.c | no |
hdb_entry_get_ConstrainedDelegACL | ext.c | heimdal |
hdb_entry_get_password | ext.c | heimdal |
hdb_entry_get_pkinit_acl | ext.c | heimdal |
hdb_entry_get_pkinit_hash | ext.c | no |
hdb_entry_get_pw_change_time | ext.c | no |
hdb_entry_set_password | ext.c | no |
hdb_entry_set_pw_change_time | ext.c | no |
hdb_find_extension | ext.c | heimdal + |
hdb_foreach | hdb.c | no |
hdb_free_entry | hdb.c | both ++ |
hdb_free_key | hdb.c | no |
hdb_free_keys | keys.c | no |
hdb_free_master_key | mkey.c | heimdal |
hdb_generate_key_set | keys.c | heimdal |
hdb_generate_key_set_password | keys.c | no |
hdb_kt_ops{} | keytab.c | samba4 |
hdb_list_builtin | hdb.c | no |
hdb_lock (func ptr) | kdc/hdb-samba4.c | heimdal ++ |
hdb_lock | hdb.c | heimdal |
hdb_next_enctype2key | hdb.c | heimdal + |
hdb_process_master_key | mkey.c | heimdal + |
hdb_read_master_key | mkey.c | heimdal |
hdb_replace_extension | ext.c | heimdal |
hdb_seal_key | mkey.c | no |
hdb_seal_keys | mkey.c | no |
hdb_seal_key_mkey | mkey.c | heimdal |
hdb_seal_keys_mkey | mkey.c | heimdal |
hdb_set_master_key | mkey.c | no |
hdb_set_master_keyfile | mkey.c | heimdal |
hdb_unlock (func ptr) | kdc/hdb-samba4.c | heimdal ++ |
hdb_unlock | hdb.c | heimdal |
hdb_unseal_key | mkey.c | no |
hdb_unseal_keys | mkey.c | heimdal + |
hdb_unseal_key_mkey | mkey.c | heimdal |
hdb_unseal_keys_mkey | mkey.c | heimdal |
Samba's internal ldb library
These routines are defined & used only in Samba4, and not in Samba4's heimdal snapshot tree.
ldb basic calls
- ldb_add
- ldb_connect
- ldb_debug
- ldb_delete
- ldb_errstring
- ldb_init
- ldb_modify
- ldb_qsort
- ldb_rename
- ldb_request
- ldb_search
- ldb_wait
ldb_attr_ calls
- ldb_attr_casefold
- ldb_attr_dn
- ldb_attr_in_list
- ldb_attr_list_copy
- ldb_attr_list_copy_add
ldb_build_..._req calls
- ldb_build_add_req
- ldb_build_del_req
- ldb_build_extended_req
- ldb_build_mod_req
- ldb_build_rename_req
- ldb_build_search_req
- ldb_build_search_req_ex
ldb_dn_ calls
- ldb_dn_add_base
- ldb_dn_add_base_fmt
- ldb_dn_add_child
- ldb_dn_add_child_fmt
- ldb_dn_alloc_casefold
- ldb_dn_alloc_linearized
- ldb_dn_canonical_ex_strin
- ldb_dn_canonical_string
- ldb_dn_check_local
- ldb_dn_check_special
- ldb_dn_compare
- ldb_dn_compare_base
- ldb_dn_copy
- ldb_dn_escape_value
- ldb_dn_extended_add_synta
- ldb_dn_extended_syntax_by
- ldb_dn_from_ldb_val
- ldb_dn_get_casefold
- ldb_dn_get_comp_num
- ldb_dn_get_component_name
- ldb_dn_get_component_val
- ldb_dn_get_extended_compo
- ldb_dn_get_extended_linea
- ldb_dn_get_linearized
- ldb_dn_get_parent
- ldb_dn_get_rdn_name
- ldb_dn_get_rdn_val
- ldb_dn_has_extended
- ldb_dn_is_null
- ldb_dn_is_special
- ldb_dn_is_valid
- ldb_dn_map_local
- ldb_dn_map_rebase_remote
- ldb_dn_new
- ldb_dn_new_fmt
- ldb_dn_remove_base_compon
- ldb_dn_remove_child_compo
- ldb_dn_set_component
- ldb_dn_set_extended_compo
- ldb_dn_validate
ldb_extended_ calls
- ldb_extended
- ldb_extended_default_call
- ldb_extended_dn_in_module
- ldb_extended_dn_out_deref
- ldb_extended_dn_out_ldb_m
- ldb_extended_dn_store_mod
ldb_get_ calls
- ldb_get_config_basedn
- ldb_get_create_perms
- ldb_get_default_basedn
- ldb_get_event_context
- ldb_get_opaque
- ldb_get_root_basedn
- ldb_get_schema_basedn
ldb_ldif_ calls
- ldb_ldif_read_file
- ldb_ldif_read_free
- ldb_ldif_read_string
- ldb_ldif_write_file
ldb_module_ calls
- ldb_module_done
- ldb_module_get_ctx
- ldb_module_get_private
- ldb_module_new
- ldb_module_send_entry
- ldb_module_send_referral
- ldb_module_set_private
- ldb_modules_list_from_str
- ldb_init_module_chain
- ldb_load_modules
- ldb_load_modules_list
ldb_..._module_ops calls
- ldb_anr_module_ops
- ldb_asq_module_ops
- ldb_dsdb_cache_module_ops
- ldb_entryuuid_module_ops
- ldb_instancetype_module_ops
- ldb_kludge_acl_module_ops
- ldb_ldap_backend_ops
- ldb_ldapi_backend_ops
- ldb_ldaps_backend_ops
- ldb_linked_attributes_module_ops
- ldb_local_password_module_ops
- ldb_naming_fsmo_module_ops
- ldb_nsuniqueid_module_ops
- ldb_objectclass_module_ops
- ldb_objectguid_module_ops
- ldb_operational_module_ops
- ldb_paged_results_module_ops
- ldb_paged_searches_module_ops
- ldb_partition_module_ops
- ldb_password_hash_module_ops
- ldb_pdc_fsmo_module_ops
- ldb_ranged_results_module_ops
- ldb_rdn_name_module_ops
- ldb_register_module
- ldb_repl_meta_data_module_ops
- ldb_rootdse_module_ops
- ldb_samba3sam_module_ops
- ldb_samldb_module_ops
- ldb_server_sort_module_ops
- ldb_show_deleted_module_ops
- ldb_skel_module_ops
- ldb_subtree_delete_module_ops
- ldb_subtree_rename_module_ops
- ldb_tdb_backend_ops
- ldb_update_keytab_module_ops
- ldb_wins_ldb_module_ops
ldb_msg_ calls
- ldb_msg_add
- ldb_msg_add_empty
- ldb_msg_add_fmt
- ldb_msg_add_steal_string
- ldb_msg_add_steal_value
- ldb_msg_add_string
- ldb_msg_add_value
- ldb_msg_canonicalize
- ldb_msg_check_string_attr
- ldb_msg_copy
- ldb_msg_copy_attr
- ldb_msg_copy_shallow
- ldb_msg_diff
- ldb_msg_element_compare
- ldb_msg_find_attr_as_bool
- ldb_msg_find_attr_as_dn
- ldb_msg_find_attr_as_int
- ldb_msg_find_attr_as_int6
- ldb_msg_find_attr_as_stri
- ldb_msg_find_attr_as_uint
- ldb_msg_find_element
- ldb_msg_find_ldb_val
- ldb_msg_find_val
- ldb_msg_new
- ldb_msg_remove_attr
- ldb_msg_remove_element
- ldb_msg_sanity_check
- ldb_msg_sort_elements
ldb_next_
- ldb_next_del_trans
- ldb_next_end_trans
- ldb_next_init
- ldb_next_remote_request
- ldb_next_request
- ldb_next_start_trans
ldb_request
- ldb_request_add_control
- ldb_request_done
- ldb_request_get_control
- ldb_request_get_status
- ldb_request_set_state
ldb_schema_ calls
- ldb_schema_attribute_add
- ldb_schema_attribute_add_
- ldb_schema_attribute_by_n
- ldb_schema_attribute_remo
- ldb_schema_attribute_set_
- ldb_schema_fsmo_module_op
ldb_set_ calls
- ldb_set_create_perms
- ldb_set_debug
- ldb_set_debug_stderr
- ldb_set_default_dns
- ldb_set_errstring
- ldb_set_modules_dir
- ldb_set_opaque
- ldb_set_timeout
- ldb_set_utf8_default
- ldb_set_utf8_fns
ldb_transaction_ calls
- ldb_transaction_cancel
- ldb_transaction_commit
- ldb_transaction_start
ldb_val_ calls
- ldb_val_dup
- ldb_val_equal_exact
- ldb_valid_attr_name
- ldb_val_map_local
- ldb_val_map_remote
ldb miscellaneous calls
- ldb_asprintf_errstring
- ldb_base64_decode
- ldb_base64_encode
- ldb_binary_encode
- ldb_binary_encode_string
- ldb_casefold
- ldb_cmdline_process
- ldb_comparison_binary
- ldb_connect_backend
- ldb_debug_set
- ldb_filter_from_tree
- ldb_handle_new
- ldb_handler_copy
- ldb_map_init
- ldb_match_msg
- ldb_mod_register_control
- ldb_op_default_callback
- ldb_parse_control_strings
- ldb_parse_tree
- ldb_parse_tree_attr_replace
- ldb_register_samba_handle
- ldb_reply_get_control
- ldb_reset_err_string
- ldb_samba_syntax_by_lDAPD
- ldb_samba_syntax_by_name
- ldb_search_default_callback
- ldb_sequence_number
- ldb_setup_wellknown_attri
- ldb_should_b64_encode
- ldb_standard_syntax_by_name
- ldb_strerror
- ldb_string_to_time
- ldb_string_utc_to_time
- ldb_timestring
- ldb_timestring_utc
- ldb_wrap_connect