From 194866ee07750473bf85b0e678eab1cc9a010543 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 5c0119befaa1..83156cd7863c 100644 --- a/src/rgw/rgw_object_lock.cc +++ b/src/rgw/rgw_object_lock.cc @@ -56,7 +56,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.47.3