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