From: Volker Lendecke Date: Fri, 23 Jan 2026 12:16:09 +0000 (+0100) Subject: smbd/smb1: send pathref fsp of share root to smbd_do_qfsinfo X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74469da0ddbec414cea6601a42fa662a63e80ed9;p=thirdparty%2Fsamba.git smbd/smb1: send pathref fsp of share root to smbd_do_qfsinfo The other caller of this already passes one. Signed-off-by: Volker Lendecke Reviewed-by: Anoop C S --- diff --git a/source3/smbd/smb1_trans2.c b/source3/smbd/smb1_trans2.c index 0c878d2ca2f..1e946ef19bc 100644 --- a/source3/smbd/smb1_trans2.c +++ b/source3/smbd/smb1_trans2.c @@ -1640,6 +1640,7 @@ static void call_trans2qfsinfo(connection_struct *conn, uint16_t info_level; int data_len = 0; size_t fixed_portion; + struct smb_filename *dot = NULL; NTSTATUS status; if (total_params < 2) { @@ -1661,14 +1662,31 @@ static void call_trans2qfsinfo(connection_struct *conn, DBG_NOTICE("level = %" PRIu16 "\n", info_level); - status = smbd_do_qfsinfo(req->xconn, conn, req, + status = openat_pathref_fsp_dot(req, + conn->cwd_fsp, + req->posix_pathnames + ? SMB_FILENAME_POSIX_PATH + : 0, + &dot); + if (!NT_STATUS_IS_OK(status)) { + reply_nterror(req, status); + return; + } + + status = smbd_do_qfsinfo(req->xconn, + conn, + req, info_level, req->flags2, max_data_bytes, &fixed_portion, + dot->fsp, NULL, - NULL, - ppdata, &data_len); + ppdata, + &data_len); + + TALLOC_FREE(dot); + if (!NT_STATUS_IS_OK(status)) { reply_nterror(req, status); return; diff --git a/source3/smbd/smb2_trans2.c b/source3/smbd/smb2_trans2.c index ae1da6d318c..b0bf72ac064 100644 --- a/source3/smbd/smb2_trans2.c +++ b/source3/smbd/smb2_trans2.c @@ -1963,9 +1963,6 @@ static bool fsinfo_unix_valid_level(connection_struct *conn, return false; } -/* - * fsp is only valid for SMB2. - */ NTSTATUS smbd_do_qfsinfo(struct smbXsrv_connection *xconn, connection_struct *conn, TALLOC_CTX *mem_ctx,