]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/sts: add check for s->auth.identity pointer 43956/head
authorPritha Srivastava <prsrivas@redhat.com>
Mon, 6 Sep 2021 11:59:25 +0000 (17:29 +0530)
committerCory Snyder <csnyder@iland.com>
Fri, 7 Jan 2022 10:03:44 +0000 (05:03 -0500)
which can be null for some calls like
AssumeRoleWithWebIdentity in rgw_log.cc

Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
(cherry picked from commit cdb716252e4c2d1e437fb0eb132334d2e5ce277d)

src/rgw/rgw_log.cc

index 02d612bbf195f1c8881668b6ae81ab5e658c8d09..5876b1789bff22efa4c769810e7afc4bccd5521c 100644 (file)
@@ -585,7 +585,11 @@ int rgw_log_op(RGWREST* const rest, struct req_state *s, const string& op_name,
 
   entry.op = op_name;
 
-  entry.identity_type = s->auth.identity->get_identity_type();
+  if (s->auth.identity) {
+    entry.identity_type = s->auth.identity->get_identity_type();
+  } else {
+    entry.identity_type = TYPE_NONE;
+  }
 
   if (! s->token_claims.empty()) {
     entry.token_claims = std::move(s->token_claims);