From 16b4aa95658b997efe917a65f164a5e94764870e Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 7 Aug 2025 13:45:48 +0200 Subject: [PATCH] auth:creds: Keep the password secret BUG: https://bugzilla.samba.org/show_bug.cgi?id=15893 Signed-off-by: Andreas Schneider Reviewed-by: Alexander Bokovoy (cherry picked from commit 705db6c8b295f65f40b7dcd0d5dc0f6db901c8d7) --- auth/credentials/credentials.c | 1 + 1 file changed, 1 insertion(+) diff --git a/auth/credentials/credentials.c b/auth/credentials/credentials.c index 1992b1c6a74..1a64a2d8cdc 100644 --- a/auth/credentials/credentials.c +++ b/auth/credentials/credentials.c @@ -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, -- 2.47.3