]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:auth: Check return code of cli_credentials_set_conf()
authorAndreas Schneider <asn@samba.org>
Tue, 22 Jun 2021 07:39:53 +0000 (09:39 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 29 Jun 2021 02:19:35 +0000 (02:19 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/auth/session.c

index e6b6653bb1de52009689a2ddd7fe544beca1f99d..8cf8670d8489813cc052e08d9f809f09baa74a24 100644 (file)
@@ -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);