]> 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)
committerAlexander Bokovoy <ab@samba.org>
Mon, 25 Aug 2025 11:03:38 +0000 (11:03 +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>
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,