goto out;
}
+ /*
+ * The above call to filename_convert() is on the path from the client
+ * including the search mask. Until the code that chops of the search
+ * mask from the path below is moved before the call to
+ * filename_convert(), we close a possible pathref fsp to ensure
+ * SMB_VFS_CREATE_FILE() below will internally open a pathref fsp on the
+ * correct path.
+ */
+ if (smb_dname->fsp != NULL) {
+ fsp_free(smb_dname->fsp);
+ smb_dname->fsp = NULL;
+ }
+
mask = get_original_lcomp(talloc_tos(),
conn,
directory,
goto out;
}
+ ntstatus = openat_pathref_fsp(conn->cwd_fsp, smb_dname);
+ if (NT_STATUS_EQUAL(ntstatus, NT_STATUS_STOPPED_ON_SYMLINK)) {
+ ntstatus = NT_STATUS_OBJECT_NAME_NOT_FOUND;
+ }
+ if (!NT_STATUS_IS_OK(ntstatus)) {
+ reply_nterror(req, ntstatus);
+ goto out;
+ }
+
/*
* Open an fsp on this directory for the dptr.
*/