From a0346c10974fd23a152b98783ba8975604dd3ea5 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 27 Mar 2013 11:54:34 -0700 Subject: [PATCH] Final fix for bug #9130 - Certain xattrs cause Windows error 0x800700FF The spec lies when it says that NextEntryOffset is the only value considered when finding the next EA. We were adding 4 more extra pad bytes than needed (i.e. if the next entry already was on a 4 byte boundary, then we were adding 4 additional pad bytes). Signed-off-by: Jeremy Allison The last 5 patches address bug #9130 - Certain xattrs cause Windows error 0x800700FF. (cherry picked from commit 57db33599589b06a60cb7cbb454f87bf40c542e0) --- source3/smbd/trans2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index f88c9868c0d..01b0130a38d 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -451,7 +451,7 @@ static NTSTATUS fill_ea_chained_buffer(TALLOC_CTX *mem_ctx, this_size = 0x08 + dos_namelen + 1 + ea_list->ea.value.length; if (ea_list->next) { - pad = 4 - (this_size % 4); + pad = (4 - (this_size % 4)) % 4; this_size += pad; } -- 2.11.4.GIT