vfs_fruit: fix offset and len handling for AFP_AfpInfo stream
authorRalph Boehme <slow@samba.org>
Sat, 19 Dec 2015 10:06:19 +0000 (11:06 +0100)
committerJeremy Allison <jra@samba.org>
Mon, 21 Dec 2015 22:21:18 +0000 (23:21 +0100)
commitf569fd5e44300ab41aa7298b3efdcac99cd330f2
tree23eae7952a408c92636d4c5eabe5b7af0025b033
parent666a55b7060542ef78ff5f22d368f2ebc4c3318f
vfs_fruit: fix offset and len handling for AFP_AfpInfo stream

When reading from the AFP_AfpInfo stream, OS X ignores the offset from
the request and always reads from offset=0.

The offset bounds check has a off-by-1 bug in OS X, so a request
offset=60 (AFP_AfpInfo stream has a ficed size of 60 bytes), len=1
returns 1 byte from offset 0 insteaf of returning 0.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=11347

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_fruit.c