summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/torture/torture.c9
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) {