When a client sends a NT_TRANSACT_CREATE with extended attributes in the packet, the server should store those EAs if the file is being created or overwritten. The server sets EAs in the following code snippet: "smbd/open.c" line 3175 of 3496 if ((ea_list != NULL) && (info == FILE_WAS_CREATED)) { status = set_ea(conn, fsp, fname, ea_list); if (!NT_STATUS_IS_OK(status)) { goto fail; } } The code only sets the EAs when a new file is created. It should include the case where a file is being overwritten. This was found using the Microsoft common file system test tools.
Created attachment 4348 [details] PAtch for master Can you let me know if this fixes the problem ? The Microsoft common file system test tools seem to be very useful, any chance of them being released ? Cheers, Jeremy.
Jeremy, your patch is verified. Thanks! The common file system test tools are developed by the NTFS team. It covers all the Windows file system APIs. It is used by many groups within Microsoft for file I/O related regression tests. The SMB team is an active user of the tool. We will talk to the NTFS team on the possible release of the test tools. Thanks, Long
Pushed for master. Volker, do we want this for 3.4.0 ? Seems low risk, but I'll let you assess. Jeremy.
Didn't make it to 3.4.0, but I think this is low-risk enough for 3.4.1. Thanks, Volker
Pushed to v3-4-test. Will be included in 3.4.1. Closing out bug report. Thanks!
*** Bug 4670 has been marked as a duplicate of this bug. ***