While looking at SMB sparse file handling, I noticed that a directory cannot be assigned the sparse attribute on Windows SMB servers (tested against 2k12 and 2k8) via FSCTL_SET_SPARSE. However, Samba allows such a request, and retains the flag when configured with "store dos attributes = yes". Samba should be fixed to return NT_STATUS_INVALID_PARAMETER for FSCTL_SET_SPARSE requests when the request handle refers to a directory.
Created attachment 10235 [details] patch for v4-0-test branch, cherry-picked from master
Created attachment 10236 [details] patch for v4-1-test branch, cherry-picked from master
Re-assigning to Karolin for inclusion in 4.1.next, 4.0.next. Thanks ! Jeremy.
Pushed to autobuild-v4-[0|1]-test.
Pushed to both branches. Closing out bug report. Thanks!