This is a subtle one. The dirfsp returned by openat_pathref_dirfsp_nosymlink()
can be used inside open.c and passed to check_parent_access_fsp() to
check if a delete_on_close flag has been set on an existing "real"
open fsp. So the file_id must be correctly set in order for this
to work. Without it, samba3.base.delete fails in deltest20 when
we convert reply_open_and_X() to use filename_convert_dirfsp().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
nt_errstr(status));
goto fail;
}
+ /*
+ * We must correctly set fsp->file_id as code inside
+ * open.c will use this to check if delete_on_close
+ * has been set on the dirfsp.
+ */
+ fsp->file_id = vfs_file_id_from_sbuf(conn, &fsp->fsp_name->st);
result = cp_smb_filename(mem_ctx, fsp->fsp_name);
if (result == NULL) {