Created attachment 14642 [details]
Only call synthetic_smb_fname() if needed
Using catia (or possibly another module using synthetic_smb_fname() ) for a folder with only traverse permission causes "Rejecting root override" because of an empty stat structure.
Steps to Reproduce :
1. Enable catia and a configuration requiring extended attributes.
vfs objects = catia
catia:mappings = 0x22:0xa8,0x2a:0xa4,0x2f:0xf8,0x3a:0xf7,0x3f:0xbf
store dos attributes = yes
2. Create a folder in the share and chmod 111
3. Access it through Samba, e.g. use smbclient and cd into the traverse-only folder.
Actual result :
In the smbd log, there's
[2018/11/09 15:19:46.769895, 0] ../source3/smbd/dosmode.c:302(get_ea_dos_attribute)
get_ea_dos_attribute: Rejecting root override, invalid stat [folderName]
Expected result :
Nothing in the log, the root override should succeed.
The root override was added with the bug #12944 and the following commit :
The problem seems to be the call to synthetic_smb_fname in catia_get_dos_attributes() :
I've patched this file to only call synthetic_smb_fname() if needed (i.e. if the file name was changed) and the bug goes away for folders which doesn't require mapping.
(In reply to sylvain from comment #0)
Not sure, but from briefly looking at the catia code, I guess what's missing is passing the exisiting stat info to synthetic_smb_fname().
*** This bug has been marked as a duplicate of bug 14015 ***