sssd  2.2.3
About: SSSD provides a set of daemons to manage access to remote directories and authentication mechanisms such as LDAP, Kerberos or FreeIPA. It provides also an NSS and PAM interface toward the system.
  Fossies Dox: sssd-2.2.3.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

ad_common.c File Reference
#include <ctype.h>
#include "providers/ad/ad_common.h"
#include "providers/ad/ad_opts.h"
#include "providers/be_dyndns.h"
#include "providers/fail_over.h"
Include dependency graph for ad_common.c:

Go to the source code of this file.

Data Structures

struct  ad_server_data
 

Functions

errno_t ad_set_search_bases (struct sdap_options *id_opts, struct sdap_domain *sdap)
 
static errno_t ad_set_sdap_options (struct ad_options *ad_opts, struct sdap_options *id_opts)
 
static struct sdap_optionsad_create_default_sdap_options (TALLOC_CTX *mem_ctx, struct data_provider *dp)
 
static errno_t ad_create_sdap_options (TALLOC_CTX *mem_ctx, struct confdb_ctx *cdb, const char *conf_path, struct data_provider *dp, struct sdap_options **_id_opts)
 
struct ad_optionsad_create_options (TALLOC_CTX *mem_ctx, struct confdb_ctx *cdb, const char *conf_path, struct data_provider *dp, struct sss_domain_info *subdom)
 
static errno_t set_common_ad_trust_opts (struct ad_options *ad_options, const char *realm, const char *ad_domain, const char *hostname, const char *keytab)
 
struct ad_optionsad_create_2way_trust_options (TALLOC_CTX *mem_ctx, struct confdb_ctx *cdb, const char *conf_path, struct data_provider *dp, const char *realm, struct sss_domain_info *subdom, const char *hostname, const char *keytab)
 
struct ad_optionsad_create_1way_trust_options (TALLOC_CTX *mem_ctx, struct confdb_ctx *cdb, const char *subdom_conf_path, struct data_provider *dp, struct sss_domain_info *subdom, const char *hostname, const char *keytab, const char *sasl_authid)
 
errno_t ad_get_common_options (TALLOC_CTX *mem_ctx, struct confdb_ctx *cdb, const char *conf_path, struct sss_domain_info *dom, struct ad_options **_opts)
 
static void ad_resolve_callback (void *private_data, struct fo_server *server)
 
static errno_t _ad_servers_init (struct ad_service *service, struct be_ctx *bectx, const char *fo_service, const char *fo_gc_service, const char *servers, const char *ad_domain, bool primary)
 
static errno_t ad_primary_servers_init (struct ad_service *service, struct be_ctx *bectx, const char *servers, const char *fo_service, const char *fo_gc_service, const char *ad_domain)
 
static errno_t ad_backup_servers_init (struct ad_service *service, struct be_ctx *bectx, const char *servers, const char *fo_service, const char *fo_gc_service, const char *ad_domain)
 
static int ad_user_data_cmp (void *ud1, void *ud2)
 
static void ad_online_cb (void *pvt)
 
errno_t ad_failover_init (TALLOC_CTX *mem_ctx, struct be_ctx *bectx, const char *primary_servers, const char *backup_servers, const char *krb5_realm, const char *ad_service, const char *ad_gc_service, const char *ad_domain, bool use_kdcinfo, size_t n_lookahead_primary, size_t n_lookahead_backup, struct ad_service **_service)
 
void ad_failover_reset (struct be_ctx *bectx, struct ad_service *adsvc)
 
static bool ad_krb5info_file_filter (struct fo_server *server)
 
errno_t ad_get_id_options (struct ad_options *ad_opts, struct confdb_ctx *cdb, const char *conf_path, struct data_provider *dp, struct sdap_options **_opts)
 
errno_t ad_get_autofs_options (struct ad_options *ad_opts, struct confdb_ctx *cdb, const char *conf_path)
 
errno_t ad_get_auth_options (TALLOC_CTX *mem_ctx, struct ad_options *ad_opts, struct be_ctx *bectx, struct dp_option **_opts)
 
errno_t ad_get_dyndns_options (struct be_ctx *be_ctx, struct ad_options *ad_opts)
 
struct ad_id_ctxad_id_ctx_init (struct ad_options *ad_opts, struct be_ctx *bectx)
 
struct sdap_id_conn_ctxad_get_dom_ldap_conn (struct ad_id_ctx *ad_ctx, struct sss_domain_info *dom)
 
struct sdap_id_conn_ctx ** ad_gc_conn_list (TALLOC_CTX *mem_ctx, struct ad_id_ctx *ad_ctx, struct sss_domain_info *dom)
 
struct sdap_id_conn_ctx ** ad_ldap_conn_list (TALLOC_CTX *mem_ctx, struct ad_id_ctx *ad_ctx, struct sss_domain_info *dom)
 
struct sdap_id_conn_ctx ** ad_user_conn_list (TALLOC_CTX *mem_ctx, struct ad_id_ctx *ad_ctx, struct sss_domain_info *dom)
 
errno_t ad_inherit_opts_if_needed (struct dp_option *parent_opts, struct dp_option *suddom_opts, struct confdb_ctx *cdb, const char *subdom_conf_path, int opt_id)
 

Function Documentation

◆ _ad_servers_init()

static errno_t _ad_servers_init ( struct ad_service service,
struct be_ctx bectx,
const char *  fo_service,
const char *  fo_gc_service,
const char *  servers,
const char *  ad_domain,
bool  primary 
)
static

◆ ad_backup_servers_init()

static errno_t ad_backup_servers_init ( struct ad_service service,
struct be_ctx bectx,
const char *  servers,
const char *  fo_service,
const char *  fo_gc_service,
const char *  ad_domain 
)
inlinestatic

Definition at line 684 of file ad_common.c.

References _ad_servers_init().

Referenced by ad_failover_init().

◆ ad_create_1way_trust_options()

struct ad_options* ad_create_1way_trust_options ( TALLOC_CTX *  mem_ctx,
struct confdb_ctx cdb,
const char *  subdom_conf_path,
struct data_provider dp,
struct sss_domain_info subdom,
const char *  hostname,
const char *  keytab,
const char *  sasl_authid 
)

◆ ad_create_2way_trust_options()

struct ad_options* ad_create_2way_trust_options ( TALLOC_CTX *  mem_ctx,
struct confdb_ctx cdb,
const char *  conf_path,
struct data_provider dp,
const char *  realm,
struct sss_domain_info subdom,
const char *  hostname,
const char *  keytab 
)

◆ ad_create_default_sdap_options()

◆ ad_create_options()

struct ad_options* ad_create_options ( TALLOC_CTX *  mem_ctx,
struct confdb_ctx cdb,
const char *  conf_path,
struct data_provider dp,
struct sss_domain_info subdom 
)

◆ ad_create_sdap_options()

◆ ad_failover_init()

errno_t ad_failover_init ( TALLOC_CTX *  mem_ctx,
struct be_ctx bectx,
const char *  primary_servers,
const char *  backup_servers,
const char *  krb5_realm,
const char *  ad_service,
const char *  ad_gc_service,
const char *  ad_domain,
bool  use_kdcinfo,
size_t  n_lookahead_primary,
size_t  n_lookahead_backup,
struct ad_service **  _service 
)

◆ ad_failover_reset()

void ad_failover_reset ( struct be_ctx bectx,
struct ad_service adsvc 
)

◆ ad_gc_conn_list()

◆ ad_get_auth_options()

◆ ad_get_autofs_options()

errno_t ad_get_autofs_options ( struct ad_options ad_opts,
struct confdb_ctx cdb,
const char *  conf_path 
)

◆ ad_get_common_options()

◆ ad_get_dom_ldap_conn()

◆ ad_get_dyndns_options()

errno_t ad_get_dyndns_options ( struct be_ctx be_ctx,
struct ad_options ad_opts 
)

◆ ad_get_id_options()

errno_t ad_get_id_options ( struct ad_options ad_opts,
struct confdb_ctx cdb,
const char *  conf_path,
struct data_provider dp,
struct sdap_options **  _opts 
)

◆ ad_id_ctx_init()

◆ ad_inherit_opts_if_needed()

errno_t ad_inherit_opts_if_needed ( struct dp_option parent_opts,
struct dp_option suddom_opts,
struct confdb_ctx cdb,
const char *  subdom_conf_path,
int  opt_id 
)

◆ ad_krb5info_file_filter()

static bool ad_krb5info_file_filter ( struct fo_server server)
static

Definition at line 861 of file ad_common.c.

References fo_get_server_user_data(), ad_server_data::gc, and NULL.

Referenced by ad_resolve_callback().

◆ ad_ldap_conn_list()

struct sdap_id_conn_ctx** ad_ldap_conn_list ( TALLOC_CTX *  mem_ctx,
struct ad_id_ctx ad_ctx,
struct sss_domain_info dom 
)

Definition at line 1424 of file ad_common.c.

References ad_get_dom_ldap_conn(), and NULL.

Referenced by get_conn_list(), and ipa_get_ad_acct_send().

◆ ad_online_cb()

static void ad_online_cb ( void *  pvt)
static

Definition at line 711 of file ad_common.c.

References DEBUG, NULL, SSSDBG_CRIT_FAILURE, and SSSDBG_TRACE_FUNC.

Referenced by ad_failover_init().

◆ ad_primary_servers_init()

static errno_t ad_primary_servers_init ( struct ad_service service,
struct be_ctx bectx,
const char *  servers,
const char *  fo_service,
const char *  fo_gc_service,
const char *  ad_domain 
)
inlinestatic

Definition at line 674 of file ad_common.c.

References _ad_servers_init().

Referenced by ad_failover_init().

◆ ad_resolve_callback()

◆ ad_set_sdap_options()

◆ ad_set_search_bases()

◆ ad_user_conn_list()

struct sdap_id_conn_ctx** ad_user_conn_list ( TALLOC_CTX *  mem_ctx,
struct ad_id_ctx ad_ctx,
struct sss_domain_info dom 
)

◆ ad_user_data_cmp()

static int ad_user_data_cmp ( void *  ud1,
void *  ud2 
)
static

Definition at line 693 of file ad_common.c.

References DEBUG, ad_server_data::gc, NULL, and SSSDBG_TRACE_FUNC.

Referenced by ad_failover_init().

◆ set_common_ad_trust_opts()

static errno_t set_common_ad_trust_opts ( struct ad_options ad_options,
const char *  realm,
const char *  ad_domain,
const char *  hostname,
const char *  keytab 
)
static