Ensure we never return an EA name to a Windows client it can't handle.
authorJeremy Allison <jra@samba.org>
Tue, 9 Jul 2013 23:21:18 +0000 (16:21 -0700)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 19 Jul 2013 07:52:36 +0000 (17:52 +1000)
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>
source3/smbd/trans2.c

index 7bce6ead1eeb3702ad1c2ca0b2fd0a3596907e92..8532240fb98ef5982964793adbecfbe1c94e2297 100644 (file)
@@ -345,6 +345,15 @@ static NTSTATUS get_ea_list_from_file_path(TALLOC_CTX *mem_ctx, connection_struc
                    || samba_private_attr_name(names[i]))
                        continue;
 
+               /*
+                * Filter out any underlying POSIX EA names
+                * that a Windows client can't handle.
+                */
+               if (!lp_posix_pathnames() &&
+                               is_invalid_windows_ea_name(names[i])) {
+                       continue;
+               }
+
                listp = talloc(mem_ctx, struct ea_list);
                if (listp == NULL) {
                        return NT_STATUS_NO_MEMORY;