2008-06-24 01:13:21 +04:00
/*
* Unix SMB / CIFS implementation .
* libnet Support
* Copyright ( C ) Guenther Deschner 2008
2008-08-01 16:26:46 +04:00
* Copyright ( C ) Michael Adam 2008
2008-06-24 01:13:21 +04:00
*
* This program is free software ; you can redistribute it and / or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 3 of the License , or
* ( at your option ) any later version .
*
* This program is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* You should have received a copy of the GNU General Public License
* along with this program ; if not , see < http : //www.gnu.org/licenses/>.
*/
2010-05-05 03:39:16 +04:00
# include "../librpc/gen_ndr/drsuapi.h"
# include "../librpc/gen_ndr/drsblobs.h"
2008-06-24 01:13:21 +04:00
struct dssync_context ;
2008-07-16 19:12:04 +04:00
struct dssync_ops {
2008-07-17 02:54:35 +04:00
NTSTATUS ( * startup ) ( struct dssync_context * ctx , TALLOC_CTX * mem_ctx ,
struct replUpToDateVectorBlob * * pold_utdv ) ;
2008-07-16 19:12:04 +04:00
NTSTATUS ( * process_objects ) ( struct dssync_context * ctx ,
TALLOC_CTX * mem_ctx ,
struct drsuapi_DsReplicaObjectListItemEx * objects ,
struct drsuapi_DsReplicaOIDMapping_Ctr * mappings ) ;
2011-01-13 19:18:24 +03:00
NTSTATUS ( * process_links ) ( struct dssync_context * ctx ,
TALLOC_CTX * mem_ctx ,
uint32_t count ,
struct drsuapi_DsReplicaLinkedAttribute * links ,
struct drsuapi_DsReplicaOIDMapping_Ctr * mappings ) ;
2008-07-17 02:54:35 +04:00
NTSTATUS ( * finish ) ( struct dssync_context * ctx , TALLOC_CTX * mem_ctx ,
struct replUpToDateVectorBlob * new_utdv ) ;
2008-07-16 19:12:04 +04:00
} ;
2008-06-24 01:13:21 +04:00
struct dssync_context {
const char * domain_name ;
2008-06-27 01:24:25 +04:00
const char * dns_domain_name ;
2008-06-24 01:13:21 +04:00
struct rpc_pipe_client * cli ;
const char * nc_dn ;
2008-07-30 19:53:28 +04:00
bool single_object_replication ;
2008-07-30 19:44:22 +04:00
bool force_full_replication ;
2008-08-01 02:09:28 +04:00
bool clean_old_entries ;
2008-07-30 15:02:36 +04:00
uint32_t object_count ;
const char * * object_dns ;
2008-06-24 01:13:21 +04:00
struct policy_handle bind_handle ;
DATA_BLOB session_key ;
2008-06-27 01:24:25 +04:00
const char * output_filename ;
2008-07-17 15:02:31 +04:00
struct drsuapi_DsBindInfo28 remote_info28 ;
2008-06-24 01:13:21 +04:00
2008-07-16 19:12:04 +04:00
void * private_data ;
const struct dssync_ops * ops ;
2008-06-24 01:13:21 +04:00
char * result_message ;
char * error_message ;
} ;
2008-06-27 17:36:19 +04:00
2008-07-16 19:12:04 +04:00
extern const struct dssync_ops libnet_dssync_keytab_ops ;
2008-11-22 01:48:45 +03:00
extern const struct dssync_ops libnet_dssync_passdb_ops ;
2010-07-02 02:14:04 +04:00
/* The following definitions come from libnet/libnet_dssync.c */
NTSTATUS libnet_dssync_init_context ( TALLOC_CTX * mem_ctx ,
struct dssync_context * * ctx_p ) ;
NTSTATUS libnet_dssync ( TALLOC_CTX * mem_ctx ,
struct dssync_context * ctx ) ;