From: Stefan Metzmacher Date: Mon, 19 Jun 2017 07:45:05 +0000 (+0200) Subject: s3:torture pass flags to torture_open_connection_share() X-Git-Tag: tevent-0.9.32~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5020c8bedfd66989511656b0cd8dd36a2927fe1;p=thirdparty%2Fsamba.git s3:torture pass flags to torture_open_connection_share() Signed-off-by: Stefan Metzmacher Reviewed-by: Jeremy Allison --- diff --git a/source3/torture/torture.c b/source3/torture/torture.c index c521013e8ea..8a1aa1229e0 100644 --- a/source3/torture/torture.c +++ b/source3/torture/torture.c @@ -326,16 +326,11 @@ bool smbcli_parse_unc(const char *unc_name, TALLOC_CTX *mem_ctx, static bool torture_open_connection_share(struct cli_state **c, const char *hostname, - const char *sharename) + const char *sharename, + int flags) { - int flags = CLI_FULL_CONNECTION_FORCE_SMB1; NTSTATUS status; - if (use_oplocks) - flags |= CLI_FULL_CONNECTION_OPLOCKS; - if (use_level_II_oplocks) - flags |= CLI_FULL_CONNECTION_LEVEL_II_OPLOCKS; - status = cli_full_connection_creds(c, myname, hostname, @@ -366,6 +361,14 @@ bool torture_open_connection(struct cli_state **c, int conn_index) char **unc_list = NULL; int num_unc_names = 0; bool result; + int flags = CLI_FULL_CONNECTION_FORCE_SMB1; + + if (use_oplocks) { + flags |= CLI_FULL_CONNECTION_OPLOCKS; + } + if (use_level_II_oplocks) { + flags |= CLI_FULL_CONNECTION_LEVEL_II_OPLOCKS; + } if (use_multishare_conn==True) { char *h, *s; @@ -383,14 +386,14 @@ bool torture_open_connection(struct cli_state **c, int conn_index) exit(1); } - result = torture_open_connection_share(c, h, s); + result = torture_open_connection_share(c, h, s, flags); /* h, s were copied earlier */ TALLOC_FREE(unc_list); return result; } - return torture_open_connection_share(c, host, share); + return torture_open_connection_share(c, host, share, flags); } bool torture_init_connection(struct cli_state **pcli)