{
struct smbcli_state *cli;
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
printf("starting open attr test\n");
- if (!torture_open_connection(&cli1)) {
+ if (!torture_open_connection(&cli1, 0)) {
return False;
}
int fnum1, oldtid;
uint8_t buf[1024];
- if (!torture_open_connection(&cli1) || !torture_open_connection(&cli2)) {
+ if (!torture_open_connection(&cli1, 0) ||
+ !torture_open_connection(&cli2, 1)) {
return False;
}
printf("starting attrib test\n");
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
printf("starting trans2 test\n");
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
}
printf("Opening secondary connection\n");
- if (!torture_open_connection(&cli2)) {
+ if (!torture_open_connection(&cli2, 1)) {
printf("Failed to open secondary connection\n");
correct = False;
}
const char *share = lp_parm_string(-1, "torture", "share");
const char *password = lp_parm_string(-1, "torture", "password");
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
struct smbcli_state *cli1, *cli2;
BOOL test1, test2 = True;
- if (!torture_open_connection(&cli1) || !torture_open_connection(&cli2)) {
+ if (!torture_open_connection(&cli1, 0) ||
+ !torture_open_connection(&cli2, 1)) {
return False;
}
printf("starting vuid test\n");
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
printf("starting open test\n");
- if (!torture_open_connection(&cli1)) {
+ if (!torture_open_connection(&cli1, 0)) {
return False;
}
error_test4:
/* Test the non-io opens... */
- if (!torture_open_connection(&cli2)) {
+ if (!torture_open_connection(&cli2, 1)) {
return False;
}
printf("starting xcopy test\n");
- if (!torture_open_connection(&cli1)) {
+ if (!torture_open_connection(&cli1, 0)) {
return False;
}
memset(buf, 0, sizeof(buf));
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
int fnum;
BOOL ret;
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
goto fail;
}
- if (!torture_open_connection(&cli_nt)) {
+ if (!torture_open_connection(&cli_nt, 0)) {
goto fail;
}
goto fail;
}
- if (!torture_open_connection(&cli_dos)) {
+ if (!torture_open_connection(&cli_dos, 1)) {
goto fail;
}
mem_ctx = talloc_init("torture_charset");
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
printf("Testing delayed update of write time using 2 connections\n");
- if (!torture_open_connection(&cli2)) {
+ if (!torture_open_connection(&cli2, 1)) {
return False;
}
goto done;
}
- if (!torture_open_connection(&cli2)) {
+ if (!torture_open_connection(&cli2, 1)) {
return False;
}
BOOL ret = True;
TALLOC_CTX *mem_ctx;
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
fnum1 = -1;
- if (!torture_open_connection(ppcli1)) {
+ if (!torture_open_connection(ppcli1, 0)) {
return False;
}
printf("starting delete test\n");
- if (!torture_open_connection(&cli1)) {
+ if (!torture_open_connection(&cli1, 0)) {
return False;
}
- if (!torture_open_connection(&cli2)) {
+ if (!torture_open_connection(&cli2, 1)) {
printf("(%s) failed to open second connection.\n",
__location__);
correct = False;
const char *fnames[2] = {"\\denytest1.dat", "\\denytest1.exe"};
int failures=0;
- if (!torture_open_connection(&cli1)) {
+ if (!torture_open_connection(&cli1, 0)) {
return False;
}
struct timeval tv, tv_start;
int failures=0;
- if (!torture_open_connection(&cli1) || !torture_open_connection(&cli2)) {
+ if (!torture_open_connection(&cli1, 0) ||
+ !torture_open_connection(&cli2, 1)) {
return False;
}
printf("Testing simple deny modes\n");
- if (!torture_open_connection(&cli1)) {
+ if (!torture_open_connection(&cli1, 0)) {
return False;
}
- if (!torture_open_connection(&cli2)) {
+ if (!torture_open_connection(&cli2, 1)) {
return False;
}
struct smbcli_state *cli1, *cli2;
BOOL ret;
- if (!torture_open_connection(&cli1)) {
+ if (!torture_open_connection(&cli1, 0)) {
return False;
}
- if (!torture_open_connection(&cli2)) {
+ if (!torture_open_connection(&cli2, 1)) {
return False;
}
union smb_setfileinfo sfinfo;
TALLOC_CTX *mem_ctx;
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
printf("starting dirtest1\n");
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
printf("starting dirtest2\n");
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
mem_ctx = talloc_init("torture_raw_mux");
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
for (i=0;i<torture_numops;i++) {
ret &= test_disconnect_lock(cli, mem_ctx);
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
ret &= test_disconnect_open(cli, mem_ctx);
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
}
time_t t1, t2;
uint_t lock_timeout;
- if (!torture_open_connection(&cli1) || !torture_open_connection(&cli2)) {
+ if (!torture_open_connection(&cli1, 0) ||
+ !torture_open_connection(&cli2, 1)) {
return False;
}
int fnum1, fnum2, fnum3;
BOOL correct = True;
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
#define NEXT_OFFSET offset += (~(uint32_t)0) / torture_numops
- if (!torture_open_connection(&cli1) || !torture_open_connection(&cli2)) {
+ if (!torture_open_connection(&cli1, 0) ||
+ !torture_open_connection(&cli2, 1)) {
return False;
}
uint8_t buf[1000];
BOOL correct = True;
- if (!torture_open_connection(&cli1) || !torture_open_connection(&cli2)) {
+ if (!torture_open_connection(&cli1, 0) ||
+ !torture_open_connection(&cli2, 1)) {
return False;
}
uint8_t buf[1000];
BOOL correct = True;
- if (!torture_open_connection(&cli1) || !torture_open_connection(&cli2)) {
+ if (!torture_open_connection(&cli1, 0) ||
+ !torture_open_connection(&cli2, 1)) {
return False;
}
int fnum;
NTSTATUS status;
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
uint8_t buf[200];
BOOL correct = False;
- if (!torture_open_connection(&cli1)) {
+ if (!torture_open_connection(&cli1, 0)) {
return False;
}
printf("starting mangle test\n");
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
ZERO_STRUCT(cli);
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
printf("starting rename test\n");
- if (!torture_open_connection(&cli1)) {
+ if (!torture_open_connection(&cli1, 0)) {
return False;
}
printf("starting trans2 scan test\n");
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
printf("starting nttrans scan test\n");
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
for (op=0x0;op<=0xFF;op++) {
if (op == SMBreadbraw) continue;
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
time_t t1 = time(NULL);
int timelimit = lp_parm_int(-1, "torture", "timelimit", 20);
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
union smb_open io;
NTSTATUS status;
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
printf("Generating valid character table\n");
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
codepoint_t equiv[0x10000][MAX_EQUIVALENCE];
printf("starting casetable\n");
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
int num_pipes = 0;
printf("starting pipenumber test\n");
- if (!torture_open_connection(&cli1)) {
+ if (!torture_open_connection(&cli1, 0)) {
return False;
}
cli = malloc_array_p(struct smbcli_state *, torture_numops);
for (i=0;i<torture_numops;i++) {
- if (!torture_open_connection(&cli[i])) {
+ if (!torture_open_connection(&cli[i], i)) {
return False;
}
printf("opened %d connections\r", i);
union smb_ioctl parms;
TALLOC_CTX *mem_ctx;
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
}
if (torture_nprocs > 1) {
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
BOOL ret = True;
TALLOC_CTX *mem_ctx;
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
mem_ctx = talloc_init("torture_rap_scan");
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
BOOL ret = True;
TALLOC_CTX *mem_ctx;
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
int fnum;
TALLOC_CTX *mem_ctx;
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
union smb_fileinfo finfo, finfo2;
NTSTATUS status;
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
BOOL ret = True;
TALLOC_CTX *mem_ctx;
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
BOOL ret = True;
TALLOC_CTX *mem_ctx;
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
BOOL ret = True;
TALLOC_CTX *mem_ctx;
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
BOOL ret = True;
TALLOC_CTX *mem_ctx;
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
BOOL ret = True;
TALLOC_CTX *mem_ctx;
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
BOOL ret = True;
TALLOC_CTX *mem_ctx;
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
BOOL ret = True;
TALLOC_CTX *mem_ctx;
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
BOOL ret = True;
TALLOC_CTX *mem_ctx;
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
printf("TESTING CHANGE NOTIFY FOLLOWED BY TDIS\n");
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
printf("TESTING CHANGE NOTIFY FOLLOWED BY EXIT\n");
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
printf("TESTING CHANGE NOTIFY FOLLOWED BY ULOGOFF\n");
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
BOOL ret = True;
TALLOC_CTX *mem_ctx;
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
BOOL ret = True;
TALLOC_CTX *mem_ctx;
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
BOOL ret = True;
TALLOC_CTX *mem_ctx;
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
const char *correct_name;
BOOL skip_streams = False;
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
union smb_fsinfo *s1, *s2;
TALLOC_CTX *mem_ctx;
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
BOOL ret = True;
TALLOC_CTX *mem_ctx;
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
BOOL ret = True;
TALLOC_CTX *mem_ctx;
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
NTSTATUS status;
BOOL ret = True;
TALLOC_CTX *mem_ctx;
- ssize_t nread;
- char buf[16];
- struct smbcli_tree *tree2;
BOOL nt_status_support;
if (!(mem_ctx = talloc_init("torture_samba3_badpath"))) {
goto fail;
}
- if (!torture_open_connection(&cli_nt)) {
+ if (!torture_open_connection(&cli_nt, 0)) {
goto fail;
}
goto fail;
}
- if (!torture_open_connection(&cli_dos)) {
+ if (!torture_open_connection(&cli_dos, 1)) {
goto fail;
}
BOOL ret = True;
TALLOC_CTX *mem_ctx;
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
BOOL ret = True;
TALLOC_CTX *mem_ctx;
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
asprintf(&fnum_fname, BASEDIR "\\fnum_test_%d.txt", n);
asprintf(&fnum_fname_new, BASEDIR "\\fnum_test_new_%d.txt", n);
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
return True;
}
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
BOOL ret = True;
TALLOC_CTX *mem_ctx;
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
BOOL ret = True;
TALLOC_CTX *mem_ctx;
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
BOOL ret = True;
TALLOC_CTX *mem_ctx;
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
return True;
}
-_PUBLIC_ BOOL torture_open_connection(struct smbcli_state **c)
+_PUBLIC_ BOOL torture_open_connection(struct smbcli_state **c, int conn_index)
{
const char *host = lp_parm_string(-1, "torture", "host");
const char *share = lp_parm_string(-1, "torture", "share");
NULL)) {
break;
}
- } else if (torture_open_connection(¤t_cli)) {
+ } else if (torture_open_connection(¤t_cli, 0)) {
break;
}
if (tries-- == 0) {