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 #ifndef _IDMAP_CONFIG_H
  27 #define _IDMAP_CONFIG_H
  28 
  29 
  30 #include "idmap.h"
  31 #include "addisc.h"
  32 #include <libscf.h>
  33 #include <synch.h>
  34 #include <sys/uuid.h>
  35 
  36 #ifdef __cplusplus
  37 extern "C" {
  38 #endif
  39 
  40 #define MAX_POLICY_SIZE 1023
  41 
  42 #define DIRECTORY_MAPPING_NONE  0
  43 #define DIRECTORY_MAPPING_NAME  1
 
  58         scf_instance_t          *instance;
  59         scf_service_t           *service;
  60         scf_propertygroup_t     *config_pg;
  61         scf_propertygroup_t     *debug_pg;
  62         ad_disc_t               ad_ctx;
  63 } idmap_cfg_handles_t;
  64 
  65 /*
  66  * This structure stores AD and AD-related configuration
  67  */
  68 typedef struct idmap_trustedforest {
  69         char            *forest_name;
  70         ad_disc_ds_t    *global_catalog;        /* global catalog hosts */
  71         ad_disc_domainsinforest_t
  72                         *domains_in_forest;
  73 } idmap_trustedforest_t;
  74 
  75 
  76 typedef struct idmap_pg_config {
  77         uint64_t        list_size_limit;
  78         uint64_t        id_cache_timeout;
  79         uint64_t        name_cache_timeout;
  80         uint64_t        rediscovery_interval;
  81         char            *machine_uuid;          /* machine uuid */
  82         char            *machine_sid;           /* machine sid */
  83         char            *default_domain;        /* default domain name */
  84         char            *domain_name;           /* AD domain name */
  85         boolean_t       domain_name_auto_disc;
  86         char            *domain_guid;           /* GUID (string) */
  87         boolean_t       domain_guid_auto_disc;
  88         ad_disc_ds_t    *domain_controller;     /* domain controller hosts */
  89         boolean_t       domain_controller_auto_disc;
  90         char            *forest_name;           /* forest name */
  91         boolean_t       forest_name_auto_disc;
  92         char            *site_name;             /* site name */
  93         boolean_t       site_name_auto_disc;
  94         ad_disc_ds_t    *global_catalog;        /* global catalog hosts */
  95         boolean_t       global_catalog_auto_disc;
  96         ad_disc_domainsinforest_t
  97                         *domains_in_forest;
 
 | 
 
 
   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 #ifndef _IDMAP_CONFIG_H
  27 #define _IDMAP_CONFIG_H
  28 
  29 
  30 #include "idmap.h"
  31 #include "addisc.h"
  32 #include <libscf.h>
  33 #include <synch.h>
  34 #include <sys/uuid.h>
  35 
  36 #ifdef __cplusplus
  37 extern "C" {
  38 #endif
  39 
  40 #define MAX_POLICY_SIZE 1023
  41 
  42 #define DIRECTORY_MAPPING_NONE  0
  43 #define DIRECTORY_MAPPING_NAME  1
 
  58         scf_instance_t          *instance;
  59         scf_service_t           *service;
  60         scf_propertygroup_t     *config_pg;
  61         scf_propertygroup_t     *debug_pg;
  62         ad_disc_t               ad_ctx;
  63 } idmap_cfg_handles_t;
  64 
  65 /*
  66  * This structure stores AD and AD-related configuration
  67  */
  68 typedef struct idmap_trustedforest {
  69         char            *forest_name;
  70         ad_disc_ds_t    *global_catalog;        /* global catalog hosts */
  71         ad_disc_domainsinforest_t
  72                         *domains_in_forest;
  73 } idmap_trustedforest_t;
  74 
  75 
  76 typedef struct idmap_pg_config {
  77         uint64_t        list_size_limit;
  78         uint64_t        max_threads;
  79         uint64_t        id_cache_timeout;
  80         uint64_t        name_cache_timeout;
  81         uint64_t        rediscovery_interval;
  82         char            *machine_uuid;          /* machine uuid */
  83         char            *machine_sid;           /* machine sid */
  84         char            *default_domain;        /* default domain name */
  85         char            *domain_name;           /* AD domain name */
  86         boolean_t       domain_name_auto_disc;
  87         char            *domain_guid;           /* GUID (string) */
  88         boolean_t       domain_guid_auto_disc;
  89         ad_disc_ds_t    *domain_controller;     /* domain controller hosts */
  90         boolean_t       domain_controller_auto_disc;
  91         char            *forest_name;           /* forest name */
  92         boolean_t       forest_name_auto_disc;
  93         char            *site_name;             /* site name */
  94         boolean_t       site_name_auto_disc;
  95         ad_disc_ds_t    *global_catalog;        /* global catalog hosts */
  96         boolean_t       global_catalog_auto_disc;
  97         ad_disc_domainsinforest_t
  98                         *domains_in_forest;
 
 |