From f246d69b9e38db8632ade65692078959e3ed4da8 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 9 Jul 2013 15:52:47 -0700 Subject: 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(+) (limited to 'source3/smbd') diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 14a2e0fa17..7bce6ead1e 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -623,6 +623,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) { -- cgit