From f523c76d1d192dd3fd9dfd77b0f71de4c15e0228 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Wed, 14 Jun 2023 08:42:00 -0400 Subject: [PATCH] rgw: s3 object lock avoids overflow in retention date Fixes: https://tracker.ceph.com/issues/56993 Signed-off-by: Casey Bodley (cherry picked from commit dd87a0ff845549ce94b740881c614c77c1857865) --- src/rgw/rgw_object_lock.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_object_lock.cc b/src/rgw/rgw_object_lock.cc index 0c57793fec952..17561793e3c04 100644 --- a/src/rgw/rgw_object_lock.cc +++ b/src/rgw/rgw_object_lock.cc @@ -58,7 +58,7 @@ ceph::real_time RGWObjectLock::get_lock_until_date(const ceph::real_time& mtime) if (!rule_exist) { return ceph::real_time(); } - int days = get_days(); + int64_t days = get_days(); if (days <= 0) { days = get_years()*365; } -- 2.39.5