LanManFS patch
Rik Griffin (98) 264 posts |
I started using LanManFS instead of LanMan98 recently, to access SMB shares on a Linux Suse 42.2 PC. Server is running smbd 4.4.2-11.15.1. It seems that recently (2014!) the samba maintainers made a change to smbd for compatibility with Windows 2000. The commit to their code is here: https://git.samba.org/?p=samba.git;a=commitdiff;h=8b746f5a2137b74e28bce5370f5aa9d4bcdac6c2 This breaks LanManFS, when fetching files whose size is between 4304 and 4356 bytes. LanManFS request a block of data of (say) 4320 bytes, and smbd truncates that to The solution would seem to be to restrict LanManFS to requesting a maximum block size that matches what the server will send out. Below is the diff of my changes to LanManFS.c.SMB. Having looked at the server code, I don’t think this problem will affect ‘raw reads’, so I didn’t modify that part of LanManFS. Ticket here: https://www.riscosopen.org/tracker/tickets/459
|
Rik Griffin (98) 264 posts |
I’ve done some further testing and I’ve got no idea why I initially got bad results. Perhaps a compiler/linker problem, but after a clean and recompile everything seems ok with this patch. |