vampire keytab: add switch --repl-nodiff to trigger full replication.
authorMichael Adam <obnox@samba.org>
Tue, 29 Jul 2008 20:52:59 +0000 (22:52 +0200)
committerMichael Adam <obnox@samba.org>
Fri, 1 Aug 2008 14:07:04 +0000 (16:07 +0200)
I.e. replication without keeping track of the up to date vector.

Michael
(This used to be commit d4b36e447bce8692416e132ab9f53a6282f54cac)

source3/libnet/libnet_dssync.c
source3/libnet/libnet_dssync.h
source3/utils/net.c
source3/utils/net.h
source3/utils/net_rpc_samsync.c

index fa2bb2de146110d54ba2888c8d39940c4153e8e7..cb8fa80ffa1a14d56df7dfc7f78f30f6f272f7fd 100644 (file)
@@ -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);
 
index 13a68de4c7bc90543a2cf4a1cb1b1fb8478bdc9e..7869b1620ac2f6fa2a853144a56b27d0b30aa15c 100644 (file)
@@ -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;
index e90e8f0a0fa200989c4056a5397f4621af4692ff..c1b68eceb0ce63ef8be124b12d10579684eecb43 100644 (file)
@@ -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}
index 4f59ff995ce052ff585bee6a1cb219612bdaa50c..34e34a758a1303bd0938523a8bd8e15241f3c6fa 100644 (file)
@@ -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;
index 11ada717dac14ab9a89e1fef7f1421c975517d58..1e477e3a099d11099522bd5f94e741e73614634b 100644 (file)
@@ -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];
        }