1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

smbd: Use "dirfsp" in smb_posix_unlink()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2023-07-04 17:21:32 +02:00 committed by Jeremy Allison
parent 4da367c31b
commit 3ee9fe28d4

View File

@ -3611,6 +3611,7 @@ static NTSTATUS smb_posix_unlink(connection_struct *conn,
struct smb_request *req,
const char *pdata,
int total_data,
struct files_struct *dirfsp,
struct smb_filename *smb_fname)
{
struct smb_posix_unlink_state state = {};
@ -3658,7 +3659,7 @@ static NTSTATUS smb_posix_unlink(connection_struct *conn,
status = SMB_VFS_CREATE_FILE(
conn, /* conn */
req, /* req */
NULL, /* dirfsp */
dirfsp, /* dirfsp */
smb_fname, /* fname */
DELETE_ACCESS, /* access_mask */
(FILE_SHARE_READ | FILE_SHARE_WRITE | /* share_access */
@ -4561,8 +4562,12 @@ static void call_trans2setpathinfo(
break;
case SMB_POSIX_PATH_UNLINK:
status = smb_posix_unlink(
conn, req, *ppdata, total_data, smb_fname);
status = smb_posix_unlink(conn,
req,
*ppdata,
total_data,
dirfsp,
smb_fname);
break;
case SMB_SET_FILE_UNIX_LINK: