From 3e227d8544a020d1aea24c38c9ca45a75d14c3f1 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 7 Sep 2011 20:35:51 +0200 Subject: s3:libsmb: pass CLI_FULL_CONNECTION_* flags via cli_connect_nb() metze Autobuild-User: Stefan Metzmacher Autobuild-Date: Thu Sep 8 10:21:50 CEST 2011 on sn-devel-104 --- source3/torture/locktest.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'source3/torture/locktest.c') diff --git a/source3/torture/locktest.c b/source3/torture/locktest.c index d6c544d8e8..da3b9a7cdf 100644 --- a/source3/torture/locktest.c +++ b/source3/torture/locktest.c @@ -169,6 +169,7 @@ static struct cli_state *connect_one(char *share, int snum) fstring myname; static int count; NTSTATUS status; + int flags = 0; fstrcpy(server,share+2); share = strchr_m(server,'\\'); @@ -182,16 +183,21 @@ static struct cli_state *connect_one(char *share, int snum) /* have to open a new connection */ - status = cli_connect_nb(server_n, NULL, 0, 0x20, myname, Undefined, - &c); + if (use_kerberos) { + flags |= CLI_FULL_CONNECTION_USE_KERBEROS; + } + if (use_oplocks) { + flags |= CLI_FULL_CONNECTION_OPLOCKS; + } + + status = cli_connect_nb(server_n, NULL, 0, 0x20, myname, + Undefined, flags, &c); if (!NT_STATUS_IS_OK(status)) { DEBUG(0, ("Connection to %s failed. Error %s\n", server_n, nt_errstr(status))); return NULL; } - c->use_kerberos = use_kerberos; - status = cli_negprot(c); if (!NT_STATUS_IS_OK(status)) { DEBUG(0, ("protocol negotiation failed: %s\n", @@ -246,8 +252,6 @@ static struct cli_state *connect_one(char *share, int snum) DEBUG(4,(" tconx ok\n")); - c->use_oplocks = use_oplocks; - return c; } -- cgit