]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
utils: Fixing CID 1509038 for time_t in DEBUG statement
authorRabinarayan Panigrahi <rapanigr@redhat.com>
Fri, 5 Sep 2025 04:32:55 +0000 (10:02 +0530)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 10 Sep 2025 10:38:24 +0000 (10:38 +0000)
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 <rapanigr@redhat.com>
Reviewed-by: Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Sep 10 10:38:24 UTC 2025 on atb-devel-224

source3/utils/net_rpc_sh_acct.c

index d1a0c5eb6f59deeeafaf1238d65d18abb15a72d9..dc2e56f5f9b5087ddfb4d1781b32847361a1aa2b 100644 (file)
@@ -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;
 }