vampire keytab: introduce switch --single-obj-repl.
authorMichael Adam <obnox@samba.org>
Thu, 31 Jul 2008 21:05:45 +0000 (23:05 +0200)
committerMichael Adam <obnox@samba.org>
Fri, 1 Aug 2008 14:07:59 +0000 (16:07 +0200)
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
source3/utils/net.h
source3/utils/net_rpc_samsync.c

index 8a5893266f20ee7ee70fa8b5cbb3cad2e15fce3f..a38e3ce2d453169168e70a59d6c9437ed8d4fe14 100644 (file)
@@ -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}
index 5dd5a3501dc0789aa4f43734284c9621a025ed5d..b3fc0eb92c5f5f9d1d34d61fd6beab59453a8919 100644 (file)
@@ -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;
index 3731edaaf1db51a606b1c99df4f33a07dcbcd921..14449d5f4951d2443f70732f3af81d85c1bb1cb8 100644 (file)
@@ -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;