Lines Matching defs:pgcfg
1329 idmap_pg_config_t *pgcfg = &_idmapdstate.cfg->pgcfg;
1363 if (pgcfg->domain_name == NULL)
1370 max_ttl = (int)pgcfg->rediscovery_interval;
1539 idmap_cfg_load_smf(idmap_cfg_handles_t *handles, idmap_pg_config_t *pgcfg,
1562 &pgcfg->eph_map_unres_sids, B_TRUE);
1567 &pgcfg->use_ads, B_TRUE);
1572 &pgcfg->use_lsa, B_TRUE);
1577 &pgcfg->disable_cross_forest_trusts, B_TRUE);
1585 pgcfg->directory_based_mapping = DIRECTORY_MAPPING_NONE;
1587 pgcfg->directory_based_mapping = DIRECTORY_MAPPING_NAME;
1589 pgcfg->directory_based_mapping = DIRECTORY_MAPPING_IDMU;
1591 pgcfg->directory_based_mapping = DIRECTORY_MAPPING_NONE;
1600 &pgcfg->list_size_limit, SCF_TYPE_COUNT);
1605 &pgcfg->id_cache_timeout, SCF_TYPE_COUNT);
1608 if (pgcfg->id_cache_timeout == 0)
1609 pgcfg->id_cache_timeout = ID_CACHE_TMO_DEFAULT;
1612 &pgcfg->name_cache_timeout, SCF_TYPE_COUNT);
1615 if (pgcfg->name_cache_timeout == 0)
1616 pgcfg->name_cache_timeout = NAME_CACHE_TMO_DEFAULT;
1619 &pgcfg->rediscovery_interval, SCF_TYPE_COUNT);
1622 if (pgcfg->rediscovery_interval == 0)
1623 pgcfg->rediscovery_interval = REDISCOVERY_INTERVAL_DEFAULT;
1626 &pgcfg->domain_name);
1630 if (pgcfg->domain_name != NULL &&
1631 pgcfg->domain_name[0] == '\0') {
1632 free(pgcfg->domain_name);
1633 pgcfg->domain_name = NULL;
1636 pgcfg->domain_name);
1637 pgcfg->domain_name_auto_disc = B_FALSE;
1641 &pgcfg->default_domain);
1651 if (pgcfg->default_domain == NULL && pgcfg->domain_name != NULL) {
1652 pgcfg->default_domain = strdup(pgcfg->domain_name);
1670 pgcfg->domain_guid = s;
1671 pgcfg->domain_guid_auto_disc = B_FALSE;
1676 rc = get_val_astring(handles, "machine_uuid", &pgcfg->machine_uuid);
1679 if (pgcfg->machine_uuid == NULL) {
1681 if (generate_machine_uuid(&pgcfg->machine_uuid) < 0)
1684 "machine_uuid", pgcfg->machine_uuid);
1689 rc = get_val_astring(handles, "machine_sid", &pgcfg->machine_sid);
1692 if (pgcfg->machine_sid == NULL) {
1697 if (generate_machine_sid(&pgcfg->machine_sid,
1698 pgcfg->machine_uuid) < 0)
1701 "machine_sid", pgcfg->machine_sid);
1707 &pgcfg->domain_controller);
1712 pgcfg->domain_controller);
1713 pgcfg->domain_controller_auto_disc = B_FALSE;
1717 &pgcfg->preferred_dc);
1722 pgcfg->preferred_dc);
1723 pgcfg->preferred_dc_auto_disc = B_FALSE;
1726 rc = get_val_astring(handles, "forest_name", &pgcfg->forest_name);
1731 pgcfg->forest_name);
1732 pgcfg->forest_name_auto_disc = B_FALSE;
1735 rc = get_val_astring(handles, "site_name", &pgcfg->site_name);
1739 (void) ad_disc_set_SiteName(handles->ad_ctx, pgcfg->site_name);
1742 &pgcfg->global_catalog);
1747 pgcfg->global_catalog);
1748 pgcfg->global_catalog_auto_disc = B_FALSE;
1752 if (pgcfg->directory_based_mapping != DIRECTORY_MAPPING_NAME)
1756 &pgcfg->ad_unixuser_attr);
1759 if (pgcfg->ad_unixuser_attr != NULL &&
1760 !valid_ldap_attr(pgcfg->ad_unixuser_attr)) {
1762 "valid LDAP attribute name", pgcfg->ad_unixuser_attr);
1767 &pgcfg->ad_unixgroup_attr);
1770 if (pgcfg->ad_unixgroup_attr != NULL &&
1771 !valid_ldap_attr(pgcfg->ad_unixgroup_attr)) {
1773 "valid LDAP attribute name", pgcfg->ad_unixgroup_attr);
1778 &pgcfg->nldap_winname_attr);
1781 if (pgcfg->nldap_winname_attr != NULL &&
1782 !valid_ldap_attr(pgcfg->nldap_winname_attr)) {
1784 "valid LDAP attribute name", pgcfg->nldap_winname_attr);
1787 if (pgcfg->ad_unixuser_attr == NULL &&
1788 pgcfg->ad_unixgroup_attr == NULL &&
1789 pgcfg->nldap_winname_attr == NULL) {
1812 discover_trusted_domains(idmap_pg_config_t *pgcfg, ad_disc_t ad_ctx)
1824 pgcfg->trusted_domains =
1827 if (pgcfg->forest_name != NULL && pgcfg->trusted_domains != NULL &&
1828 pgcfg->trusted_domains[0].domain[0] != '\0') {
1834 for (i = 0; pgcfg->trusted_domains[i].domain[0] != '\0'; i++)
1841 for (i = 0; pgcfg->trusted_domains[i].domain[0] != '\0'; i++) {
1842 trusteddomain = pgcfg->trusted_domains[i].domain;
1859 if (strcasecmp(forestname, pgcfg->forest_name) == 0) {
1945 pgcfg->num_trusted_forests = j;
1946 pgcfg->trusted_forests = trustedforests;
1961 idmap_cfg_discover1(idmap_cfg_handles_t *handles, idmap_pg_config_t *pgcfg)
1978 if (pgcfg->domain_name == NULL) {
1985 if (pgcfg->domain_controller == NULL)
1986 pgcfg->domain_controller =
1989 &pgcfg->domain_controller_auto_disc);
1991 if (pgcfg->domain_guid == NULL) {
1994 &pgcfg->domain_guid_auto_disc);
1998 pgcfg->domain_guid = strdup(buf);
2002 if (pgcfg->forest_name == NULL)
2003 pgcfg->forest_name = ad_disc_get_ForestName(ad_ctx,
2004 &pgcfg->forest_name_auto_disc);
2006 if (pgcfg->site_name == NULL)
2007 pgcfg->site_name = ad_disc_get_SiteName(ad_ctx,
2008 &pgcfg->site_name_auto_disc);
2011 log_if_unable(pgcfg->domain_name, "Domain Name");
2012 log_if_unable(pgcfg->domain_controller,
2014 log_if_unable(pgcfg->domain_guid, "Domain GUID");
2015 log_if_unable(pgcfg->forest_name, "Forest Name");
2016 log_if_unable(pgcfg->site_name, "Site Name");
2051 * useful information from pgcfg before we get here, so we
2055 idmap_cfg_discover2(idmap_cfg_handles_t *handles, idmap_pg_config_t *pgcfg)
2069 if (pgcfg->global_catalog == NULL)
2070 pgcfg->global_catalog =
2073 &pgcfg->global_catalog_auto_disc);
2075 if (pgcfg->global_catalog != NULL) {
2076 pgcfg->domains_in_forest =
2079 if (!pgcfg->disable_cross_forest_trusts)
2080 discover_trusted_domains(pgcfg, ad_ctx);
2084 log_if_unable(pgcfg->global_catalog, "Global Catalog");
2085 log_if_unable(pgcfg->domains_in_forest,
2146 live_pgcfg = &cfg->pgcfg;
2426 idmap_cfg_unload(idmap_pg_config_t *pgcfg)
2429 if (pgcfg->default_domain) {
2430 free(pgcfg->default_domain);
2431 pgcfg->default_domain = NULL;
2433 if (pgcfg->domain_name) {
2434 free(pgcfg->domain_name);
2435 pgcfg->domain_name = NULL;
2437 if (pgcfg->domain_guid) {
2438 free(pgcfg->domain_guid);
2439 pgcfg->domain_guid = NULL;
2441 if (pgcfg->machine_sid) {
2442 free(pgcfg->machine_sid);
2443 pgcfg->machine_sid = NULL;
2445 if (pgcfg->domain_controller) {
2446 free(pgcfg->domain_controller);
2447 pgcfg->domain_controller = NULL;
2449 if (pgcfg->forest_name) {
2450 free(pgcfg->forest_name);
2451 pgcfg->forest_name = NULL;
2453 if (pgcfg->site_name) {
2454 free(pgcfg->site_name);
2455 pgcfg->site_name = NULL;
2457 if (pgcfg->global_catalog) {
2458 free(pgcfg->global_catalog);
2459 pgcfg->global_catalog = NULL;
2461 if (pgcfg->trusted_domains) {
2462 free(pgcfg->trusted_domains);
2463 pgcfg->trusted_domains = NULL;
2465 if (pgcfg->trusted_forests)
2466 free_trusted_forests(&pgcfg->trusted_forests,
2467 &pgcfg->num_trusted_forests);
2469 if (pgcfg->ad_unixuser_attr) {
2470 free(pgcfg->ad_unixuser_attr);
2471 pgcfg->ad_unixuser_attr = NULL;
2473 if (pgcfg->ad_unixgroup_attr) {
2474 free(pgcfg->ad_unixgroup_attr);
2475 pgcfg->ad_unixgroup_attr = NULL;
2477 if (pgcfg->nldap_winname_attr) {
2478 free(pgcfg->nldap_winname_attr);
2479 pgcfg->nldap_winname_attr = NULL;
2487 idmap_cfg_unload(&cfg->pgcfg);