summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/torture/torture.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index ca4dbed1d8..090f08c160 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -150,15 +150,25 @@ BOOL torture_open_connection(struct cli_state **c)
{
BOOL retry;
int flags = 0;
+ NTSTATUS status;
+
if (use_kerberos)
flags |= CLI_FULL_CONNECTION_USE_KERBEROS;
- return (NT_STATUS_IS_OK(
- cli_full_connection(c, myname,
- host, NULL, port_to_use,
- share, "?????",
- username, workgroup,
- password, flags, &retry)));
+ status = cli_full_connection(c, myname,
+ host, NULL, port_to_use,
+ share, "?????",
+ username, workgroup,
+ password, flags, &retry);
+ if (!NT_STATUS_IS_OK(status)) {
+ return False;
+ }
+
+ if (use_oplocks) (*c)->use_oplocks = True;
+ if (use_level_II_oplocks) (*c)->use_level_II_oplocks = True;
+ (*c)->timeout = 120000; /* set a really long timeout (2 minutes) */
+
+ return True;
}