summaryrefslogtreecommitdiff
path: root/source3/torture
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-09-11 18:57:49 +0200
committerVolker Lendecke <vl@samba.org>2008-12-19 10:28:30 +0100
commitbb8ca0fdbf0fe68ad2cd47d6f8d68743bfbacdec (patch)
tree99e4cf8220c138e0fce24d8fc87b7f23fb156905 /source3/torture
parent96a3d7be3151c93db9857bb065721c0c7961b2e8 (diff)
downloadsamba-bb8ca0fdbf0fe68ad2cd47d6f8d68743bfbacdec.tar.gz
samba-bb8ca0fdbf0fe68ad2cd47d6f8d68743bfbacdec.tar.bz2
samba-bb8ca0fdbf0fe68ad2cd47d6f8d68743bfbacdec.zip
Make cli_negprot return NTSTATUS instead of bool
Diffstat (limited to 'source3/torture')
-rw-r--r--source3/torture/locktest.c6
-rw-r--r--source3/torture/masktest.c6
-rw-r--r--source3/torture/torture.c19
3 files changed, 21 insertions, 10 deletions
diff --git a/source3/torture/locktest.c b/source3/torture/locktest.c
index 247c9abcc1..1bff95f4f3 100644
--- a/source3/torture/locktest.c
+++ b/source3/torture/locktest.c
@@ -212,8 +212,10 @@ static struct cli_state *connect_one(char *share, int snum)
DEBUG(4,(" session request ok\n"));
- if (!cli_negprot(c)) {
- DEBUG(0,("protocol negotiation failed\n"));
+ status = cli_negprot(c);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(0, ("protocol negotiation failed: %s\n",
+ nt_errstr(status)));
cli_shutdown(c);
return NULL;
}
diff --git a/source3/torture/masktest.c b/source3/torture/masktest.c
index 8fea15877f..2c3bda1d43 100644
--- a/source3/torture/masktest.c
+++ b/source3/torture/masktest.c
@@ -212,8 +212,10 @@ static struct cli_state *connect_one(char *share)
DEBUG(4,(" session request ok\n"));
- if (!cli_negprot(c)) {
- DEBUG(0,("protocol negotiation failed\n"));
+ status = cli_negprot(c);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(0, ("protocol negotiation failed: %s\n",
+ nt_errstr(status)));
cli_shutdown(c);
return NULL;
}
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 601cfb9438..5584c22a8f 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -4726,6 +4726,7 @@ static bool run_error_map_extract(int dummy) {
static struct cli_state *c_dos;
static struct cli_state *c_nt;
+ NTSTATUS status;
uint32 error;
@@ -4744,8 +4745,11 @@ static bool run_error_map_extract(int dummy) {
c_nt->use_spnego = False;
- if (!cli_negprot(c_nt)) {
- printf("%s rejected the NT-error negprot (%s)\n",host, cli_errstr(c_nt));
+ status = cli_negprot(c_nt);
+
+ if (!NT_STATUS_IS_OK(status)) {
+ printf("%s rejected the NT-error negprot (%s)\n", host,
+ nt_errstr(status));
cli_shutdown(c_nt);
return False;
}
@@ -4765,8 +4769,10 @@ static bool run_error_map_extract(int dummy) {
c_dos->use_spnego = False;
c_dos->force_dos_errors = True;
- if (!cli_negprot(c_dos)) {
- printf("%s rejected the DOS-error negprot (%s)\n",host, cli_errstr(c_dos));
+ status = cli_negprot(c_dos);
+ if (!NT_STATUS_IS_OK(status)) {
+ printf("%s rejected the DOS-error negprot (%s)\n", host,
+ nt_errstr(status));
cli_shutdown(c_dos);
return False;
}
@@ -4839,9 +4845,10 @@ static bool run_sesssetup_bench(int dummy)
return false;
}
- if (!cli_negprot(c)) {
+ status = cli_negprot(c);
+ if (!NT_STATUS_IS_OK(status)) {
printf("%s rejected the NT-error negprot (%s)\n", host,
- cli_errstr(c));
+ nt_errstr(status));
cli_shutdown(c);
return false;
}