The fix in #12261 for setting file type is dos_mode() in case SMB_VFS_GET_DOS_ATTRIBUTES() didn't set neither FILE_ATTRIBUTE_NORMAL nor FILE_ATTRIBUTE_DIRECTORY. The last resort check was only triggered if SMB_VFS_GET_DOS_ATTRIBUTES() returned zero, so if it returned eg FILE_ATTRIBUTE_ARCHIVE we still fail to set the file type attribute.... d'oh! Patch to follow....
Created attachment 12673 [details] Patch for master
Jeremy, I didn't get it right the first time, please help me to get it right with the second attempt. Sorry! :/
Bugger, looks like I didn't get the review right either (and it looked a completely simple fix !). Doh. I'll take a look asap.
Comment on attachment 12673 [details] Patch for master This patch breaks samba3.base.delete. I'll upload a fixed patch shortly.
Created attachment 12674 [details] git-am fix for master. Ralph, I think this is the correct fix. What your patch got wrong is that a directory must always have FILE_ATTRIBUTE_DIRECTORY set - no matter what other attributes are on the directory, but a file only has FILE_ATTRIBUTE_NORMAL set if there are *NO* other attributes set. Once a file has hidden, system, etc. set then we do not add FILE_ATTRIBUTE_NORMAL. This fix passes samba3.base.delete. Please review and push to master if happy. Jeremy.
Comment on attachment 12674 [details] git-am fix for master. Oh, glad you caught this! I believe your commit message then is not quite right and doesn't match the code. I have an update patch with a rewritten commit message and otherwise unchanged code.
Created attachment 12677 [details] Patch for master
Comment on attachment 12677 [details] Patch for master LGTM. If you don't get it in first I'll add on my next autobuild (autobuild is currently failing for me).
Created attachment 12704 [details] Patch for 4.4 and 4.5 cherry-picked from master
Comment on attachment 12704 [details] Patch for 4.4 and 4.5 cherry-picked from master LGTM.
Re-assigning to Karolin for inclusion in 4.5.next, 4.4.next.
(In reply to Jeremy Allison from comment #11) Pushed to autobuild-v4-{4,5}-test.
(In reply to Karolin Seeger from comment #12) Pushed to both branches. Closing out bug report. Thanks!