]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw: prevent crash in `radosgw-admin bucket object shard ...` 62850/head
authorJ. Eric Ivancich <ivancich@redhat.com>
Wed, 16 Apr 2025 16:38:33 +0000 (12:38 -0400)
committerJ. Eric Ivancich <ivancich@redhat.com>
Fri, 18 Apr 2025 13:25:35 +0000 (09:25 -0400)
commita2b76b0e09ece61fd0978411d08d13257fe6ddbe
tree765547ee46d5e7a97aaec82bf25b890d7063e8dd
parent4448e6a2b94a39a2c565d814c434b5ec3aade3a2
rgw: prevent crash in `radosgw-admin bucket object shard ...`

This subcommand is used to ask radosgw-admin which bucket index shard
a given object in a given bucket would have its bucket index entry
on. The user is required to supply the number of shards (i.e., the
command doesn't look that up). If 0 is provided it would result in a
divide by zero runtime exception. Values less than or equal to zero
are now protected.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
src/rgw/driver/rados/rgw_tools.h
src/rgw/radosgw-admin/radosgw-admin.cc
src/rgw/services/svc_bi_rados.h