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 /*
23 * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
24 */
25
26 /*
27 * Active Directory Setup RPC interface used by Windows 2000.
28 */
29
30 #include <synch.h>
31 #include <strings.h>
32 #include <stdlib.h>
33 #include <netdb.h>
34
35 #include <smbsrv/libsmb.h>
36 #include <smbsrv/libmlrpc.h>
37 #include <smbsrv/libmlsvc.h>
38 #include <smbsrv/ndl/dssetup.ndl>
39 #include <smbsrv/smbinfo.h>
40 #include <smbsrv/nmpipes.h>
41
42 int dssetup_get_domain_info(ds_primary_domain_info_t *);
43
44 static int dssetup_DsRoleGetPrimaryDomainInfo(void *, ndr_xa_t *);
45 static uint32_t dssetup_member_server(ds_primary_domain_info_t *, ndr_xa_t *);
46 static uint32_t dssetup_standalone_server(ds_primary_domain_info_t *,
47 ndr_xa_t *);
48
49 static ndr_stub_table_t dssetup_stub_table[] = {
50 { dssetup_DsRoleGetPrimaryDomainInfo,
51 DSSETUP_OPNUM_DsRoleGetPrimaryDomainInfo },
52 {0}
53 };
54
55 static ndr_service_t dssetup_service = {
56 "DSSETUP", /* name */
|
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 /*
23 * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
24 * Copyright 2013 Nexenta Systems, Inc. All rights reserved.
25 */
26
27 /*
28 * Active Directory Setup RPC interface used by Windows 2000.
29 */
30
31 #include <synch.h>
32 #include <strings.h>
33 #include <stdlib.h>
34 #include <netdb.h>
35
36 #include <libmlrpc/libmlrpc.h>
37 #include <smbsrv/libsmb.h>
38 #include <smbsrv/libmlsvc.h>
39 #include <smbsrv/ndl/dssetup.ndl>
40 #include <smbsrv/smbinfo.h>
41 #include <smbsrv/nmpipes.h>
42
43 int dssetup_get_domain_info(ds_primary_domain_info_t *);
44
45 static int dssetup_DsRoleGetPrimaryDomainInfo(void *, ndr_xa_t *);
46 static uint32_t dssetup_member_server(ds_primary_domain_info_t *, ndr_xa_t *);
47 static uint32_t dssetup_standalone_server(ds_primary_domain_info_t *,
48 ndr_xa_t *);
49
50 static ndr_stub_table_t dssetup_stub_table[] = {
51 { dssetup_DsRoleGetPrimaryDomainInfo,
52 DSSETUP_OPNUM_DsRoleGetPrimaryDomainInfo },
53 {0}
54 };
55
56 static ndr_service_t dssetup_service = {
57 "DSSETUP", /* name */
|