]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/sts: add check for s->auth.identity pointer 43071/head
authorPritha Srivastava <prsrivas@redhat.com>
Mon, 6 Sep 2021 11:59:25 +0000 (17:29 +0530)
committerPritha Srivastava <prsrivas@redhat.com>
Tue, 14 Sep 2021 06:10:29 +0000 (11:40 +0530)
which can be null for some calls like
AssumeRoleWithWebIdentity in rgw_log.cc

Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
src/rgw/rgw_log.cc

index 6226f279403083e0a98717375ae1a72b4c06d9d5..da6eb1e6ad337a9471e25406bea21b29391d3b85 100644 (file)
@@ -435,7 +435,11 @@ int rgw_log_op(rgw::sal::Store* store, RGWREST* const rest, struct req_state *s,
 
   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);