Fix Red Hat bugzilla bug : https://bugzilla.redhat.com/show_bug.cgi?id=516165
authorJeremy Allison <jra@samba.org>
Fri, 21 Aug 2009 10:44:54 +0000 (12:44 +0200)
committerKarolin Seeger <kseeger@samba.org>
Fri, 21 Aug 2009 10:46:47 +0000 (12:46 +0200)
nautilus fails to copy files from an SMB share. This is a show-stopper
for 3.4.1. Although gnome-vfs is doing *incredibly* stupid things by asking
for a read size of 65535 - this translates on the wire to a 65534 byte read
followed by a 1 byte read. Please send this back to the gnome developers that
they will ge horrid on the wire performance for this.
Jeremy.

Fixes bug #6649.

Fixed in master with commit 33d27797d3ae9ab3ff7e1aa940941cc450f5ad1d.

source3/libsmb/clireadwrite.c

index f2f447b4c95661f7d87190473afd6f4b200cc073..b1064ba832f7ea41c2dd1aa47977b600b4419836 100644 (file)
@@ -185,7 +185,7 @@ NTSTATUS cli_read_andx_recv(struct async_req *req, ssize_t *received,
        buf = (uint8_t *)smb_base(cli_req->inbuf) + SVAL(vwv+6, 0);
 
        if (trans_oob(smb_len(cli_req->inbuf), SVAL(vwv+6, 0), size)
-           || (buf < bytes)) {
+           || (size && (buf < bytes))) {
                DEBUG(5, ("server returned invalid read&x data offset\n"));
                return NT_STATUS_INVALID_NETWORK_RESPONSE;
        }