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 and enum for doing a remote password change */
22 enum libnet_ChangePassword_level {
23 LIBNET_CHANGE_PASSWORD_GENERIC,
24 LIBNET_CHANGE_PASSWORD_SAMR,
25 LIBNET_CHANGE_PASSWORD_KRB5,
26 LIBNET_CHANGE_PASSWORD_LDAP,
27 LIBNET_CHANGE_PASSWORD_RAP
30 union libnet_ChangePassword {
32 enum libnet_ChangePassword_level level;
34 struct _libnet_ChangePassword_in {
35 const char *account_name;
36 const char *domain_name;
37 const char *oldpassword;
38 const char *newpassword;
41 struct _libnet_ChangePassword_out {
42 const char *error_string;
47 enum libnet_ChangePassword_level level;
48 struct _libnet_ChangePassword_in in;
49 struct _libnet_ChangePassword_out out;
53 enum libnet_ChangePassword_level level;
54 struct _libnet_ChangePassword_in in;
55 struct _libnet_ChangePassword_out out;
59 enum libnet_ChangePassword_level level;
60 struct _libnet_ChangePassword_in in;
61 struct _libnet_ChangePassword_out out;
65 enum libnet_ChangePassword_level level;
66 struct _libnet_ChangePassword_in in;
67 struct _libnet_ChangePassword_out out;
71 /* struct and enum for doing a remote password set */
72 enum libnet_SetPassword_level {
73 LIBNET_SET_PASSWORD_GENERIC,
74 LIBNET_SET_PASSWORD_SAMR,
75 LIBNET_SET_PASSWORD_SAMR_HANDLE,
76 LIBNET_SET_PASSWORD_SAMR_HANDLE_26,
77 LIBNET_SET_PASSWORD_SAMR_HANDLE_25,
78 LIBNET_SET_PASSWORD_SAMR_HANDLE_24,
79 LIBNET_SET_PASSWORD_SAMR_HANDLE_23,
80 LIBNET_SET_PASSWORD_KRB5,
81 LIBNET_SET_PASSWORD_LDAP,
82 LIBNET_SET_PASSWORD_RAP
85 union libnet_SetPassword {
87 enum libnet_SetPassword_level level;
89 struct _libnet_SetPassword_in {
90 const char *account_name;
91 const char *domain_name;
92 const char *newpassword;
95 struct _libnet_SetPassword_out {
96 const char *error_string;
101 enum libnet_SetPassword_level level;
102 struct _libnet_SetPassword_samr_handle_in {
103 const char *account_name; /* for debug only */
104 struct policy_handle *user_handle;
105 struct dcerpc_pipe *dcerpc_pipe;
106 const char *newpassword;
107 struct samr_UserInfo21 *info21; /* can be NULL,
108 * for level 26,24 it must be NULL
109 * for level 25,23 it must be non-NULL
112 struct _libnet_SetPassword_out out;
116 enum libnet_SetPassword_level level;
117 struct _libnet_SetPassword_in in;
118 struct _libnet_SetPassword_out out;
122 enum libnet_SetPassword_level level;
123 struct _libnet_SetPassword_in in;
124 struct _libnet_SetPassword_out out;
128 enum libnet_SetPassword_level level;
129 struct _libnet_SetPassword_in in;
130 struct _libnet_SetPassword_out out;
134 enum libnet_ChangePassword_level level;
135 struct _libnet_SetPassword_in in;
136 struct _libnet_SetPassword_out out;