From 485ade41b05a434b6b9c94bd05323caa67a6f3b3 Mon Sep 17 00:00:00 2001 From: Rabinarayan Panigrahi Date: Fri, 5 Sep 2025 09:45:20 +0530 Subject: [PATCH] utils: Fixing CID 1509034 for time_t in DEBUG statement Fix: typecast changing from (int)nt_time_to_unix_abs(&i12->lockout_window) to (intmax_t)nt_time_to_unix_abs(&i12->lockout_window) as intmax_t can hold epoch seconds after 2038 year Signed-off-by: Rabinarayan Panigrahi Reviewed-by: Signed-off-by: Martin Schwenke Reviewed-by: Andreas Schneider --- source3/utils/net_rpc_sh_acct.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/utils/net_rpc_sh_acct.c b/source3/utils/net_rpc_sh_acct.c index e14fd1823e2..d1a0c5eb6f5 100644 --- a/source3/utils/net_rpc_sh_acct.c +++ b/source3/utils/net_rpc_sh_acct.c @@ -325,8 +325,8 @@ static int account_set_resetduration(struct net_context *c, } unix_to_nt_time_abs(&i12->lockout_window, atoi(argv[0])); - d_printf(_("Setting bad password reset duration to %d seconds\n"), - (int)nt_time_to_unix_abs(&i12->lockout_window)); + d_printf(_("Setting bad password reset duration to %jd seconds\n"), + (intmax_t)nt_time_to_unix_abs(&i12->lockout_window)); return 12; } -- 2.47.3