diff options
author | Jeremy Allison <jra@samba.org> | 2013-07-09 15:52:47 -0700 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2013-07-19 17:52:34 +1000 |
commit | f246d69b9e38db8632ade65692078959e3ed4da8 (patch) | |
tree | f394cbd0fa6b74475a57bbfb9a85e9ad7ae47a1c | |
parent | 1766f9e3878a8ee64104a7a1c0874a7a0c6a2417 (diff) | |
download | samba-f246d69b9e38db8632ade65692078959e3ed4da8.tar.gz |
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>
-rw-r--r-- | source3/smbd/trans2.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 14a2e0fa172..7bce6ead1ee 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) { |