]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: s3 object lock avoids overflow in retention date
authorCasey Bodley <cbodley@redhat.com>
Wed, 14 Jun 2023 12:42:00 +0000 (08:42 -0400)
committerCasey Bodley <cbodley@redhat.com>
Mon, 24 Jul 2023 14:38:21 +0000 (10:38 -0400)
Fixes: https://tracker.ceph.com/issues/56993
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit dd87a0ff845549ce94b740881c614c77c1857865)

src/rgw/rgw_object_lock.cc

index 0c57793fec952fc3b07ef7bfef8f0182445d27fe..17561793e3c040f8fe2f19b2ee739ffcebaeb389 100644 (file)
@@ -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;
   }