diff options
author | Volker Lendecke <vl@samba.org> | 2008-03-08 22:29:35 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-03-08 22:29:35 +0100 |
commit | 1a3cad6e6d5a4c1e6db008cfa47f137e50a7469e (patch) | |
tree | 7d60f1ba49e1815496de9ee9b0d9e08b74f111e1 /source3 | |
parent | 973734cde620585e409d2c125184a2388ab26041 (diff) | |
download | samba-1a3cad6e6d5a4c1e6db008cfa47f137e50a7469e.tar.gz samba-1a3cad6e6d5a4c1e6db008cfa47f137e50a7469e.tar.bz2 samba-1a3cad6e6d5a4c1e6db008cfa47f137e50a7469e.zip |
Print out the used seed in smbtorture
(This used to be commit 26d64d22d65938023a4e45c3893e7021e51f4d9c)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/torture/torture.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source3/torture/torture.c b/source3/torture/torture.c index 8d67e512fe..d8add208f5 100644 --- a/source3/torture/torture.c +++ b/source3/torture/torture.c @@ -5502,6 +5502,7 @@ static void usage(void) int gotpass = 0; bool correct = True; TALLOC_CTX *frame = talloc_stackframe(); + int seed = time(NULL); dbf = x_stdout; @@ -5547,8 +5548,6 @@ static void usage(void) argc--; argv++; - srandom(time(NULL)); - fstrcpy(workgroup, lp_workgroup()); while ((opt = getopt(argc, argv, "p:hW:U:n:N:O:o:m:Ld:Aec:ks:b:")) != EOF) { @@ -5557,7 +5556,7 @@ static void usage(void) port_to_use = atoi(optarg); break; case 's': - srandom(atoi(optarg)); + seed = atoi(optarg); break; case 'W': fstrcpy(workgroup,optarg); @@ -5620,6 +5619,10 @@ static void usage(void) } } + d_printf("using seed %d\n", seed); + + srandom(seed); + if(use_kerberos && !gotuser) gotpass = True; while (!gotpass) { |