From 8f40e362acdbee77c610d0aa34538d86f0e3fb6d Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 9 Jul 2013 15:52:47 -0700 Subject: [PATCH] Ensure set_ea cannot set invalid Windows EA names. Bug 9992 - Windows error 0x800700FE when copying files with xattr names containing ":" Signed-off-by: Jeremy Allison Reviewed-by: Andrew Bartlett --- source3/smbd/trans2.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index c1299464a08..ff7bc3e0afa 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -622,6 +622,15 @@ NTSTATUS set_ea(connection_struct *conn, files_struct *fsp, return NT_STATUS_INVALID_PARAMETER; } + /* + * Filter out invalid Windows EA names - before + * we set *any* of them. + */ + + if (ea_list_has_invalid_name(ea_list)) { + return STATUS_INVALID_EA_NAME; + } + fname = smb_fname->base_name; for (;ea_list; ea_list = ea_list->next) { -- 2.11.4.GIT