diff options
author | Björn Baumbach <bb@sernet.de> | 2011-01-17 12:02:39 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-01-25 10:45:22 +0100 |
commit | 09c612f377749b79b850ee6c52ae49699e256359 (patch) | |
tree | ebbae698011872b81dfc11ee45603d0ed2ae011e /source3/client | |
parent | 99f8f5e5945c5cd694dbb37fa947c04a24e25957 (diff) | |
download | samba-09c612f377749b79b850ee6c52ae49699e256359.tar.gz samba-09c612f377749b79b850ee6c52ae49699e256359.tar.bz2 samba-09c612f377749b79b850ee6c52ae49699e256359.zip |
s3-smbclient: Fix cli_errstr() usage (part of bug #7864)
Convert cli_errstr() to nt_errstr()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/client')
-rw-r--r-- | source3/client/client.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source3/client/client.c b/source3/client/client.c index 33c1a24fcc..cd9150d277 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 <username> [<password>]\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; } |