From: Rabinarayan Panigrahi Date: Fri, 5 Sep 2025 04:32:55 +0000 (+0530) Subject: utils: Fixing CID 1509038 for time_t in DEBUG statement X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c694aa58b0131a7da7e2f7d18c82b847d2ca223a;p=thirdparty%2Fsamba.git utils: Fixing CID 1509038 for time_t in DEBUG statement Fix: typecast changing from (int)nt_time_to_unix_abs to (intmax_t)nt_time_to_unix_abs) 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 Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Wed Sep 10 10:38:24 UTC 2025 on atb-devel-224 --- diff --git a/source3/utils/net_rpc_sh_acct.c b/source3/utils/net_rpc_sh_acct.c index d1a0c5eb6f5..dc2e56f5f9b 100644 --- a/source3/utils/net_rpc_sh_acct.c +++ b/source3/utils/net_rpc_sh_acct.c @@ -386,8 +386,8 @@ static int account_set_maxpwage(struct net_context *c, } unix_to_nt_time_abs((NTTIME *)&i1->max_password_age, atoi(argv[0])); - d_printf(_("Setting maximum password age to %d seconds\n"), - (int)nt_time_to_unix_abs((NTTIME *)&i1->max_password_age)); + d_printf(_("Setting maximum password age to %jd seconds\n"), + (intmax_t)nt_time_to_unix_abs((NTTIME *)&i1->max_password_age)); return 1; }