s3: Add --use-ccache to net
authorVolker Lendecke <vl@samba.org>
Sun, 24 Jan 2010 17:50:48 +0000 (18:50 +0100)
committerVolker Lendecke <vl@samba.org>
Sun, 24 Jan 2010 19:32:17 +0000 (20:32 +0100)
source3/utils/net.c
source3/utils/net.h
source3/utils/net_rpc.c
source3/utils/net_util.c

index 7154abf1f1dfc8114035755df8258715e32f1113..85c3c7dcedd8ab8fe4daaf6b13ed6242eaf27ca3 100644 (file)
@@ -770,6 +770,7 @@ static struct functable net_func[] = {
                {"machine-pass",'P', POPT_ARG_NONE,   &c->opt_machine_pass},
                {"kerberos",    'k', POPT_ARG_NONE,   &c->opt_kerberos},
                {"myworkgroup", 'W', POPT_ARG_STRING, &c->opt_workgroup},
+               {"use-ccache",    0, POPT_ARG_NONE,   &c->opt_ccache},
                {"verbose",     'v', POPT_ARG_NONE,   &c->opt_verbose},
                {"test",        'T', POPT_ARG_NONE,   &c->opt_testmode},
                /* Options for 'net groupmap set' */
index 3978459a624c091ff9f7a9fbd61885a355b2fc34..91e8c530991e43a232c4b7acddc40459890db3fa 100644 (file)
@@ -72,6 +72,7 @@ struct net_context {
        int opt_testmode;
        int opt_kerberos;
        int opt_force_full_repl;
+       int opt_ccache;
        int opt_single_obj_repl;
        int opt_clean_old_entries;
 
index cae435b6c9c9874c730f7f47afcfa6c5fb20d266..8fe243da7cff13a3349bfd13e6408c1118ce7477 100644 (file)
@@ -7362,6 +7362,9 @@ int net_rpc(struct net_context *c, int argc, const char **argv)
        if (c->opt_kerberos) {
                libnetapi_set_use_kerberos(c->netapi_ctx);
        }
+       if (c->opt_ccache) {
+               libnetapi_set_use_ccache(c->netapi_ctx);
+       }
 
        return net_run_function(c, argc, argv, "net rpc", func);
 }
index 5f66cfa01fc0d3174b9d8e5fce08aa86eaf940f0..bfa56a7016ea4e4b6d5c7c439d9dba9d1860910f 100644 (file)
@@ -109,6 +109,10 @@ NTSTATUS connect_to_service(struct net_context *c,
                flags |= CLI_FULL_CONNECTION_FALLBACK_AFTER_KERBEROS;
        }
 
+       if (c->opt_ccache) {
+               flags |= CLI_FULL_CONNECTION_USE_CCACHE;
+       }
+
        nt_status = cli_full_connection(cli_ctx, NULL, server_name,
                                        server_ss, c->opt_port,
                                        service_name, service_type,