summaryrefslogtreecommitdiff
path: root/source3/torture
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2009-02-05 16:39:28 +0100
committerJelmer Vernooij <jelmer@samba.org>2009-02-05 16:39:28 +0100
commit6d139ca4680abcbda5110f2f0886aa038ff62088 (patch)
tree7d61db40fb058bcbf08ccd8e0dadc365b819371b /source3/torture
parent4a9b3052caeb8bb144803b49dcfae82395172bc3 (diff)
parentafa960cbbcd609123d710c301e7a9a070c1fed70 (diff)
downloadsamba-6d139ca4680abcbda5110f2f0886aa038ff62088.tar.gz
samba-6d139ca4680abcbda5110f2f0886aa038ff62088.tar.bz2
samba-6d139ca4680abcbda5110f2f0886aa038ff62088.zip
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Conflicts: librpc/ndr.pc.in
Diffstat (limited to 'source3/torture')
-rw-r--r--source3/torture/locktest.c7
-rw-r--r--source3/torture/masktest.c7
-rw-r--r--source3/torture/torture.c25
3 files changed, 24 insertions, 15 deletions
diff --git a/source3/torture/locktest.c b/source3/torture/locktest.c
index 1bff95f4f3..4e8dcdd09a 100644
--- a/source3/torture/locktest.c
+++ b/source3/torture/locktest.c
@@ -257,9 +257,10 @@ static struct cli_state *connect_one(char *share, int snum)
DEBUG(4,(" session setup ok\n"));
- if (!cli_send_tconX(c, share, "?????",
- password[snum], strlen(password[snum])+1)) {
- DEBUG(0,("tree connect failed: %s\n", cli_errstr(c)));
+ status = cli_tcon_andx(c, share, "?????", password[snum],
+ strlen(password[snum])+1);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(0,("tree connect failed: %s\n", nt_errstr(status)));
cli_shutdown(c);
return NULL;
}
diff --git a/source3/torture/masktest.c b/source3/torture/masktest.c
index 2c3bda1d43..fb562c8075 100644
--- a/source3/torture/masktest.c
+++ b/source3/torture/masktest.c
@@ -249,9 +249,10 @@ static struct cli_state *connect_one(char *share)
DEBUG(4,(" session setup ok\n"));
- if (!cli_send_tconX(c, share, "?????",
- password, strlen(password)+1)) {
- DEBUG(0,("tree connect failed: %s\n", cli_errstr(c)));
+ status = cli_tcon_andx(c, share, "?????", password,
+ strlen(password)+1);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(0,("tree connect failed: %s\n", nt_errstr(status)));
cli_shutdown(c);
return NULL;
}
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 8a1a61e79a..1210a36a39 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -1101,6 +1101,7 @@ static bool run_tcon_test(int dummy)
uint16 vuid1, vuid2;
char buf[4];
bool ret = True;
+ NTSTATUS status;
memset(buf, '\0', sizeof(buf));
@@ -1127,10 +1128,11 @@ static bool run_tcon_test(int dummy)
return False;
}
- if (!cli_send_tconX(cli, share, "?????",
- password, strlen(password)+1)) {
+ status = cli_tcon_andx(cli, share, "?????",
+ password, strlen(password)+1);
+ if (!NT_STATUS_IS_OK(status)) {
printf("%s refused 2nd tree connect (%s)\n", host,
- cli_errstr(cli));
+ nt_errstr(status));
cli_shutdown(cli);
return False;
}
@@ -1239,14 +1241,14 @@ static bool tcon_devtest(struct cli_state *cli,
const char *return_devtype,
NTSTATUS expected_error)
{
- bool status;
+ NTSTATUS status;
bool ret;
- status = cli_send_tconX(cli, myshare, devtype,
- password, strlen(password)+1);
+ status = cli_tcon_andx(cli, myshare, devtype,
+ password, strlen(password)+1);
if (NT_STATUS_IS_OK(expected_error)) {
- if (status) {
+ if (NT_STATUS_IS_OK(status)) {
if (strcmp(cli->dev, return_devtype) == 0) {
ret = True;
} else {
@@ -1264,7 +1266,7 @@ static bool tcon_devtest(struct cli_state *cli,
}
cli_tdis(cli);
} else {
- if (status) {
+ if (NT_STATUS_IS_OK(status)) {
printf("tconx to share %s with type %s "
"should have failed but succeeded\n",
myshare, devtype);
@@ -2157,7 +2159,7 @@ static bool run_fdsesstest(int dummy)
return False;
saved_cnum = cli->cnum;
- if (!cli_send_tconX(cli, share, "?????", "", 1))
+ if (!NT_STATUS_IS_OK(cli_tcon_andx(cli, share, "?????", "", 1)))
return False;
new_cnum = cli->cnum;
cli->cnum = saved_cnum;
@@ -5831,6 +5833,11 @@ static void usage(void)
load_case_tables();
+ if (is_default_dyn_CONFIGFILE()) {
+ if(getenv("SMB_CONF_PATH")) {
+ set_dyn_CONFIGFILE(getenv("SMB_CONF_PATH"));
+ }
+ }
lp_load(get_dyn_CONFIGFILE(),True,False,False,True);
load_interfaces();