From d4b36e447bce8692416e132ab9f53a6282f54cac Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 29 Jul 2008 22:52:59 +0200 Subject: [PATCH] vampire keytab: add switch --repl-nodiff to trigger full replication. I.e. replication without keeping track of the up to date vector. Michael --- source/libnet/libnet_dssync.c | 2 +- source/libnet/libnet_dssync.h | 1 + source/utils/net.c | 2 ++ source/utils/net.h | 1 + source/utils/net_rpc_samsync.c | 2 ++ 5 files changed, 7 insertions(+), 1 deletion(-) diff --git a/source/libnet/libnet_dssync.c b/source/libnet/libnet_dssync.c index fa2bb2de146..cb8fa80ffa1 100644 --- a/source/libnet/libnet_dssync.c +++ b/source/libnet/libnet_dssync.c @@ -410,7 +410,7 @@ static NTSTATUS libnet_dssync_process(TALLOC_CTX *mem_ctx, goto out; } - if (old_utdv) { + if (!ctx->repl_nodiff && old_utdv) { pcursors = &cursors; ZERO_STRUCTP(pcursors); diff --git a/source/libnet/libnet_dssync.h b/source/libnet/libnet_dssync.h index 13a68de4c7b..7869b1620ac 100644 --- a/source/libnet/libnet_dssync.h +++ b/source/libnet/libnet_dssync.h @@ -36,6 +36,7 @@ struct dssync_context { struct rpc_pipe_client *cli; const char *nc_dn; bool single; + bool repl_nodiff; const char *object_dn; struct policy_handle bind_handle; DATA_BLOB session_key; diff --git a/source/utils/net.c b/source/utils/net.c index e90e8f0a0fa..c1b68eceb0c 100644 --- a/source/utils/net.c +++ b/source/utils/net.c @@ -652,6 +652,8 @@ static struct functable net_func[] = { {"exclude", 'X', POPT_ARG_STRING, &c->opt_exclude}, {"destination", 0, POPT_ARG_STRING, &c->opt_destination}, {"tallocreport", 0, POPT_ARG_NONE, &c->do_talloc_report}, + /* Options for 'net rpc vampire (keytab)' */ + {"repl-nodiff", 0, POPT_ARG_NONE, &c->opt_repl_nodiff}, POPT_COMMON_SAMBA { 0, 0, 0, 0} diff --git a/source/utils/net.h b/source/utils/net.h index 4f59ff995ce..34e34a758a1 100644 --- a/source/utils/net.h +++ b/source/utils/net.h @@ -57,6 +57,7 @@ struct net_context { const char *opt_destination; int opt_testmode; bool opt_kerberos; + int opt_repl_nodiff; int opt_have_ip; struct sockaddr_storage opt_dest_ip; diff --git a/source/utils/net_rpc_samsync.c b/source/utils/net_rpc_samsync.c index 11ada717dac..1e477e3a099 100644 --- a/source/utils/net_rpc_samsync.c +++ b/source/utils/net_rpc_samsync.c @@ -296,6 +296,8 @@ static NTSTATUS rpc_vampire_keytab_ds_internals(struct net_context *c, return status; } + ctx->repl_nodiff = c->opt_repl_nodiff ? true : false; + if (argc >= 1) { ctx->output_filename = argv[0]; } -- 2.11.4.GIT