]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
auth:creds: Keep the password secret
authorAndreas Schneider <asn@samba.org>
Thu, 7 Aug 2025 11:45:48 +0000 (13:45 +0200)
committerJule Anger <janger@samba.org>
Thu, 28 Aug 2025 09:38:21 +0000 (09:38 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15893

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
(cherry picked from commit 705db6c8b295f65f40b7dcd0d5dc0f6db901c8d7)

auth/credentials/credentials.c

index 1992b1c6a74fcab89da96c68a1da6c04fecec2e5..1a64a2d8cdc88f0aa0d025a35262eb9cd02dd7a2 100644 (file)
@@ -626,6 +626,7 @@ _PUBLIC_ bool cli_credentials_set_password(struct cli_credentials *cred,
                if (cred->password == NULL) {
                        return false;
                }
+               talloc_keep_secret(discard_const(cred->password));
 
                /* Don't print the actual password in talloc memory dumps */
                talloc_set_name_const(cred->password,