From 9b94de161f30bb34c666c0cf0cc94250e6a7b863 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 Reviewed-by: David Disseldorp --- 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 df6fe92c3aa..4cdd2394ca5 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -499,7 +499,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