r18782: Do not send random data to the password change (although that reveals
authorGünther Deschner <gd@samba.org>
Thu, 21 Sep 2006 07:19:47 +0000 (07:19 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:19:11 +0000 (14:19 -0500)
interesting new password set tests), make sure to send valid characters.

Guenther
(This used to be commit f193c5347cf5ef019becbc98965b83c6b249483c)

source4/torture/rpc/samr.c

index 33da02e8c84696bbb830a1eb2edcdc5a7074c4f2..f9bd25dc37bd76c8a28d8cc1f3d25793dcfd1667 100644 (file)
@@ -1884,11 +1884,11 @@ static BOOL test_ChangePassword(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
 
        {
                char simple_pass[9];
-               char v = (char)random();
+               char *v = generate_random_str(mem_ctx, 1);
                int i;
 
                for (i=0; i <ARRAY_SIZE(simple_pass); i++) {
-                       simple_pass[i] = v;
+                       simple_pass[i] = *v;
                }
                simple_pass[i] = '\0';