Changeset View
Changeset View
Standalone View
Standalone View
files/patch-source3_modules_vfs__fruit.c
Property | Old Value | New Value |
---|---|---|
fbsd:nokeywords | null | yes \ No newline at end of property |
svn:eol-style | null | native \ No newline at end of property |
svn:keywords | null | FreeBSD=%H \ No newline at end of property |
svn:mime-type | null | text/plain \ No newline at end of property |
--- source3/modules/vfs_fruit.c.orig 2020-04-07 08:45:51.000000000 +0200 | |||||
+++ source3/modules/vfs_fruit.c 2020-09-19 20:10:05.720434000 +0200 | |||||
@@ -2191,12 +2191,23 @@ | |||||
{ | |||||
ssize_t nread; | |||||
int ret; | |||||
+ char *p = (char *)data; | |||||
nread = SMB_VFS_NEXT_PREAD(handle, fsp, data, n, offset); | |||||
- if (nread == -1 || nread == n) { | |||||
- return nread; | |||||
+ | |||||
+ if (nread == -1) { | |||||
+ return -1; | |||||
} | |||||
+ if (nread == n) { | |||||
+ if (offset == 0 && nread > 3 && p[0] == 0 && p[1] == 'F' && p[2] == 'P') { | |||||
+ DBG_NOTICE("Fixing AFP_Info of [%s]\n", | |||||
+ fsp_str_dbg(fsp)); | |||||
+ p[0] = 'A'; | |||||
+ } | |||||
+ return nread; | |||||
+ } | |||||
+ | |||||
DBG_ERR("Removing [%s] after short read [%zd]\n", | |||||
fsp_str_dbg(fsp), nread); | |||||