From 2d6d890f45bf50f46b7d77e14b1bf4d8c4dcca73 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 4 Dec 2024 12:28:34 +0100 Subject: [PATCH] smbd: Pass "dirfsp" to get_posix_fsp() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The two places where get_posix_fsp() is called we do have the dirfsp around. Pass this through to SMB_VFS_CREATE_FILE(), looks much cleaner in strace. Signed-off-by: Volker Lendecke Reviewed-by: Pavel Filipenský --- source3/smbd/smb1_trans2.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source3/smbd/smb1_trans2.c b/source3/smbd/smb1_trans2.c index ec7ae083a4d..dff7bf521f3 100644 --- a/source3/smbd/smb1_trans2.c +++ b/source3/smbd/smb1_trans2.c @@ -2187,6 +2187,7 @@ static NTSTATUS smb_q_unix_info2( static NTSTATUS get_posix_fsp(connection_struct *conn, struct smb_request *req, + struct files_struct *dirfsp, struct smb_filename *smb_fname, uint32_t access_mask, files_struct **ret_fsp) @@ -2230,7 +2231,7 @@ static NTSTATUS get_posix_fsp(connection_struct *conn, status = SMB_VFS_CREATE_FILE( conn, /* conn */ req, /* req */ - NULL, /* dirfsp */ + dirfsp, /* dirfsp */ smb_fname, /* fname */ access_mask, /* access_mask */ FILE_SHARE_READ | FILE_SHARE_WRITE | @@ -2730,6 +2731,7 @@ static void call_trans2qpathinfo( status = get_posix_fsp(conn, req, + dirfsp, smb_fname, SEC_STD_READ_CONTROL | FILE_READ_ATTRIBUTES | @@ -4517,6 +4519,7 @@ static void call_trans2setpathinfo( status = get_posix_fsp(conn, req, + dirfsp, smb_fname, SEC_STD_WRITE_OWNER | SEC_STD_WRITE_DAC | -- 2.47.3