From 3d8237a87011ff0ab680fc4c609d7455cf843a0f Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Tue, 17 Nov 2020 12:11:13 +0100 Subject: [PATCH] smbd: check for non FSA fsps in smb_file_rename_information() If the fsp is a non FSA fsp created by openat_pathref_fsp(), we can't pass it to rename_internals_fsp(). We have to go via rename_internals() which internally uses SMB_VFS_CREATE_FILE() to open an fsp which ensure we go through the lease checking code. Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- source3/smbd/trans2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 03398ab140c..497ae94b392 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -7456,7 +7456,7 @@ static NTSTATUS smb_file_rename_information(connection_struct *conn, } } - if (fsp) { + if (fsp != NULL && fsp->fsp_flags.is_fsa) { DEBUG(10,("smb_file_rename_information: " "SMB_FILE_RENAME_INFORMATION (%s) %s -> %s\n", fsp_fnum_dbg(fsp), fsp_str_dbg(fsp), -- 2.47.3