s3:passdb: Use generate_secret_buffer() for generating passwords
authorAndreas Schneider <asn@samba.org>
Mon, 12 Aug 2019 16:57:06 +0000 (18:57 +0200)
committerAlexander Bokovoy <ab@samba.org>
Wed, 14 Aug 2019 15:07:24 +0000 (15:07 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
source3/passdb/pdb_nds.c

index 349ea0b6c38f4657b303b69a6b3879e595b93c9d..216c9e6b50b3d9c340e6dedab271e685ac87a1ec 100644 (file)
@@ -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));
                }