]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:passdb: Check return code of cli_credentials_set_conf()
authorAndreas Schneider <asn@samba.org>
Tue, 4 May 2021 09:08:28 +0000 (11:08 +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>
source3/passdb/passdb.c

index 73fcb3da30812b9642e17fffb5b8e6f542335e92..068c5a5ea70c115fe780e778658fb7146714f516 100644 (file)
@@ -2590,7 +2590,11 @@ NTSTATUS pdb_get_trust_credentials(const char *netbios_domain,
                        goto fail;
                }
 
-               cli_credentials_set_conf(creds, lp_ctx);
+               ok = cli_credentials_set_conf(creds, lp_ctx);
+               if (!ok) {
+                       status = NT_STATUS_INTERNAL_ERROR;
+                       goto fail;
+               }
 
                ok = cli_credentials_set_domain(creds, netbios_domain, CRED_SPECIFIED);
                if (!ok) {
@@ -2662,7 +2666,11 @@ NTSTATUS pdb_get_trust_credentials(const char *netbios_domain,
                goto fail;
        }
 
-       cli_credentials_set_conf(creds, lp_ctx);
+       ok = cli_credentials_set_conf(creds, lp_ctx);
+       if (!ok) {
+               status = NT_STATUS_INTERNAL_ERROR;
+               goto fail;
+       }
 
        cli_credentials_set_secure_channel_type(creds, channel);
        cli_credentials_set_password_last_changed_time(creds, last_set_time);