From 3414182af0ae2dcd8ebaa93cccfd62602e9863d1 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 3 Jul 2011 12:04:24 +0200 Subject: s3: Remove a use of cli_errstr --- source3/libsmb/clidfs.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'source3/libsmb/clidfs.c') diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c index 5c5257fb6f..1ae61511d1 100644 --- a/source3/libsmb/clidfs.c +++ b/source3/libsmb/clidfs.c @@ -151,19 +151,21 @@ static struct cli_state *do_connect(TALLOC_CTX *ctx, username = get_cmdline_auth_info_username(auth_info); password = get_cmdline_auth_info_password(auth_info); - if (!NT_STATUS_IS_OK(cli_session_setup(c, username, - password, strlen(password), - password, strlen(password), - lp_workgroup()))) { + status = cli_session_setup(c, username, + password, strlen(password), + password, strlen(password), + lp_workgroup()); + if (!NT_STATUS_IS_OK(status)) { /* If a password was not supplied then * try again with a null username. */ if (password[0] || !username[0] || get_cmdline_auth_info_use_kerberos(auth_info) || - !NT_STATUS_IS_OK(cli_session_setup(c, "", + !NT_STATUS_IS_OK(status = cli_session_setup(c, "", "", 0, "", 0, lp_workgroup()))) { - d_printf("session setup failed: %s\n", cli_errstr(c)); + d_printf("session setup failed: %s\n", + nt_errstr(status)); if (NT_STATUS_V(cli_nt_error(c)) == NT_STATUS_V(NT_STATUS_MORE_PROCESSING_REQUIRED)) d_printf("did you forget to run kinit?\n"); -- cgit