summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2013-07-09 15:52:47 -0700
committerAndrew Bartlett <abartlet@samba.org>2013-07-19 17:52:34 +1000
commitf246d69b9e38db8632ade65692078959e3ed4da8 (patch)
treef394cbd0fa6b74475a57bbfb9a85e9ad7ae47a1c /source3/smbd
parent1766f9e3878a8ee64104a7a1c0874a7a0c6a2417 (diff)
downloadsamba-f246d69b9e38db8632ade65692078959e3ed4da8.tar.gz
samba-f246d69b9e38db8632ade65692078959e3ed4da8.tar.bz2
samba-f246d69b9e38db8632ade65692078959e3ed4da8.zip
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 <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/trans2.c9
1 files changed, 9 insertions, 0 deletions
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) {