logo_kerberos.gif

Samba4 Port: hdb & ldb Interfaces

From K5Wiki
Revision as of 17:45, 11 September 2009 by Don (talk | contribs) (hdb Interface)

Jump to: navigation, search

This page aims to reduce the confusion about the two hdb interfaces, the LDB interface, and the big ldb interface.

LDB Interface

source4/kdc/hdb-samba4.c contains the LDB functions. In Samba4's heimdal/lib/hdb/hdb.h, Heimdal's HDB structure contains "hdb-" prefixed function-pointers to the LDB functions:

  1. (HDB *)->hdb_dbc = NULL;
  2. (HDB *)->hdb_open = LDB_open;
  3. (HDB *)->hdb_close = LDB_close;
  4. (HDB *)->hdb_fetch = LDB_fetch;
  5. (HDB *)->hdb_store = LDB_store;
  6. (HDB *)->hdb_remove = LDB_remove;
  7. (HDB *)->hdb_firstkey = LDB_firstkey;
  8. (HDB *)->hdb_nextkey = LDB_nextkey;
  9. (HDB *)->hdb_lock = LDB_lock;
  10. (HDB *)->hdb_unlock = LDB_unlock;
  11. (HDB *)->hdb_rename = LDB_rename;
  12. (HDB *)->hdb__get = NULL;
  13. (HDB *)->hdb__put = NULL;
  14. (HDB *)->hdb__del = NULL;
  15. (HDB *)->hdb_destroy = LDB_destroy;

hdb Interface

Samba4's heimdal/lib/hdb/hdb.c defines another set of hdb_ functions:

External entry-points:

  1. hdb_next_enctype2key
  2. hdb_enctype2key
  3. hdb_free_key
  4. hdb_lock
  5. hdb_unlock
  6. hdb_free_entry
  7. hdb_foreach
  8. hdb_check_db_format
  9. hdb_init_db
  10. hdb_list_builtin
  11. hdb_createandlers

There are also some event-handlers (local fcns invoked via function-pointers):

  1. hdb_ldb_free_entry in kdc/hdb-samba4.c
  2. hdb_samba4_create in kdc/kdc.c

heimdal-internal hdb interface

  1. copy_hdb_entry /heimdal/lib/hdb/asn1_hdb_entry.c
  2. copy_hdb_entry_alias /heimdal/lib/hdb/asn1_hdb_entry_alias.c
  3. decode_hdb_entry /heimdal/lib/hdb/asn1_hdb_entry.c
  4. decode_hdb_entry_alias /heimdal/lib/hdb/asn1_hdb_entry_alias.c
  5. encode_hdb_entry /heimdal/lib/hdb/asn1_hdb_entry.c
  6. encode_hdb_entry_alias /heimdal/lib/hdb/asn1_hdb_entry_alias.c

ldb interface

These routines are defined & used only in Samba4, and not in samba4's heimdal snapshot tree.

ldb basic calls

  1. ldb_add
  2. ldb_connect
  3. ldb_debug
  4. ldb_delete
  5. ldb_errstring
  6. ldb_init
  7. ldb_modify
  8. ldb_qsort
  9. ldb_rename
  10. ldb_request
  11. ldb_search
  12. ldb_wait

ldb_attr_ calls

  1. ldb_attr_casefold
  2. ldb_attr_dn
  3. ldb_attr_in_list
  4. ldb_attr_list_copy
  5. ldb_attr_list_copy_add

ldb_build_..._req calls

  1. ldb_build_add_req
  2. ldb_build_del_req
  3. ldb_build_extended_req
  4. ldb_build_mod_req
  5. ldb_build_rename_req
  6. ldb_build_search_req
  7. ldb_build_search_req_ex

ldb_dn_ calls

  1. ldb_dn_add_base
  2. ldb_dn_add_base_fmt
  3. ldb_dn_add_child
  4. ldb_dn_add_child_fmt
  5. ldb_dn_alloc_casefold
  6. ldb_dn_alloc_linearized
  7. ldb_dn_canonical_ex_strin
  8. ldb_dn_canonical_string
  9. ldb_dn_check_local
  10. ldb_dn_check_special
  11. ldb_dn_compare
  12. ldb_dn_compare_base
  13. ldb_dn_copy
  14. ldb_dn_escape_value
  15. ldb_dn_extended_add_synta
  16. ldb_dn_extended_syntax_by
  17. ldb_dn_from_ldb_val
  18. ldb_dn_get_casefold
  19. ldb_dn_get_comp_num
  20. ldb_dn_get_component_name
  21. ldb_dn_get_component_val
  22. ldb_dn_get_extended_compo
  23. ldb_dn_get_extended_linea
  24. ldb_dn_get_linearized
  25. ldb_dn_get_parent
  26. ldb_dn_get_rdn_name
  27. ldb_dn_get_rdn_val
  28. ldb_dn_has_extended
  29. ldb_dn_is_null
  30. ldb_dn_is_special
  31. ldb_dn_is_valid
  32. ldb_dn_map_local
  33. ldb_dn_map_rebase_remote
  34. ldb_dn_new
  35. ldb_dn_new_fmt
  36. ldb_dn_remove_base_compon
  37. ldb_dn_remove_child_compo
  38. ldb_dn_set_component
  39. ldb_dn_set_extended_compo
  40. ldb_dn_validate

ldb_extended_ calls

  1. ldb_extended
  2. ldb_extended_default_call
  3. ldb_extended_dn_in_module
  4. ldb_extended_dn_out_deref
  5. ldb_extended_dn_out_ldb_m
  6. ldb_extended_dn_store_mod

ldb_get_ calls

  1. ldb_get_config_basedn
  2. ldb_get_create_perms
  3. ldb_get_default_basedn
  4. ldb_get_event_context
  5. ldb_get_opaque
  6. ldb_get_root_basedn
  7. ldb_get_schema_basedn

ldb_ldif_ calls

  1. ldb_ldif_read_file
  2. ldb_ldif_read_free
  3. ldb_ldif_read_string
  4. ldb_ldif_write_file

ldb_module_ calls

  1. ldb_module_done
  2. ldb_module_get_ctx
  3. ldb_module_get_private
  4. ldb_module_new
  5. ldb_module_send_entry
  6. ldb_module_send_referral
  7. ldb_module_set_private
  8. ldb_modules_list_from_str
  9. ldb_init_module_chain
  10. ldb_load_modules
  11. ldb_load_modules_list

ldb_..._module_ops calls

  1. ldb_anr_module_ops
  2. ldb_asq_module_ops
  3. ldb_dsdb_cache_module_ops
  4. ldb_entryuuid_module_ops
  5. ldb_instancetype_module_ops
  6. ldb_kludge_acl_module_ops
  7. ldb_ldap_backend_ops
  8. ldb_ldapi_backend_ops
  9. ldb_ldaps_backend_ops
  10. ldb_linked_attributes_module_ops
  11. ldb_local_password_module_ops
  12. ldb_naming_fsmo_module_ops
  13. ldb_nsuniqueid_module_ops
  14. ldb_objectclass_module_ops
  15. ldb_objectguid_module_ops
  16. ldb_operational_module_ops
  17. ldb_paged_results_module_ops
  18. ldb_paged_searches_module_ops
  19. ldb_partition_module_ops
  20. ldb_password_hash_module_ops
  21. ldb_pdc_fsmo_module_ops
  22. ldb_ranged_results_module_ops
  23. ldb_rdn_name_module_ops
  24. ldb_register_module
  25. ldb_repl_meta_data_module_ops
  26. ldb_rootdse_module_ops
  27. ldb_samba3sam_module_ops
  28. ldb_samldb_module_ops
  29. ldb_server_sort_module_ops
  30. ldb_show_deleted_module_ops
  31. ldb_skel_module_ops
  32. ldb_subtree_delete_module_ops
  33. ldb_subtree_rename_module_ops
  34. ldb_tdb_backend_ops
  35. ldb_update_keytab_module_ops
  36. ldb_wins_ldb_module_ops

ldb_msg_ calls

  1. ldb_msg_add
  2. ldb_msg_add_empty
  3. ldb_msg_add_fmt
  4. ldb_msg_add_steal_string
  5. ldb_msg_add_steal_value
  6. ldb_msg_add_string
  7. ldb_msg_add_value
  8. ldb_msg_canonicalize
  9. ldb_msg_check_string_attr
  10. ldb_msg_copy
  11. ldb_msg_copy_attr
  12. ldb_msg_copy_shallow
  13. ldb_msg_diff
  14. ldb_msg_element_compare
  15. ldb_msg_find_attr_as_bool
  16. ldb_msg_find_attr_as_dn
  17. ldb_msg_find_attr_as_int
  18. ldb_msg_find_attr_as_int6
  19. ldb_msg_find_attr_as_stri
  20. ldb_msg_find_attr_as_uint
  21. ldb_msg_find_element
  22. ldb_msg_find_ldb_val
  23. ldb_msg_find_val
  24. ldb_msg_new
  25. ldb_msg_remove_attr
  26. ldb_msg_remove_element
  27. ldb_msg_sanity_check
  28. ldb_msg_sort_elements

ldb_next_

  1. ldb_next_del_trans
  2. ldb_next_end_trans
  3. ldb_next_init
  4. ldb_next_remote_request
  5. ldb_next_request
  6. ldb_next_start_trans

ldb_request

  1. ldb_request_add_control
  2. ldb_request_done
  3. ldb_request_get_control
  4. ldb_request_get_status
  5. ldb_request_set_state

ldb_schema_ calls

  1. ldb_schema_attribute_add
  2. ldb_schema_attribute_add_
  3. ldb_schema_attribute_by_n
  4. ldb_schema_attribute_remo
  5. ldb_schema_attribute_set_
  6. ldb_schema_fsmo_module_op

ldb_set_ calls

  1. ldb_set_create_perms
  2. ldb_set_debug
  3. ldb_set_debug_stderr
  4. ldb_set_default_dns
  5. ldb_set_errstring
  6. ldb_set_modules_dir
  7. ldb_set_opaque
  8. ldb_set_timeout
  9. ldb_set_utf8_default
  10. ldb_set_utf8_fns

ldb_transaction_ calls

  1. ldb_transaction_cancel
  2. ldb_transaction_commit
  3. ldb_transaction_start

ldb_val_ calls

  1. ldb_val_dup
  2. ldb_val_equal_exact
  3. ldb_valid_attr_name
  4. ldb_val_map_local
  5. ldb_val_map_remote


ldb miscellaneous calls

  1. ldb_asprintf_errstring
  2. ldb_base64_decode
  3. ldb_base64_encode
  4. ldb_binary_encode
  5. ldb_binary_encode_string
  6. ldb_casefold
  7. ldb_cmdline_process
  8. ldb_comparison_binary
  9. ldb_connect_backend
  10. ldb_debug_set
  11. ldb_filter_from_tree
  12. ldb_handle_new
  13. ldb_handler_copy
  14. ldb_map_init
  15. ldb_match_msg
  16. ldb_mod_register_control
  17. ldb_op_default_callback
  18. ldb_parse_control_strings
  19. ldb_parse_tree
  20. ldb_parse_tree_attr_replace
  21. ldb_register_samba_handle
  22. ldb_reply_get_control
  23. ldb_reset_err_string
  24. ldb_samba_syntax_by_lDAPD
  25. ldb_samba_syntax_by_name
  26. ldb_search_default_callback
  27. ldb_sequence_number
  28. ldb_setup_wellknown_attri
  29. ldb_should_b64_encode
  30. ldb_standard_syntax_by_name
  31. ldb_strerror
  32. ldb_string_to_time
  33. ldb_string_utc_to_time
  34. ldb_timestring
  35. ldb_timestring_utc
  36. ldb_wrap_connect