2 Unix SMB/CIFS implementation.
4 Copyright (C) Stefan Metzmacher 2004
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 struct libnet_context {
25 * a client env context
29 const char *account_name;
30 const char *domain_name;
35 /* struct and enum for finding a domain controller */
36 enum libnet_find_pdc_level {
37 LIBNET_FIND_PDC_GENERIC
40 union libnet_find_pdc {
41 /* find to a domains PDC */
43 enum libnet_find_pdc_level level;
46 const char *domain_name;
55 /* struct and enum for connecting to a dcerpc inferface */
56 enum libnet_rpc_connect_level {
57 LIBNET_RPC_CONNECT_PDC
60 union libnet_rpc_connect {
61 /* connect to a domains PDC */
63 enum libnet_rpc_connect_level level;
66 const char *domain_name;
67 const char *dcerpc_iface_name;
68 const char *dcerpc_iface_uuid;
69 uint32 dcerpc_iface_version;
73 struct dcerpc_pipe *dcerpc_pipe;
79 /* struct and enum for doing a remote password change */
80 enum libnet_ChangePassword_level {
81 LIBNET_CHANGE_PASSWORD_GENERIC,
82 LIBNET_CHANGE_PASSWORD_RPC,
83 LIBNET_CHANGE_PASSWORD_KRB5,
84 LIBNET_CHANGE_PASSWORD_LDAP,
85 LIBNET_CHANGE_PASSWORD_RAP
88 union libnet_ChangePassword {
90 enum libnet_ChangePassword_level level;
92 struct _libnet_ChangePassword_in {
93 const char *account_name;
94 const char *domain_name;
95 const char *oldpassword;
96 const char *newpassword;
99 struct _libnet_ChangePassword_out {
100 const char *error_string;
105 enum libnet_ChangePassword_level level;
106 struct _libnet_ChangePassword_in in;
107 struct _libnet_ChangePassword_out out;
111 enum libnet_ChangePassword_level level;
112 struct _libnet_ChangePassword_in in;
113 struct _libnet_ChangePassword_out out;
117 enum libnet_ChangePassword_level level;
118 struct _libnet_ChangePassword_in in;
119 struct _libnet_ChangePassword_out out;
123 enum libnet_ChangePassword_level level;
124 struct _libnet_ChangePassword_in in;
125 struct _libnet_ChangePassword_out out;
129 /* struct and enum for doing a remote password set */
130 enum libnet_SetPassword_level {
131 LIBNET_SET_PASSWORD_GENERIC,
132 LIBNET_SET_PASSWORD_RPC,
133 LIBNET_SET_PASSWORD_KRB5,
134 LIBNET_SET_PASSWORD_LDAP,
135 LIBNET_SET_PASSWORD_RAP
138 union libnet_SetPassword {
140 enum libnet_SetPassword_level level;
142 struct _libnet_SetPassword_in {
143 const char *account_name;
144 const char *domain_name;
145 const char *newpassword;
148 struct _libnet_SetPassword_out {
149 const char *error_string;
154 enum libnet_SetPassword_level level;
155 struct _libnet_SetPassword_in in;
156 struct _libnet_SetPassword_out out;
160 enum libnet_SetPassword_level level;
161 struct _libnet_SetPassword_in in;
162 struct _libnet_SetPassword_out out;
166 enum libnet_SetPassword_level level;
167 struct _libnet_SetPassword_in in;
168 struct _libnet_SetPassword_out out;
172 enum libnet_ChangePassword_level level;
173 struct _libnet_SetPassword_in in;
174 struct _libnet_SetPassword_out out;