]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: prevent crash in `radosgw-admin bucket object shard ...` 62884/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 18:18:32 +0000 (14:18 -0400)
commit456a5e661d1356f1cee87783179385996183f63d
tree501833213752e902a4ddda428d946acbfef7f0ac
parent532c8adb267ee565bcf3de0d3b19962777f158b3
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>
(cherry picked from commit a2b76b0e09ece61fd0978411d08d13257fe6ddbe)
src/rgw/driver/rados/rgw_tools.h
src/rgw/rgw_admin.cc
src/rgw/services/svc_bi_rados.h