Merge pull request #16888 from gmayyyha/osd-ms-verify-auth

osd/OSD.cc: add 'isvalid=false' when failed to parse caps

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
Reviewed-by: Jos Collin <jcollin@redhat.com>
This commit is contained in:
Jos Collin 2017-08-10 01:16:54 +00:00 committed by GitHub
commit 4192435f41

View File

@ -7057,12 +7057,15 @@ bool OSD::ms_verify_authorizer(Connection *con, int peer_type,
::decode(str, p);
}
catch (buffer::error& e) {
isvalid = false;
}
bool success = s->caps.parse(str);
if (success)
dout(10) << " session " << s << " " << s->entity_name << " has caps " << s->caps << " '" << str << "'" << dendl;
else
else {
dout(10) << " session " << s << " " << s->entity_name << " failed to parse caps '" << str << "'" << dendl;
isvalid = false;
}
}
s->put();