From 03b6502dc69647e4410eca5bcf0f93fd5eba3fa9 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Thu, 31 Jul 2008 23:05:45 +0200 Subject: vampire keytab: introduce switch --single-obj-repl. This controls whether single object replication is to be used. This only has an effect when at least one object dn is given on the commandline. NOTE: Now the default is to use normal replication with uptodateness vectors and use object dns given on the command line as a positive write filter. Single object replication is only performed when this new switch is specified. Michael (This used to be commit 0f81111ea8c049eb60f98d4939e520a5a562d2e6) --- source3/utils/net.c | 1 + source3/utils/net.h | 1 + source3/utils/net_rpc_samsync.c | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) (limited to 'source3/utils') diff --git a/source3/utils/net.c b/source3/utils/net.c index 8a5893266f..a38e3ce2d4 100644 --- a/source3/utils/net.c +++ b/source3/utils/net.c @@ -654,6 +654,7 @@ static struct functable net_func[] = { {"tallocreport", 0, POPT_ARG_NONE, &c->do_talloc_report}, /* Options for 'net rpc vampire (keytab)' */ {"force-full-repl", 0, POPT_ARG_NONE, &c->opt_force_full_repl}, + {"single-obj-repl", 0, POPT_ARG_NONE, &c->opt_single_obj_repl}, POPT_COMMON_SAMBA { 0, 0, 0, 0} diff --git a/source3/utils/net.h b/source3/utils/net.h index 5dd5a3501d..b3fc0eb92c 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -58,6 +58,7 @@ struct net_context { int opt_testmode; bool opt_kerberos; int opt_force_full_repl; + int opt_single_obj_repl; int opt_have_ip; struct sockaddr_storage opt_dest_ip; diff --git a/source3/utils/net_rpc_samsync.c b/source3/utils/net_rpc_samsync.c index 3731edaaf1..14449d5f49 100644 --- a/source3/utils/net_rpc_samsync.c +++ b/source3/utils/net_rpc_samsync.c @@ -304,7 +304,8 @@ static NTSTATUS rpc_vampire_keytab_ds_internals(struct net_context *c, if (argc >= 2) { ctx->object_dns = &argv[1]; ctx->object_count = argc - 1; - ctx->single_object_replication = true; + ctx->single_object_replication = c->opt_single_obj_repl ? true + : false; } ctx->cli = pipe_hnd; -- cgit