summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-11-27 19:09:48 +0000
committerJeremy Allison <jra@samba.org>2002-11-27 19:09:48 +0000
commite65e16fdf60819a45d03862579e69be3b11d9118 (patch)
tree6dbb3f1a1905ed0ba83428308badb05e3c5ea8a3 /source3/libsmb
parent4060d198bf0aa6154707a132074458ef3a52fd1c (diff)
downloadsamba-e65e16fdf60819a45d03862579e69be3b11d9118.tar.gz
samba-e65e16fdf60819a45d03862579e69be3b11d9118.tar.bz2
samba-e65e16fdf60819a45d03862579e69be3b11d9118.zip
Test was reversed for ERRmoredata in cli_read.
Jeremy. (This used to be commit 1a36ac60bef8de5368860478c268ba1671bb4825)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/clireadwrite.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c
index 875df11dca..38e8aac42a 100644
--- a/source3/libsmb/clireadwrite.c
+++ b/source3/libsmb/clireadwrite.c
@@ -84,6 +84,7 @@ ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_
errors. */
if (cli_is_error(cli)) {
+ BOOL recoverable_error = False;
NTSTATUS status = NT_STATUS_OK;
uint8 eclass = 0;
uint32 ecode = 0;
@@ -93,8 +94,17 @@ ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_
else
cli_dos_error(cli, &eclass, &ecode);
+ /*
+ * ERRDOS ERRmoredata or STATUS_MORE_ENRTIES is a
+ * recoverable error, plus we have valid data in the
+ * packet so don't error out here.
+ */
+
if ((eclass == ERRDOS && ecode == ERRmoredata) ||
NT_STATUS_V(status) == NT_STATUS_V(STATUS_MORE_ENTRIES))
+ recoverable_error = True;
+
+ if (!recoverable_error)
return -1;
}