From bb8ca0fdbf0fe68ad2cd47d6f8d68743bfbacdec Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 11 Sep 2008 18:57:49 +0200 Subject: Make cli_negprot return NTSTATUS instead of bool --- source3/torture/locktest.c | 6 ++++-- source3/torture/masktest.c | 6 ++++-- source3/torture/torture.c | 19 +++++++++++++------ 3 files changed, 21 insertions(+), 10 deletions(-) (limited to 'source3/torture') 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; } -- cgit