From: Stefan Metzmacher Date: Thu, 7 Mar 2024 12:50:39 +0000 (+0100) Subject: s3:net: correctly implement --use-ccache as legacy for --use-winbind-ccache for ... X-Git-Tag: tdb-1.4.11~745 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a9beae36f0a41cd912a8238f9e3563638cbadc9d;p=thirdparty%2Fsamba.git s3:net: correctly implement --use-ccache as legacy for --use-winbind-ccache for 'net' Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider --- diff --git a/source3/utils/net.c b/source3/utils/net.c index badf2e046c2..a4726c1ca17 100644 --- a/source3/utils/net.c +++ b/source3/utils/net.c @@ -1047,10 +1047,11 @@ static struct functable net_func[] = { .arg = &c->opt_request_timeout, }, { + /* legacy for --use-winbind-ccache */ .longName = "use-ccache", .shortName = 0, .argInfo = POPT_ARG_NONE, - .arg = &c->opt_ccache, + .arg = &c->legacy_opt_ccache, }, { .longName = "verbose", @@ -1388,7 +1389,12 @@ static struct functable net_func[] = { c->opt_kerberos = (krb5_state > CRED_USE_KERBEROS_DESIRED); gensec_features = cli_credentials_get_gensec_features(c->creds); - c->opt_ccache = (gensec_features & GENSEC_FEATURE_NTLM_CCACHE); + if (c->legacy_opt_ccache) { + gensec_features |= GENSEC_FEATURE_NTLM_CCACHE; + cli_credentials_set_gensec_features(c->creds, + gensec_features, + CRED_SPECIFIED); + } } c->msg_ctx = cmdline_messaging_context(get_dyn_CONFIGFILE()); diff --git a/source3/utils/net.h b/source3/utils/net.h index fca3a9953af..559e97930a6 100644 --- a/source3/utils/net.h +++ b/source3/utils/net.h @@ -73,7 +73,7 @@ struct net_context { int opt_testmode; int opt_kerberos; int opt_force_full_repl; - int opt_ccache; + int legacy_opt_ccache; int opt_single_obj_repl; int opt_clean_old_entries; const char *opt_db;