From 2a82caf57ed10e8c838c157314248a124848c571 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Tue, 3 Dec 2019 18:36:38 +0100 Subject: [PATCH] smbclient: use full_timespec_to_nt_time() Needed to support dates corresponding to (time_t)0 and (time_t)-1. BUG: https://bugzilla.samba.org/show_bug.cgi?id=7771 Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- selftest/knownfail.d/samba3.blackbox | 2 -- source3/client/client.c | 8 ++++---- 2 files changed, 4 insertions(+), 6 deletions(-) delete mode 100644 selftest/knownfail.d/samba3.blackbox diff --git a/selftest/knownfail.d/samba3.blackbox b/selftest/knownfail.d/samba3.blackbox deleted file mode 100644 index 7777ed6da75..00000000000 --- a/selftest/knownfail.d/samba3.blackbox +++ /dev/null @@ -1,2 +0,0 @@ -^samba3.blackbox.timestamps.time=0\(fileserver\) -^samba3.blackbox.timestamps.time=-1\(fileserver\) diff --git a/source3/client/client.c b/source3/client/client.c index e1de711c8e4..ccbfba0b53f 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -1812,16 +1812,16 @@ static int do_allinfo(const char *name) return false; } - tmp = unix_timespec_to_nt_time(b_time); + tmp = full_timespec_to_nt_time(&b_time); d_printf("create_time: %s\n", nt_time_string(talloc_tos(), tmp)); - tmp = unix_timespec_to_nt_time(a_time); + tmp = full_timespec_to_nt_time(&a_time); d_printf("access_time: %s\n", nt_time_string(talloc_tos(), tmp)); - tmp = unix_timespec_to_nt_time(m_time); + tmp = full_timespec_to_nt_time(&m_time); d_printf("write_time: %s\n", nt_time_string(talloc_tos(), tmp)); - tmp = unix_timespec_to_nt_time(c_time); + tmp = full_timespec_to_nt_time(&c_time); d_printf("change_time: %s\n", nt_time_string(talloc_tos(), tmp)); d_printf("attributes: %s (%x)\n", attr_str(talloc_tos(), mode), mode);