From: Volker Lendecke Date: Mon, 24 Feb 2020 11:41:13 +0000 (-0800) Subject: libsmb: Introduce fetch_file_unix_basic_info2() X-Git-Url: http://git.samba.org/samba.git/?a=commitdiff_plain;h=128545ba4f25e493736bf8f816f7d7490bd68fcb;p=bbaumbach%2Fsamba-autobuild%2F.git libsmb: Introduce fetch_file_unix_basic_info2() Will be used in clilist.c for SMB_FIND_FILE_UNIX_INFO2 Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c index 7f98e160bbe..164be11386c 100644 --- a/source3/libsmb/clifile.c +++ b/source3/libsmb/clifile.c @@ -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). ****************************************************************************/ diff --git a/source3/libsmb/proto.h b/source3/libsmb/proto.h index e44dad13200..07c22a696fe 100644 --- a/source3/libsmb/proto.h +++ b/source3/libsmb/proto.h @@ -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,