]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libsmb: Use the direct FSCC_FILE_ALL_INFORMATION define
authorVolker Lendecke <vl@samba.org>
Wed, 8 May 2024 14:05:40 +0000 (16:05 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 14 May 2024 22:29:36 +0000 (22:29 +0000)
(SMB_FILE_ALL_INFORMATION - 1000) looks a bit silly if you look at the
definition of SMB_FILE_ALL_INFORMATION...

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/torture/test_smb2.c

index 3b2e1e4811d0a014b0d292bb0af2723e42a34c5f..29d2b65f2a4fed339a9cf4304e9fcf88f0def7aa 100644 (file)
@@ -3951,20 +3951,21 @@ static NTSTATUS get_smb2_inode(struct cli_state *cli,
        /*
         * Get the inode.
         */
-       status = smb2cli_query_info(cli->conn,
-                                   cli->timeout,
-                                   cli->smb2.session,
-                                   cli->smb2.tcon,
-                                   SMB2_0_INFO_FILE,
-                                   (SMB_FILE_ALL_INFORMATION - 1000), /* in_file_info_class */
-                                   1024, /* in_max_output_length */
-                                   NULL, /* in_input_buffer */
-                                   0, /* in_additional_info */
-                                   0, /* in_flags */
-                                   fid_persistent,
-                                   fid_volatile,
-                                   talloc_tos(),
-                                   &outbuf);
+       status = smb2cli_query_info(
+               cli->conn,
+               cli->timeout,
+               cli->smb2.session,
+               cli->smb2.tcon,
+               SMB2_0_INFO_FILE,
+               FSCC_FILE_ALL_INFORMATION, /* in_file_info_class */
+               1024,                      /* in_max_output_length */
+               NULL,                      /* in_input_buffer */
+               0,                         /* in_additional_info */
+               0,                         /* in_flags */
+               fid_persistent,
+               fid_volatile,
+               talloc_tos(),
+               &outbuf);
 
        if (NT_STATUS_IS_OK(status)) {
                *ino_ret = PULL_LE_U64(outbuf.data, 0x40);