From: Joseph Sutton Date: Mon, 4 Dec 2023 03:24:15 +0000 (+1300) Subject: s4:dsdb: Use portable integer constant INT64_MAX X-Git-Tag: talloc-2.4.2~384 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9ebe4de113be0cde10f09148f0e06d34f4a30f9d;p=thirdparty%2Fsamba.git s4:dsdb: Use portable integer constant INT64_MAX Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c index 46b6126dcf0..7030d9c025a 100644 --- a/source4/dsdb/common/util.c +++ b/source4/dsdb/common/util.c @@ -465,7 +465,7 @@ NTTIME samdb_result_nttime(const struct ldb_message *msg, const char *attr, /* * Windows stores 0 for lastLogoff. * But when a MS DC return the lastLogoff (as Logoff Time) - * it returns 0x7FFFFFFFFFFFFFFF, not returning this value in this case + * it returns INT64_MAX, not returning this value in this case * cause windows 2008 and newer version to fail for SMB requests */ NTTIME samdb_result_last_logoff(const struct ldb_message *msg) @@ -473,17 +473,17 @@ NTTIME samdb_result_last_logoff(const struct ldb_message *msg) NTTIME ret = ldb_msg_find_attr_as_uint64(msg, "lastLogoff",0); if (ret == 0) - ret = 0x7FFFFFFFFFFFFFFFULL; + ret = INT64_MAX; return ret; } /* - * Windows uses both 0 and 9223372036854775807 (0x7FFFFFFFFFFFFFFFULL) to + * Windows uses both 0 and 9223372036854775807 (INT64_MAX) to * indicate an account doesn't expire. * * When Windows initially creates an account, it sets - * accountExpires = 9223372036854775807 (0x7FFFFFFFFFFFFFFF). However, + * accountExpires = 9223372036854775807 (INT64_MAX). However, * when changing from an account having a specific expiration date to * that account never expiring, it sets accountExpires = 0. * @@ -496,7 +496,7 @@ NTTIME samdb_result_account_expires(const struct ldb_message *msg) 0); if (ret == 0) - ret = 0x7FFFFFFFFFFFFFFFULL; + ret = INT64_MAX; return ret; }