mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
s3:torture: add torture_open_connection_flags()
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
0a81af6824
commit
740c2dad3e
@ -65,6 +65,7 @@ bool torture_nttrans_scan(int dummy);
|
||||
|
||||
bool smbcli_parse_unc(const char *unc_name, TALLOC_CTX *mem_ctx,
|
||||
char **hostname, char **sharename);
|
||||
bool torture_open_connection_flags(struct cli_state **c, int conn_index, int flags);
|
||||
bool torture_open_connection(struct cli_state **c, int conn_index);
|
||||
bool torture_init_connection(struct cli_state **pcli);
|
||||
bool torture_cli_session_setup2(struct cli_state *cli, uint16_t *new_vuid);
|
||||
|
@ -356,19 +356,11 @@ static bool torture_open_connection_share(struct cli_state **c,
|
||||
return True;
|
||||
}
|
||||
|
||||
bool torture_open_connection(struct cli_state **c, int conn_index)
|
||||
bool torture_open_connection_flags(struct cli_state **c, int conn_index, int flags)
|
||||
{
|
||||
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;
|
||||
@ -396,6 +388,20 @@ bool torture_open_connection(struct cli_state **c, int conn_index)
|
||||
return torture_open_connection_share(c, host, share, flags);
|
||||
}
|
||||
|
||||
bool torture_open_connection(struct cli_state **c, int conn_index)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
return torture_open_connection_flags(c, conn_index, flags);
|
||||
}
|
||||
|
||||
bool torture_init_connection(struct cli_state **pcli)
|
||||
{
|
||||
struct cli_state *cli;
|
||||
|
Loading…
x
Reference in New Issue
Block a user