| 1 | /*
|
|---|
| 2 | Unix SMB/CIFS implementation.
|
|---|
| 3 |
|
|---|
| 4 | Copyright (C) Stefan Metzmacher 2004
|
|---|
| 5 | Copyright (C) Andrew Bartlett <abartlet@samba.org> 2005
|
|---|
| 6 | Copyright (C) Brad Henry 2005
|
|---|
| 7 |
|
|---|
| 8 | This program is free software; you can redistribute it and/or modify
|
|---|
| 9 | it under the terms of the GNU General Public License as published by
|
|---|
| 10 | the Free Software Foundation; either version 3 of the License, or
|
|---|
| 11 | (at your option) any later version.
|
|---|
| 12 |
|
|---|
| 13 | This program is distributed in the hope that it will be useful,
|
|---|
| 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 16 | GNU General Public License for more details.
|
|---|
| 17 |
|
|---|
| 18 | You should have received a copy of the GNU General Public License
|
|---|
| 19 | along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|---|
| 20 | */
|
|---|
| 21 |
|
|---|
| 22 | #ifndef __LIBNET_JOIN_H__
|
|---|
| 23 | #define __LIBNET_JOIN_H__
|
|---|
| 24 |
|
|---|
| 25 | #include "librpc/gen_ndr/netlogon.h"
|
|---|
| 26 |
|
|---|
| 27 | enum libnet_Join_level {
|
|---|
| 28 | LIBNET_JOIN_AUTOMATIC,
|
|---|
| 29 | LIBNET_JOIN_SPECIFIED,
|
|---|
| 30 | };
|
|---|
| 31 |
|
|---|
| 32 | enum libnet_JoinDomain_level {
|
|---|
| 33 | LIBNET_JOINDOMAIN_AUTOMATIC,
|
|---|
| 34 | LIBNET_JOINDOMAIN_SPECIFIED,
|
|---|
| 35 | };
|
|---|
| 36 |
|
|---|
| 37 | struct libnet_JoinDomain {
|
|---|
| 38 | struct {
|
|---|
| 39 | const char *domain_name;
|
|---|
| 40 | const char *account_name;
|
|---|
| 41 | const char *netbios_name;
|
|---|
| 42 | const char *binding;
|
|---|
| 43 | enum libnet_JoinDomain_level level;
|
|---|
| 44 | uint32_t acct_type;
|
|---|
| 45 | bool recreate_account;
|
|---|
| 46 | } in;
|
|---|
| 47 |
|
|---|
| 48 | struct {
|
|---|
| 49 | const char *error_string;
|
|---|
| 50 | const char *join_password;
|
|---|
| 51 | struct dom_sid *domain_sid;
|
|---|
| 52 | const char *domain_name;
|
|---|
| 53 | const char *realm;
|
|---|
| 54 | const char *domain_dn_str;
|
|---|
| 55 | const char *account_dn_str;
|
|---|
| 56 | const char *server_dn_str;
|
|---|
| 57 | uint32_t kvno; /* msDS-KeyVersionNumber */
|
|---|
| 58 | struct dcerpc_pipe *samr_pipe;
|
|---|
| 59 | struct dcerpc_binding *samr_binding;
|
|---|
| 60 | struct policy_handle *user_handle;
|
|---|
| 61 | struct dom_sid *account_sid;
|
|---|
| 62 | struct GUID account_guid;
|
|---|
| 63 | } out;
|
|---|
| 64 | };
|
|---|
| 65 |
|
|---|
| 66 | struct libnet_Join {
|
|---|
| 67 | struct {
|
|---|
| 68 | const char *domain_name;
|
|---|
| 69 | const char *netbios_name;
|
|---|
| 70 | enum netr_SchannelType join_type;
|
|---|
| 71 | enum libnet_Join_level level;
|
|---|
| 72 | } in;
|
|---|
| 73 |
|
|---|
| 74 | struct {
|
|---|
| 75 | const char *error_string;
|
|---|
| 76 | const char *join_password;
|
|---|
| 77 | struct dom_sid *domain_sid;
|
|---|
| 78 | const char *domain_name;
|
|---|
| 79 | } out;
|
|---|
| 80 | };
|
|---|
| 81 |
|
|---|
| 82 | struct libnet_set_join_secrets {
|
|---|
| 83 | struct {
|
|---|
| 84 | const char *domain_name;
|
|---|
| 85 | const char *realm;
|
|---|
| 86 | const char *netbios_name;
|
|---|
| 87 | const char *account_name;
|
|---|
| 88 | enum netr_SchannelType join_type;
|
|---|
| 89 | const char *join_password;
|
|---|
| 90 | int kvno;
|
|---|
| 91 | struct dom_sid *domain_sid;
|
|---|
| 92 | } in;
|
|---|
| 93 |
|
|---|
| 94 | struct {
|
|---|
| 95 | const char *error_string;
|
|---|
| 96 | } out;
|
|---|
| 97 | };
|
|---|
| 98 |
|
|---|
| 99 |
|
|---|
| 100 | #endif /* __LIBNET_JOIN_H__ */
|
|---|