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