r14572: Give libraries saner names, remove some .pc files, make some things
[jelmer/samba4-debian.git] / source / libnet / libnet_passwd.h
1 /* 
2    Unix SMB/CIFS implementation.
3    
4    Copyright (C) Stefan Metzmacher      2004
5    
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.
10    
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.
15    
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.
19 */
20
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
28 };
29
30 union libnet_ChangePassword {
31         struct {
32                 enum libnet_ChangePassword_level level;
33
34                 struct _libnet_ChangePassword_in {
35                         const char *account_name;
36                         const char *domain_name;
37                         const char *oldpassword;
38                         const char *newpassword;
39                 } in;
40
41                 struct _libnet_ChangePassword_out {
42                         const char *error_string;
43                 } out;
44         } generic;
45
46         struct {
47                 enum libnet_ChangePassword_level level;
48                 struct _libnet_ChangePassword_in in;
49                 struct _libnet_ChangePassword_out out;
50         } samr;
51
52         struct {
53                 enum libnet_ChangePassword_level level;
54                 struct _libnet_ChangePassword_in in;
55                 struct _libnet_ChangePassword_out out;
56         } krb5;
57
58         struct {
59                 enum libnet_ChangePassword_level level;
60                 struct _libnet_ChangePassword_in in;
61                 struct _libnet_ChangePassword_out out;
62         } ldap;
63
64         struct {
65                 enum libnet_ChangePassword_level level;
66                 struct _libnet_ChangePassword_in in;
67                 struct _libnet_ChangePassword_out out;
68         } rap;
69 };
70
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
83 };
84
85 union libnet_SetPassword {
86         struct {
87                 enum libnet_SetPassword_level level;
88
89                 struct _libnet_SetPassword_in {
90                         const char *account_name;
91                         const char *domain_name;
92                         const char *newpassword;
93                 } in;
94
95                 struct _libnet_SetPassword_out {
96                         const char *error_string;
97                 } out;
98         } generic;
99
100         struct {
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                 } in;
108                 struct _libnet_SetPassword_out out;
109         } samr_handle;
110
111         struct {
112                 enum libnet_SetPassword_level level;
113                 struct _libnet_SetPassword_in in;
114                 struct _libnet_SetPassword_out out;
115         } samr;
116
117         struct {
118                 enum libnet_SetPassword_level level;
119                 struct _libnet_SetPassword_in in;
120                 struct _libnet_SetPassword_out out;
121         } krb5;
122
123         struct {
124                 enum libnet_SetPassword_level level;
125                 struct _libnet_SetPassword_in in;
126                 struct _libnet_SetPassword_out out;
127         } ldap;
128
129         struct {
130                 enum libnet_ChangePassword_level level;
131                 struct _libnet_SetPassword_in in;
132                 struct _libnet_SetPassword_out out;
133         } rap;
134 };