From: Andreas Schneider Date: Tue, 22 Jun 2021 07:39:53 +0000 (+0200) Subject: s4:auth: Check return code of cli_credentials_set_conf() X-Git-Tag: tevent-0.11.0~144 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f700ebda69bfd1a532aa43f8cf3279865931716;p=thirdparty%2Fsamba.git s4:auth: Check return code of cli_credentials_set_conf() Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett --- diff --git a/source4/auth/session.c b/source4/auth/session.c index e6b6653bb1d..8cf8670d848 100644 --- a/source4/auth/session.c +++ b/source4/auth/session.c @@ -255,6 +255,7 @@ struct auth_session_info *auth_session_info_from_transport(TALLOC_CTX *mem_ctx, gss_cred_id_t cred_handle; const char *error_string; int ret; + bool ok; DEBUG(10, ("Delegated credentials supplied by client\n")); @@ -276,7 +277,12 @@ struct auth_session_info *auth_session_info_from_transport(TALLOC_CTX *mem_ctx, } session_info->credentials = creds; - cli_credentials_set_conf(creds, lp_ctx); + ok = cli_credentials_set_conf(creds, lp_ctx); + if (!ok) { + *reason = "Failed to load smb.conf"; + return NULL; + } + /* Just so we don't segfault trying to get at a username */ cli_credentials_set_anonymous(creds);