libsmb: Introduce fetch_file_unix_basic_info2()
authorVolker Lendecke <vl@samba.org>
Mon, 24 Feb 2020 11:41:13 +0000 (03:41 -0800)
committerJeremy Allison <jra@samba.org>
Tue, 3 Mar 2020 17:48:37 +0000 (17:48 +0000)
Will be used in clilist.c for SMB_FIND_FILE_UNIX_INFO2

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/libsmb/clifile.c
source3/libsmb/proto.h

index 7f98e160bbe13717949d7b938ca1dad9d37195e5..164be11386c4583a0bc79debd04ff2ea3d016df0 100644 (file)
@@ -782,6 +782,13 @@ static void fetch_file_unix_basic_info(
        sbuf->st_ex_nlink = BIG_UINT(data, 92);
 }
 
+void fetch_file_unix_basic_info2(
+       const uint8_t data[116], SMB_STRUCT_STAT *sbuf)
+{
+       fetch_file_unix_basic_info(data, sbuf);
+       sbuf->st_ex_btime = interpret_long_date((const char *)(data + 100));
+}
+
 /****************************************************************************
  Stat a file (UNIX extensions).
 ****************************************************************************/
index e44dad13200a58ae3f55476757f5873dfefcf656..07c22a696fea6dcbb25f613c531a2f930486e911 100644 (file)
@@ -283,6 +283,8 @@ NTSTATUS cli_posix_hardlink(struct cli_state *cli,
                        const char *newname);
 uint32_t unix_perms_to_wire(mode_t perms);
 mode_t wire_perms_to_unix(uint32_t perms);
+void fetch_file_unix_basic_info2(
+       const uint8_t data[116], SMB_STRUCT_STAT *sbuf);
 struct tevent_req *cli_posix_getacl_send(TALLOC_CTX *mem_ctx,
                                        struct tevent_context *ev,
                                        struct cli_state *cli,