s3-smbclient: Fix cli_errstr() usage (part of bug #7864)
authorBjörn Baumbach <bb@sernet.de>
Mon, 17 Jan 2011 11:02:39 +0000 (12:02 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 25 Jan 2011 09:45:22 +0000 (10:45 +0100)
Convert cli_errstr() to nt_errstr()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
source3/client/client.c

index 33c1a24fcc04c7954d8eb3af11a9ab7c5d51f963..cd9150d27725e8a0b9e1cbfaaa1a73cb39778838 100644 (file)
@@ -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;
        }