1da6c28aaSamw/* 2da6c28aaSamw * CDDL HEADER START 3da6c28aaSamw * 4da6c28aaSamw * The contents of this file are subject to the terms of the 5da6c28aaSamw * Common Development and Distribution License (the "License"). 6da6c28aaSamw * You may not use this file except in compliance with the License. 7da6c28aaSamw * 8da6c28aaSamw * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9da6c28aaSamw * or http://www.opensolaris.org/os/licensing. 10da6c28aaSamw * See the License for the specific language governing permissions 11da6c28aaSamw * and limitations under the License. 12da6c28aaSamw * 13da6c28aaSamw * When distributing Covered Code, include this CDDL HEADER in each 14da6c28aaSamw * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15da6c28aaSamw * If applicable, add the following below this CDDL HEADER, with the 16da6c28aaSamw * fields enclosed by brackets "[]" replaced with your own identifying 17da6c28aaSamw * information: Portions Copyright [yyyy] [name of copyright owner] 18da6c28aaSamw * 19da6c28aaSamw * CDDL HEADER END 20da6c28aaSamw */ 21da6c28aaSamw/* 22*2c1b14e5Sjose borrego * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 23da6c28aaSamw * Use is subject to license terms. 24da6c28aaSamw */ 25da6c28aaSamw 26da6c28aaSamw#ifndef _DSSETUP_NDL_ 27da6c28aaSamw#define _DSSETUP_NDL_ 28da6c28aaSamw 29da6c28aaSamw/* 30da6c28aaSamw * Active Directory Service Setup 31*2c1b14e5Sjose borrego * 32*2c1b14e5Sjose borrego * Originally this interface contained a number of operations, as listed 33*2c1b14e5Sjose borrego * below, but due to a buffer overflow security issue, all operations 34*2c1b14e5Sjose borrego * except DsRoleGetPrimaryDomainInfo have been deprecated (MS04-011). 35da6c28aaSamw */ 36da6c28aaSamw 37da6c28aaSamw#include "ndrtypes.ndl" 38da6c28aaSamw 39da6c28aaSamw 40da6c28aaSamw#define DSSETUP_OPNUM_DsRoleGetPrimaryDomainInfo 0x00 41da6c28aaSamw#define DSSETUP_OPNUM_DsRoleDnsNameToFlatName 0x01 42da6c28aaSamw#define DSSETUP_OPNUM_DsRoleDcAsDc 0x02 43da6c28aaSamw#define DSSETUP_OPNUM_DsRoleDcAsReplica 0x03 44da6c28aaSamw#define DSSETUP_OPNUM_DsRoleDemoteDc 0x04 45da6c28aaSamw#define DSSETUP_OPNUM_DsRoleGetDcOperationProgress 0x05 46da6c28aaSamw#define DSSETUP_OPNUM_DsRoleGetDcOperationResults 0x06 47da6c28aaSamw#define DSSETUP_OPNUM_DsRoleCancel 0x07 48da6c28aaSamw#define DSSETUP_OPNUM_DsRoleServerSaveStateForUpgrade 0x08 49da6c28aaSamw#define DSSETUP_OPNUM_DsRoleUpgradeDownlevelServer 0x09 50da6c28aaSamw#define DSSETUP_OPNUM_DsRoleAbortDownlevelServerUpgrade 0x0a 51da6c28aaSamw 52da6c28aaSamw/* 53da6c28aaSamw * DS roles 54da6c28aaSamw */ 55da6c28aaSamw#define DS_ROLE_STANDALONE_WORKSTATION 0 56da6c28aaSamw#define DS_ROLE_MEMBER_WORKSTATION 1 57da6c28aaSamw#define DS_ROLE_STANDALONE_SERVER 2 58da6c28aaSamw#define DS_ROLE_MEMBER_SERVER 3 59da6c28aaSamw#define DS_ROLE_BACKUP_DC 4 60da6c28aaSamw#define DS_ROLE_PRIMARY_DC 5 61da6c28aaSamw 62da6c28aaSamw/* 63da6c28aaSamw * DS role flags 64da6c28aaSamw */ 65da6c28aaSamw#define DS_ROLE_PRIMARY_DS_RUNNING 0x00000001 66da6c28aaSamw#define DS_ROLE_PRIMARY_DS_MIXED_MODE 0x00000002 67da6c28aaSamw#define DS_ROLE_UPGRADE_IN_PROGRESS 0x00000004 68da6c28aaSamw#define DS_ROLE_PRIMARY_DOMAIN_GUID_PRESENT 0x01000000 69da6c28aaSamw 70da6c28aaSamw/* 71da6c28aaSamw * DS role upgrade 72da6c28aaSamw */ 73da6c28aaSamw#define DS_ROLE_NOT_UPGRADING 0 74da6c28aaSamw#define DS_ROLE_UPGRADING 1 75da6c28aaSamw 76da6c28aaSamw/* 77da6c28aaSamw * DS role previous 78da6c28aaSamw */ 79da6c28aaSamw#define DS_ROLE_PREVIOUS_UNKNOWN 0 80da6c28aaSamw#define DS_ROLE_PREVIOUS_PRIMARY 1 81da6c28aaSamw#define DS_ROLE_PREVIOUS_BACKUP 2 82da6c28aaSamw 83da6c28aaSamw/* 84da6c28aaSamw * DS role state 85da6c28aaSamw */ 86da6c28aaSamw#define DS_ROLE_OP_IDLE 0 87da6c28aaSamw#define DS_ROLE_OP_ACTIVE 1 88da6c28aaSamw#define DS_ROLE_OP_NEEDS_REBOOT 2 89da6c28aaSamw 90da6c28aaSamw/* 91da6c28aaSamw * DS role information levels 92da6c28aaSamw */ 93da6c28aaSamw#define DS_ROLE_BASIC_INFORMATION 1 94da6c28aaSamw#define DS_ROLE_UPGRADE_STATUS 2 95da6c28aaSamw#define DS_ROLE_OP_STATUS 3 96da6c28aaSamw 97da6c28aaSamwstruct dssetup_uuid { 98da6c28aaSamw DWORD data1; 99da6c28aaSamw WORD data2; 100da6c28aaSamw WORD data3; 101da6c28aaSamw BYTE data4[8]; 102da6c28aaSamw}; 103da6c28aaSamwtypedef struct dssetup_uuid dssetup_uuid_t; 104da6c28aaSamw 105da6c28aaSamw/* 106da6c28aaSamw * DS_ROLE_BASIC_INFORMATION 107da6c28aaSamw */ 108da6c28aaSamwstruct dssetup_DsRolePrimaryDomInfo1 { 109da6c28aaSamw DWORD role; 110da6c28aaSamw DWORD flags; 111da6c28aaSamw LPTSTR nt_domain; 112da6c28aaSamw LPTSTR dns_domain; 113da6c28aaSamw LPTSTR forest; 114da6c28aaSamw dssetup_uuid_t domain_guid; 115da6c28aaSamw}; 116*2c1b14e5Sjose borregotypedef struct dssetup_DsRolePrimaryDomInfo1 ds_primary_domain_info_t; 117da6c28aaSamw 118da6c28aaSamw/* 119da6c28aaSamw * DS_ROLE_UPGRADE_STATUS 120da6c28aaSamw */ 121da6c28aaSamwstruct dssetup_DsRolePrimaryDomInfo2 { 122da6c28aaSamw DWORD upgrade_state; 123da6c28aaSamw DWORD previous_role; 124da6c28aaSamw}; 125da6c28aaSamw 126da6c28aaSamw/* 127da6c28aaSamw * DS_ROLE_OP_STATUS 128da6c28aaSamw */ 129da6c28aaSamwstruct dssetup_DsRolePrimaryDomInfo3 { 130da6c28aaSamw DWORD status; 131da6c28aaSamw}; 132da6c28aaSamw 133da6c28aaSamwunion dssetup_GetPrimaryDomainInfo_ru { 134da6c28aaSamw UNION_INFO_ENT(1,dssetup_DsRolePrimaryDomInfo); 135da6c28aaSamw UNION_INFO_ENT(2,dssetup_DsRolePrimaryDomInfo); 136da6c28aaSamw UNION_INFO_ENT(3,dssetup_DsRolePrimaryDomInfo); 137da6c28aaSamw DEFAULT char *nullptr; 138da6c28aaSamw}; 139da6c28aaSamw 140*2c1b14e5Sjose borregostruct dssetup_GetPrimaryDomainInfo { 141da6c28aaSamw WORD switch_value; 142da6c28aaSamw SWITCH(switch_value) 143da6c28aaSamw union dssetup_GetPrimaryDomainInfo_ru ru; 144da6c28aaSamw}; 145*2c1b14e5Sjose borregotypedef struct dssetup_GetPrimaryDomainInfo dssetup_GetPrimaryDomainInfo_t; 146da6c28aaSamw 147da6c28aaSamwOPERATION(DSSETUP_OPNUM_DsRoleGetPrimaryDomainInfo) 148da6c28aaSamwstruct dssetup_DsRoleGetPrimaryDomainInfo { 149da6c28aaSamw IN WORD level; 150*2c1b14e5Sjose borrego OUT struct dssetup_GetPrimaryDomainInfo *info; 151da6c28aaSamw OUT DWORD status; 152da6c28aaSamw}; 153*2c1b14e5Sjose borregotypedef struct dssetup_DsRoleGetPrimaryDomainInfo 154*2c1b14e5Sjose borrego dssetup_DsRoleGetPrimaryDomainInfo_t; 155da6c28aaSamw 156da6c28aaSamw 157da6c28aaSamw/* 158da6c28aaSamw *********************************************************************** 159da6c28aaSamw * DSSETUP interface definiton. 160da6c28aaSamw *********************************************************************** 161da6c28aaSamw */ 162da6c28aaSamwINTERFACE(0) 163da6c28aaSamwunion dssetup_interface { 164da6c28aaSamw CASE(DSSETUP_OPNUM_DsRoleGetPrimaryDomainInfo) 165da6c28aaSamw struct dssetup_DsRoleGetPrimaryDomainInfo GetPrimaryDomainInfo; 166da6c28aaSamw}; 167da6c28aaSamwtypedef union dssetup_interface dssetup_interface_t; 168da6c28aaSamwEXTERNTYPEINFO(dssetup_interface) 169da6c28aaSamw 170da6c28aaSamw#endif /* _DSSETUP_NDL_ */ 171