From 09c612f377749b79b850ee6c52ae49699e256359 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B6rn=20Baumbach?= Date: Mon, 17 Jan 2011 12:02:39 +0100 Subject: [PATCH] s3-smbclient: Fix cli_errstr() usage (part of bug #7864) Convert cli_errstr() to nt_errstr() Signed-off-by: Stefan Metzmacher --- source3/client/client.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/source3/client/client.c b/source3/client/client.c index 33c1a24fcc0..cd9150d2772 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -4110,6 +4110,7 @@ static int cmd_logon(void) { TALLOC_CTX *ctx = talloc_tos(); char *l_username, *l_password; + NTSTATUS nt_status; if (!next_token_talloc(ctx, &cmd_ptr,&l_username,NULL)) { d_printf("logon []\n"); @@ -4126,11 +4127,12 @@ static int cmd_logon(void) return 1; } - if (!NT_STATUS_IS_OK(cli_session_setup(cli, l_username, - l_password, strlen(l_password), - l_password, strlen(l_password), - lp_workgroup()))) { - d_printf("session setup failed: %s\n", cli_errstr(cli)); + nt_status = cli_session_setup(cli, l_username, + l_password, strlen(l_password), + l_password, strlen(l_password), + lp_workgroup()); + if (!NT_STATUS_IS_OK(nt_status)) { + d_printf("session setup failed: %s\n", nt_errstr(nt_status)); return -1; } -- 2.11.4.GIT