From 87e31f88f28210dc6b7033182435f55204098368 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 7 Mar 2024 15:31:39 +0100 Subject: [PATCH] s3:libsmb: let cli_session_creds_init() keep the value from 'client use kerberos' Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider Autobuild-User(master): Stefan Metzmacher Autobuild-Date(master): Tue May 7 12:33:29 UTC 2024 on atb-devel-224 --- source3/libsmb/cliconnect.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 724cdfb99ea..7e5c199b2d2 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -124,8 +124,14 @@ struct cli_credentials *cli_session_creds_init(TALLOC_CTX *mem_ctx, } if (use_kerberos && fallback_after_kerberos) { + /* + * Keep what we learned from the + * "client use kerberos" option. + */ + enum credentials_use_kerberos current_krb5 = + cli_credentials_get_kerberos_state(creds); cli_credentials_set_kerberos_state(creds, - CRED_USE_KERBEROS_DESIRED, + current_krb5, CRED_SPECIFIED); } else if (use_kerberos) { cli_credentials_set_kerberos_state(creds, -- 2.11.4.GIT