]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd/smb1: send pathref fsp of share root to smbd_do_qfsinfo
authorVolker Lendecke <vl@samba.org>
Fri, 23 Jan 2026 12:16:09 +0000 (13:16 +0100)
committerAnoop C S <anoopcs@samba.org>
Sun, 15 Feb 2026 10:42:33 +0000 (10:42 +0000)
The other caller of this already passes one.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
source3/smbd/smb1_trans2.c
source3/smbd/smb2_trans2.c

index 0c878d2ca2f488fd388408b4e93677164d62d960..1e946ef19bc46ed07090e927189fbc106fe69d83 100644 (file)
@@ -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;
index ae1da6d318ce03970c65eabd66da01734e0be2a5..b0bf72ac064a054b28709ea22d85061414d7c866 100644 (file)
@@ -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,