Print this page
NEX-19665 Several door servers don't properly handle exiting threads
Review by: Gordon Ross <gordon.ross@nexenta.com>
Review by: Evan Layton <evan.layton@nexenta.com>
NEX-2225 Unable to join NexentaStor to 2008 AD
NEX-1638 Updated DC Locator
 Includes work by: matt.barden@nexenta.com, kevin.crowe@nexenta.com
re #13190 rb4312 idmapd error -9961 (No AD servers)


   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  23  * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
  24  */
  25 
  26 /*
  27  * Initialization routines
  28  */
  29 
  30 #include "idmapd.h"
  31 #include <signal.h>
  32 #include <thread.h>
  33 #include <string.h>
  34 #include <errno.h>
  35 #include <assert.h>
  36 #include <unistd.h>
  37 #include <sys/types.h>
  38 #include <sys/stat.h>
  39 #include <rpcsvc/daemon_utils.h>
  40 
  41 
  42 int
  43 init_mapping_system()


 340 }
 341 
 342 void
 343 print_idmapdstate(void)
 344 {
 345         int i, j;
 346         idmap_pg_config_t *pgcfg;
 347         idmap_trustedforest_t *tf;
 348 
 349         RDLOCK_CONFIG();
 350 
 351         if (_idmapdstate.cfg == NULL) {
 352                 idmapdlog(LOG_INFO, "Null configuration");
 353                 UNLOCK_CONFIG();
 354                 return;
 355         }
 356 
 357         pgcfg = &_idmapdstate.cfg->pgcfg;
 358 
 359         idmapdlog(LOG_DEBUG, "list_size_limit=%llu", pgcfg->list_size_limit);

 360         idmapdlog(LOG_DEBUG, "default_domain=%s",
 361             CHECK_NULL(pgcfg->default_domain));
 362         idmapdlog(LOG_DEBUG, "domain_name=%s", CHECK_NULL(pgcfg->domain_name));
 363         idmapdlog(LOG_DEBUG, "machine_sid=%s", CHECK_NULL(pgcfg->machine_sid));
 364         if (pgcfg->domain_controller == NULL ||
 365             pgcfg->domain_controller[0].host[0] == '\0') {
 366                 idmapdlog(LOG_DEBUG, "No domain controllers known");
 367         } else {
 368                 for (i = 0; pgcfg->domain_controller[i].host[0] != '\0'; i++)
 369                         idmapdlog(LOG_DEBUG, "domain_controller=%s port=%d",
 370                             pgcfg->domain_controller[i].host,
 371                             pgcfg->domain_controller[i].port);
 372         }
 373         idmapdlog(LOG_DEBUG, "forest_name=%s", CHECK_NULL(pgcfg->forest_name));
 374         idmapdlog(LOG_DEBUG, "site_name=%s", CHECK_NULL(pgcfg->site_name));
 375         if (pgcfg->global_catalog == NULL ||
 376             pgcfg->global_catalog[0].host[0] == '\0') {
 377                 idmapdlog(LOG_DEBUG, "No global catalog servers known");
 378         } else {
 379                 for (i = 0; pgcfg->global_catalog[i].host[0] != '\0'; i++)




   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  23  * Copyright 2018 Nexenta Systems, Inc.  All rights reserved.
  24  */
  25 
  26 /*
  27  * Initialization routines
  28  */
  29 
  30 #include "idmapd.h"
  31 #include <signal.h>
  32 #include <thread.h>
  33 #include <string.h>
  34 #include <errno.h>
  35 #include <assert.h>
  36 #include <unistd.h>
  37 #include <sys/types.h>
  38 #include <sys/stat.h>
  39 #include <rpcsvc/daemon_utils.h>
  40 
  41 
  42 int
  43 init_mapping_system()


 340 }
 341 
 342 void
 343 print_idmapdstate(void)
 344 {
 345         int i, j;
 346         idmap_pg_config_t *pgcfg;
 347         idmap_trustedforest_t *tf;
 348 
 349         RDLOCK_CONFIG();
 350 
 351         if (_idmapdstate.cfg == NULL) {
 352                 idmapdlog(LOG_INFO, "Null configuration");
 353                 UNLOCK_CONFIG();
 354                 return;
 355         }
 356 
 357         pgcfg = &_idmapdstate.cfg->pgcfg;
 358 
 359         idmapdlog(LOG_DEBUG, "list_size_limit=%llu", pgcfg->list_size_limit);
 360         idmapdlog(LOG_DEBUG, "max_threads=%llu", pgcfg->max_threads);
 361         idmapdlog(LOG_DEBUG, "default_domain=%s",
 362             CHECK_NULL(pgcfg->default_domain));
 363         idmapdlog(LOG_DEBUG, "domain_name=%s", CHECK_NULL(pgcfg->domain_name));
 364         idmapdlog(LOG_DEBUG, "machine_sid=%s", CHECK_NULL(pgcfg->machine_sid));
 365         if (pgcfg->domain_controller == NULL ||
 366             pgcfg->domain_controller[0].host[0] == '\0') {
 367                 idmapdlog(LOG_DEBUG, "No domain controllers known");
 368         } else {
 369                 for (i = 0; pgcfg->domain_controller[i].host[0] != '\0'; i++)
 370                         idmapdlog(LOG_DEBUG, "domain_controller=%s port=%d",
 371                             pgcfg->domain_controller[i].host,
 372                             pgcfg->domain_controller[i].port);
 373         }
 374         idmapdlog(LOG_DEBUG, "forest_name=%s", CHECK_NULL(pgcfg->forest_name));
 375         idmapdlog(LOG_DEBUG, "site_name=%s", CHECK_NULL(pgcfg->site_name));
 376         if (pgcfg->global_catalog == NULL ||
 377             pgcfg->global_catalog[0].host[0] == '\0') {
 378                 idmapdlog(LOG_DEBUG, "No global catalog servers known");
 379         } else {
 380                 for (i = 0; pgcfg->global_catalog[i].host[0] != '\0'; i++)