filename_convert called in two different places in source3/smbd/smb2_create.?

Jeremy Allison jra at
Wed Nov 25 00:43:33 UTC 2015

On Thu, Nov 19, 2015 at 09:53:49AM -0800, Richard Sharpe wrote:
> Hi folks,
> I notice that filename_convert is called in two different places in
> smb2_create.c.
> It is called in the do_durable_reconnect arm of the processing via the
> function smbd_smb2_create_durable_lease_check and it is called
> explicitly in the non-durable-reconnect arm of the create processing.
> Is there a specific reason for that?
> Can we not pull the calls above the test for these two arms to make it
> obvious that filename_convert is being called for both cases?
> If the filename won't convert or there is some other error, we could
> avoid doing additional processing that is not needed.

Hmmm. Ordering may be important here, not sure.

In the regular case, filename_convert is called early. In the
durable handle case, filename_convert is called after
smb2srv_open_recreate() and SMB_VFS_DURABLE_RECONNECT().

Error returns may matter here..

More information about the samba-technical mailing list