rgw/sts: replacing load_stats with list_buckets
to correctly create a federated user in oidc namespace.
The idea was to check if the federated user had any buckets
associated with it from the time when the logic for creating
a shadow user was not in place, and this was done by calling
read_stats which returned -ENOENT when the user did not exist,
which was erroneously interpreted as buckets not existing for
the user - but this logic correctly led to creation of user
in oidc namespace. Later read_stats() was replaced by load_stats()
and load_stats() does not return -ENOENT when a user does
not exist, hence according to the code, the federated user
was not getting created in 'oidc' namespace. Hence replaced load_stats()
with list_buckets() and corrected the code to create a user
in oidc namespace if the user did not own any bucket.
Fixes: https://tracker.ceph.com/issues/69924
Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
(cherry picked from commit
c834352cc70682d867a225c78af4083e94158b7e)
Conflicts:
src/rgw/rgw_auth.cc
- load_acct_info in squid returns void