r21300: let the caller decide if it wants rid decrypted hashes or not
[kai/samba-autobuild/.git] / source4 / libnet / libnet_vampire.h
1 /* 
2    Unix SMB/CIFS implementation.
3
4    Copyright (C) Andrew Bartlett <abartlet@samba.org> 2005
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 #include "librpc/gen_ndr/netlogon.h"
22
23 struct libnet_SamSync_state {
24         struct libnet_context *machine_net_ctx;
25         struct dcerpc_pipe *netlogon_pipe;
26         const char *domain_name;
27         const struct dom_sid *domain_sid;
28         const char *realm;
29         struct GUID *domain_guid;
30 };
31
32 /* struct and enum for doing a remote domain vampire dump */
33 struct libnet_SamSync {
34         struct {
35                 const char *binding_string;
36                 bool rid_crypt;
37                 NTSTATUS (*init_fn)(TALLOC_CTX *mem_ctx,                
38                                     void *private,
39                                     struct libnet_SamSync_state *samsync_state,
40                                     char **error_string);
41                 NTSTATUS (*delta_fn)(TALLOC_CTX *mem_ctx,               
42                                      void *private,                     
43                                      enum netr_SamDatabaseID database,
44                                      struct netr_DELTA_ENUM *delta,
45                                      char **error_string);
46                 void *fn_ctx;
47                 struct cli_credentials *machine_account;
48         } in;
49         struct {
50                 const char *error_string;
51         } out;
52 };
53
54 struct libnet_SamDump {
55         struct {
56                 const char *binding_string;
57                 struct cli_credentials *machine_account;
58         } in;
59         struct {
60                 const char *error_string;
61         } out;
62 };
63
64 struct libnet_SamDump_keytab {
65         struct {
66                 const char *binding_string;
67                 const char *keytab_name;
68                 struct cli_credentials *machine_account;
69         } in;
70         struct {
71                 const char *error_string;
72         } out;
73 };
74
75 struct libnet_samsync_ldb {
76         struct {
77                 const char *binding_string;
78                 struct cli_credentials *machine_account;
79                 struct auth_session_info *session_info;
80         } in;
81         struct {
82                 const char *error_string;
83         } out;
84 };
85