s3-libsmb: Remove use of cli_errstr()
authorBjörn Baumbach <bb@sernet.de>
Thu, 7 Jul 2011 15:18:40 +0000 (17:18 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 7 Jul 2011 17:16:28 +0000 (19:16 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
source3/libsmb/libsmb_server.c

index 755ef2d32b0dfa622cbe8ef5de9faeb7e79503c9..d83d8ff3474e7cc770f20577f1c72a2b2a08c74f 100644 (file)
@@ -329,10 +329,15 @@ SMBC_server_internal(TALLOC_CTX *ctx,
                         if (is_ipc) {
                                 DEBUG(4,
                                       ("IPC$ so ignore case sensitivity\n"));
-                        } else if (!NT_STATUS_IS_OK(cli_get_fs_attr_info(c, &fs_attrs))) {
+                                status = NT_STATUS_OK;
+                        } else {
+                                status = cli_get_fs_attr_info(c, &fs_attrs);
+                        }
+
+                        if (!NT_STATUS_IS_OK(status)) {
                                 DEBUG(4, ("Could not retrieve "
                                           "case sensitivity flag: %s.\n",
-                                          cli_errstr(c)));
+                                          nt_errstr(status)));
 
                                 /*
                                  * We can't determine the case sensitivity of
@@ -344,7 +349,7 @@ SMBC_server_internal(TALLOC_CTX *ctx,
                                 } else {
                                         cli_set_case_sensitive(c, False);
                                 }
-                        } else {
+                        } else if (!is_ipc) {
                                 DEBUG(4,
                                       ("Case sensitive: %s\n",
                                        (fs_attrs & FILE_CASE_SENSITIVE_SEARCH