libsmb: Remove unused cli_smb2_qfileinfo_basic()
authorVolker Lendecke <vl@samba.org>
Thu, 4 Jun 2020 13:29:48 +0000 (15:29 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 4 Jun 2020 18:36:17 +0000 (18:36 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Jun  4 18:36:17 UTC 2020 on sn-devel-184

source3/libsmb/cli_smb2_fnum.c
source3/libsmb/cli_smb2_fnum.h

index 8874a8f567f8c732ca882f340a5372ee0235bb5e..e5d6e6b7fbda0e01cbfe019e4c781ee5608f0c26 100644 (file)
@@ -2003,95 +2003,6 @@ NTSTATUS cli_smb2_qpathinfo_alt_name(struct cli_state *cli,
        return status;
 }
 
-
-/***************************************************************
- Wrapper that allows SMB2 to query a fnum info (basic level).
- Synchronous only.
-***************************************************************/
-
-NTSTATUS cli_smb2_qfileinfo_basic(struct cli_state *cli,
-                       uint16_t fnum,
-                       uint32_t *pattr,
-                       off_t *size,
-                       struct timespec *create_time,
-                       struct timespec *access_time,
-                       struct timespec *write_time,
-                       struct timespec *change_time,
-                       SMB_INO_T *ino)
-{
-       NTSTATUS status;
-       DATA_BLOB outbuf = data_blob_null;
-       TALLOC_CTX *frame = talloc_stackframe();
-
-       if (smbXcli_conn_has_async_calls(cli->conn)) {
-               /*
-                * Can't use sync call while an async call is in flight
-                */
-               status = NT_STATUS_INVALID_PARAMETER;
-               goto fail;
-       }
-
-       if (smbXcli_conn_protocol(cli->conn) < PROTOCOL_SMB2_02) {
-               status = NT_STATUS_INVALID_PARAMETER;
-               goto fail;
-       }
-
-       /* getinfo on the handle with info_type SMB2_GETINFO_FILE (1),
-          level 0x12 (SMB2_FILE_ALL_INFORMATION). */
-
-       status = cli_smb2_query_info_fnum(
-               cli,
-               fnum,
-               1, /* in_info_type */
-               (SMB_FILE_ALL_INFORMATION - 1000), /* in_file_info_class */
-               0xFFFF, /* in_max_output_length */
-               NULL, /* in_input_buffer */
-               0, /* in_additional_info */
-               0, /* in_flags */
-               frame,
-               &outbuf);
-       if (!NT_STATUS_IS_OK(status)) {
-               goto fail;
-       }
-
-       /* Parse the reply. */
-       if (outbuf.length < 0x60) {
-               status = NT_STATUS_INVALID_NETWORK_RESPONSE;
-               goto fail;
-       }
-
-       if (create_time) {
-               *create_time = interpret_long_date((const char *)outbuf.data + 0x0);
-       }
-       if (access_time) {
-               *access_time = interpret_long_date((const char *)outbuf.data + 0x8);
-       }
-       if (write_time) {
-               *write_time = interpret_long_date((const char *)outbuf.data + 0x10);
-       }
-       if (change_time) {
-               *change_time = interpret_long_date((const char *)outbuf.data + 0x18);
-       }
-       if (pattr) {
-               *pattr = IVAL(outbuf.data, 0x20);
-       }
-       if (size) {
-               uint64_t file_size = BVAL(outbuf.data, 0x30);
-               *size = (off_t)file_size;
-       }
-       if (ino) {
-               uint64_t file_index = BVAL(outbuf.data, 0x40);
-               *ino = (SMB_INO_T)file_index;
-       }
-
-  fail:
-
-       cli->raw_status = status;
-
-       TALLOC_FREE(frame);
-       return status;
-}
-
 /***************************************************************
  Wrapper that allows SMB2 to get pathname attributes.
  Synchronous only.
index 6613ddc0078905a6f91d546db142b87086ab5e4a..06f939d6dbf3629ccf38c15393421e18df0cbf8d 100644 (file)
@@ -155,15 +155,6 @@ NTSTATUS cli_smb2_query_info_fnum(
        uint32_t in_flags,
        TALLOC_CTX *mem_ctx,
        DATA_BLOB *outbuf);
-NTSTATUS cli_smb2_qfileinfo_basic(struct cli_state *cli,
-                       uint16_t fnum,
-                       uint32_t *pattr,
-                       off_t *size,
-                       struct timespec *create_time,
-                       struct timespec *access_time,
-                       struct timespec *write_time,
-                       struct timespec *change_time,
-                       SMB_INO_T *ino);
 NTSTATUS cli_smb2_getatr(struct cli_state *cli,
                        const char *name,
                        uint32_t *pattr,