vampire keytab: add command line switch --clean-old-entries .
authorMichael Adam <obnox@samba.org>
Thu, 31 Jul 2008 22:12:18 +0000 (00:12 +0200)
committerMichael Adam <obnox@samba.org>
Fri, 1 Aug 2008 14:08:00 +0000 (16:08 +0200)
This allows to control cleaning the keytab.
It will only clean old occurences of keys that are replicated in
this run. So if you want to ensure things are cleaned up, combine
this switch with --force-full-repl or --single-obj-repl (+dn list).

Michael
(This used to be commit 21385e1c635ea67215eb1da90e7dca97ae2f5d56)

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

index a38e3ce2d453169168e70a59d6c9437ed8d4fe14..bab2f41d1171df0cedadd883fea0ec4823929ab8 100644 (file)
@@ -655,6 +655,7 @@ static struct functable net_func[] = {
                /* 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},
+               {"clean-old-entries", 0, POPT_ARG_NONE, &c->opt_clean_old_entries},
 
                POPT_COMMON_SAMBA
                { 0, 0, 0, 0}
index b3fc0eb92c5f5f9d1d34d61fd6beab59453a8919..e7f9ce03be9c20cae79cfe1bee8eb12b5343cbf9 100644 (file)
@@ -59,6 +59,7 @@ struct net_context {
        bool opt_kerberos;
        int opt_force_full_repl;
        int opt_single_obj_repl;
+       int opt_clean_old_entries;
 
        int opt_have_ip;
        struct sockaddr_storage opt_dest_ip;
index 14449d5f4951d2443f70732f3af81d85c1bb1cb8..c01aace8f593c8d1ff7618f6574a3cbbbbeb7f55 100644 (file)
@@ -297,6 +297,7 @@ static NTSTATUS rpc_vampire_keytab_ds_internals(struct net_context *c,
        }
 
        ctx->force_full_replication = c->opt_force_full_repl ? true : false;
+       ctx->clean_old_entries = c->opt_clean_old_entries ? true : false;
 
        if (argc >= 1) {
                ctx->output_filename = argv[0];