On 9/28/22 17:37, Erich Hoover (@ehoover) wrote:
@zfigura I would suspect that if you got something else, it would probably be ERANGE and you would likely get it for every file... That said, I doubt it would hurt anything.
Yes, that's the rub, really :-)
I basically downloaded these patches, tried to test them with my samba setup, found they silently didn't work, and discovered it was because we were getting ERANGE.
As long as the format has a fixed (or capped) size, which seems to be true of both the Samba 3 and Samba 4 formats, I think it'd make sense to be noisy about ERANGE, since that implies there's a new format we can't parse.
And if not, we should probably be calling it in a loop until we get the whole buffer. Either way, we should complain louder if there's data there that we can't parse.