From af32a49c7d8803f597e184f1361e795f179b809f Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 24 Jan 2010 18:50:48 +0100 Subject: [PATCH] s3: Add --use-ccache to net --- source3/utils/net.c | 1 + source3/utils/net.h | 1 + source3/utils/net_rpc.c | 3 +++ source3/utils/net_util.c | 4 ++++ 4 files changed, 9 insertions(+) diff --git a/source3/utils/net.c b/source3/utils/net.c index 7154abf1f1d..85c3c7dcedd 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 3978459a624..91e8c530991 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 05b2a7c0fce..120f634a7a7 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -7357,6 +7357,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 5f66cfa01fc..bfa56a7016e 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, -- 2.11.4.GIT