1*c5c4113dSnw /* 2*c5c4113dSnw * CDDL HEADER START 3*c5c4113dSnw * 4*c5c4113dSnw * The contents of this file are subject to the terms of the 5*c5c4113dSnw * Common Development and Distribution License (the "License"). 6*c5c4113dSnw * You may not use this file except in compliance with the License. 7*c5c4113dSnw * 8*c5c4113dSnw * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*c5c4113dSnw * or http://www.opensolaris.org/os/licensing. 10*c5c4113dSnw * See the License for the specific language governing permissions 11*c5c4113dSnw * and limitations under the License. 12*c5c4113dSnw * 13*c5c4113dSnw * When distributing Covered Code, include this CDDL HEADER in each 14*c5c4113dSnw * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*c5c4113dSnw * If applicable, add the following below this CDDL HEADER, with the 16*c5c4113dSnw * fields enclosed by brackets "[]" replaced with your own identifying 17*c5c4113dSnw * information: Portions Copyright [yyyy] [name of copyright owner] 18*c5c4113dSnw * 19*c5c4113dSnw * CDDL HEADER END 20*c5c4113dSnw */ 21*c5c4113dSnw /* 22*c5c4113dSnw * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 23*c5c4113dSnw * Use is subject to license terms. 24*c5c4113dSnw */ 25*c5c4113dSnw 26*c5c4113dSnw #ifndef _IDMAP_CONFIG_H 27*c5c4113dSnw #define _IDMAP_CONFIG_H 28*c5c4113dSnw 29*c5c4113dSnw #pragma ident "%Z%%M% %I% %E% SMI" 30*c5c4113dSnw 31*c5c4113dSnw #include "idmap.h" 32*c5c4113dSnw #include <libscf.h> 33*c5c4113dSnw #include <synch.h> 34*c5c4113dSnw 35*c5c4113dSnw #ifdef __cplusplus 36*c5c4113dSnw extern "C" { 37*c5c4113dSnw #endif 38*c5c4113dSnw 39*c5c4113dSnw #define MAX_POLICY_SIZE 1023 40*c5c4113dSnw 41*c5c4113dSnw typedef struct idmap_scf_handles { 42*c5c4113dSnw scf_handle_t *main; 43*c5c4113dSnw scf_instance_t *instance; 44*c5c4113dSnw scf_service_t *service; 45*c5c4113dSnw scf_propertygroup_t *config_pg; 46*c5c4113dSnw scf_propertygroup_t *general_pg; 47*c5c4113dSnw } idmap_scf_handles_t; 48*c5c4113dSnw 49*c5c4113dSnw typedef struct idmap_pg_config { 50*c5c4113dSnw uint64_t list_size_limit; 51*c5c4113dSnw char *mapping_domain; /* mapping dopmain */ 52*c5c4113dSnw char *machine_sid; /* machine sid */ 53*c5c4113dSnw char *global_catalog; /* global catalog host */ 54*c5c4113dSnw char *domain_controller; /* domain controller host */ 55*c5c4113dSnw /* for mapping domain */ 56*c5c4113dSnw } idmap_pg_config_t; 57*c5c4113dSnw 58*c5c4113dSnw typedef struct idmap_cfg { 59*c5c4113dSnw idmap_pg_config_t pgcfg; 60*c5c4113dSnw idmap_scf_handles_t handles; 61*c5c4113dSnw } idmap_cfg_t; 62*c5c4113dSnw 63*c5c4113dSnw extern idmap_cfg_t *idmap_cfg_init(); 64*c5c4113dSnw extern int idmap_cfg_fini(idmap_cfg_t *); 65*c5c4113dSnw extern int idmap_cfg_load(idmap_cfg_t *); 66*c5c4113dSnw extern char *idmap_cfg_error(); 67*c5c4113dSnw 68*c5c4113dSnw #ifdef __cplusplus 69*c5c4113dSnw } 70*c5c4113dSnw #endif 71*c5c4113dSnw 72*c5c4113dSnw #endif /* _IDMAP_CONFIG_H */ 73