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: v16.2.8~98^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c209bc321a5e65101e3640169f6eb5b51b112bd7;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 (cherry picked from commit cdb716252e4c2d1e437fb0eb132334d2e5ce277d) --- diff --git a/src/rgw/rgw_log.cc b/src/rgw/rgw_log.cc index 02d612bbf195..5876b1789bff 100644 --- a/src/rgw/rgw_log.cc +++ b/src/rgw/rgw_log.cc @@ -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);