"vfs mkdir use tmp name" creates a name with ":" because the file should
be invisible for Windows clients. ":" however is an invalid character on
FAT filesystems and we get EINVAL back. In that case we fall back to not
using tmp names for mkdir.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15845
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
(cherry picked from commit
c2b74ef093aff6175ef8e4572a203e5beacc527f)
mode);
if (ret != 0) {
status = map_nt_error_from_unix(errno);
+ if (NT_STATUS_EQUAL(status, NT_STATUS_INVALID_PARAMETER)
+ && need_tmpname)
+ {
+ need_tmpname = false;
+ first_atname = smb_fname_atname;
+ goto mkdir_first;
+ }
DBG_NOTICE("MKDIRAT failed for '%s': %s\n",
smb_fname_str_dbg(smb_dname), nt_errstr(status));
goto restore_orig;