From: Bjoern Jacke Date: Mon, 8 Jan 2024 15:04:12 +0000 (+0000) Subject: system.c: fix fake directory create times X-Git-Tag: samba-4.18.10~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=161efeac21dd2d4f36d72b50c25f1e4b434c15a7;p=thirdparty%2Fsamba.git system.c: fix fake directory create times This was broken by c9c3d4312d7281904fc back in 2009 already. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12421 Signed-off-by: Bjoern Jacke Reviewed-by: Volker Lendecke (cherry picked from commit 56c3dbc2ff8531772bf79eb9da3497767a20ce6f) --- diff --git a/source3/lib/system.c b/source3/lib/system.c index 16fe3839446..5874afadd3c 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -186,6 +186,7 @@ static void make_create_timespec(const struct stat *pst, struct stat_ex *dst, if (S_ISDIR(pst->st_mode) && fake_dir_create_times) { dst->st_ex_btime.tv_sec = 315493200L; /* 1/1/1980 */ dst->st_ex_btime.tv_nsec = 0; + return; } dst->st_ex_iflags &= ~ST_EX_IFLAG_CALCULATED_BTIME;