From: Pritha Srivastava Date: Mon, 6 Sep 2021 11:59:25 +0000 (+0530) Subject: rgw/sts: add check for s->auth.identity pointer X-Git-Tag: v17.1.0~860^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F43071%2Fhead;p=ceph.git rgw/sts: add check for s->auth.identity pointer which can be null for some calls like AssumeRoleWithWebIdentity in rgw_log.cc Signed-off-by: Pritha Srivastava --- diff --git a/src/rgw/rgw_log.cc b/src/rgw/rgw_log.cc index 6226f2794030..da6eb1e6ad33 100644 --- a/src/rgw/rgw_log.cc +++ b/src/rgw/rgw_log.cc @@ -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);