diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/utils/net.c | 1 | ||||
-rw-r--r-- | source3/utils/net.h | 1 | ||||
-rw-r--r-- | source3/utils/net_rpc.c | 3 | ||||
-rw-r--r-- | source3/utils/net_util.c | 4 |
4 files changed, 9 insertions, 0 deletions
diff --git a/source3/utils/net.c b/source3/utils/net.c index 7154abf1f1..85c3c7dced 100644 --- a/source3/utils/net.c +++ b/source3/utils/net.c @@ -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' */ diff --git a/source3/utils/net.h b/source3/utils/net.h index 3978459a62..91e8c53099 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -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; diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index cae435b6c9..8fe243da7c 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -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); } diff --git a/source3/utils/net_util.c b/source3/utils/net_util.c index 5f66cfa01f..bfa56a7016 100644 --- a/source3/utils/net_util.c +++ b/source3/utils/net_util.c @@ -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, |