libsmb: Remove unused cli_setpathinfo_basic()
authorVolker Lendecke <vl@samba.org>
Thu, 26 Mar 2020 13:46:32 +0000 (14:46 +0100)
committerRalph Boehme <slow@samba.org>
Wed, 8 Apr 2020 14:46:40 +0000 (14:46 +0000)
We got beyond 1-sec timestamp resolution a while ago...

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/libsmb/clirap.c
source3/libsmb/clirap.h

index d0cdaef716d167ba1976e347b2d8022aa19ab175..9a062c56453d7320df41c3531f0da9ae0424f3b1 100644 (file)
@@ -727,74 +727,6 @@ NTSTATUS cli_qpathinfo1(struct cli_state *cli,
        return status;
 }
 
-/****************************************************************************
- Send a setpathinfo call.
-****************************************************************************/
-
-NTSTATUS cli_setpathinfo_basic(struct cli_state *cli, const char *fname,
-                              time_t create_time,
-                              time_t access_time,
-                              time_t write_time,
-                              time_t change_time,
-                              uint16_t mode)
-{
-       unsigned int data_len = 0;
-       char data[40];
-       char *p;
-
-        p = data;
-
-        /*
-         * Add the create, last access, modification, and status change times
-         */
-        put_long_date(p, create_time);
-        p += 8;
-
-        put_long_date(p, access_time);
-        p += 8;
-
-        put_long_date(p, write_time);
-        p += 8;
-
-        put_long_date(p, change_time);
-        p += 8;
-
-       if (mode == (uint16_t)-1 || mode == FILE_ATTRIBUTE_NORMAL) {
-               /* No change. */
-               mode = 0;
-       } else if (mode == 0) {
-               /* Clear all existing attributes. */
-               mode = FILE_ATTRIBUTE_NORMAL;
-       }
-
-       /* Add attributes */
-       SIVAL(p, 0, mode);
-
-        p += 4;
-
-        /* Add padding */
-        SIVAL(p, 0, 0);
-        p += 4;
-
-        data_len = PTR_DIFF(p, data);
-
-       if (smbXcli_conn_protocol(cli->conn) >= PROTOCOL_SMB2_02) {
-               DATA_BLOB in_data = data_blob_const(data, data_len);
-               /*
-                * Split out SMB2 here as we need to select
-                * the correct info type and level.
-                */
-               return cli_smb2_setpathinfo(cli,
-                               fname,
-                               1, /* SMB2_SETINFO_FILE */
-                               SMB_FILE_BASIC_INFORMATION - 1000,
-                               &in_data);
-       }
-
-       return cli_setpathinfo(cli, SMB_FILE_BASIC_INFORMATION, fname,
-                              (uint8_t *)data, data_len);
-}
-
 NTSTATUS cli_setpathinfo_ext(struct cli_state *cli, const char *fname,
                             struct timespec create_time,
                             struct timespec access_time,
index 97150f65ee36386eefe2665ddd39252cd7949d76..c237fb1c4c324a3f4940268813b73a039c792134 100644 (file)
@@ -58,12 +58,6 @@ NTSTATUS cli_qpathinfo1(struct cli_state *cli,
                        time_t *write_time,
                        off_t *size,
                        uint16_t *mode);
-NTSTATUS cli_setpathinfo_basic(struct cli_state *cli, const char *fname,
-                              time_t create_time,
-                              time_t access_time,
-                              time_t write_time,
-                              time_t change_time,
-                              uint16_t mode);
 NTSTATUS cli_setpathinfo_ext(struct cli_state *cli, const char *fname,
                             struct timespec create_time,
                             struct timespec access_time,