From 8057d84f33d96a3143b1908b47e65e6a89d4f861 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 12 Aug 2019 18:57:06 +0200 Subject: [PATCH 082/187] s3:passdb: Use generate_secret_buffer() for generating passwords Signed-off-by: Andreas Schneider Reviewed-by: Alexander Bokovoy (cherry picked from commit 6fa3e4de7c168dc7c869ec9966729a36bda27f57) --- source3/passdb/pdb_nds.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source3/passdb/pdb_nds.c b/source3/passdb/pdb_nds.c index 349ea0b6c38..216c9e6b50b 100644 --- a/source3/passdb/pdb_nds.c +++ b/source3/passdb/pdb_nds.c @@ -814,7 +814,8 @@ static NTSTATUS pdb_nds_update_login_attempts(struct pdb_methods *methods, got_clear_text_pw = True; } } else { - generate_random_buffer((unsigned char *)clear_text_pw, 24); + /* This is a long term key */ + generate_secret_buffer((unsigned char *)clear_text_pw, 24); clear_text_pw[24] = '\0'; DEBUG(5,("pdb_nds_update_login_attempts: using random password %s\n", clear_text_pw)); } -- 2.23.0