summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2021-05-04 11:05:27 +0200
committerAndrew Bartlett <abartlet@samba.org>2021-06-29 02:19:35 +0000
commitced8390c955a91062da6eaed96d948a6d45d1cbd (patch)
tree680211907fd761e74278fb53dcea7b67576ce513 /source3
parentcdf8859b906bab0461256c7f773aba23227642df (diff)
downloadsamba-ced8390c955a91062da6eaed96d948a6d45d1cbd.tar.gz
s3:auth: Check return code of cli_credentials_set_conf()
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/auth/auth_generic.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/auth/auth_generic.c b/source3/auth/auth_generic.c
index ebb1f19bd54..0e9245fc23d 100644
--- a/source3/auth/auth_generic.c
+++ b/source3/auth/auth_generic.c
@@ -268,6 +268,7 @@ NTSTATUS auth_generic_prepare(TALLOC_CTX *mem_ctx,
struct cli_credentials *server_credentials;
const char *dns_name;
const char *dns_domain;
+ bool ok;
struct auth4_context *auth4_context = make_auth4_context_s3(tmp_ctx, auth_context);
if (auth4_context == NULL) {
goto nomem;
@@ -346,7 +347,12 @@ NTSTATUS auth_generic_prepare(TALLOC_CTX *mem_ctx,
goto nomem;
}
- cli_credentials_set_conf(server_credentials, lp_ctx);
+ ok = cli_credentials_set_conf(server_credentials, lp_ctx);
+ if (!ok) {
+ DBG_ERR("Failed to set server credentials defaults "
+ "from smb.conf.\n");
+ goto nomem;
+ }
if (lp_security() == SEC_ADS || USE_KERBEROS_KEYTAB) {
cli_credentials_set_kerberos_state(server_credentials,