Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch for v14.2.2 #196

Open
wants to merge 4 commits into
base: origin-v14.2.2-1733931036
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/auth/cephx/CephxServiceHandler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,14 @@ int CephxServiceHandler::handle_request(
}
}
encode(cbl, *result_bl);
// provite all of the other tickets at the same time
// provide requested service tickets at the same time
vector<CephXSessionAuthInfo> info_vec;
for (uint32_t service_id = 1; service_id <= req.other_keys;
service_id <<= 1) {
if (req.other_keys & service_id) {
// skip CEPH_ENTITY_TYPE_AUTH: auth ticket is already encoded
// (possibly encrypted with the old session key)
if ((req.other_keys & service_id) &&
service_id != CEPH_ENTITY_TYPE_AUTH) {
ldout(cct, 10) << " adding key for service "
<< ceph_entity_type_name(service_id) << dendl;
CephXSessionAuthInfo svc_info;
Expand Down Expand Up @@ -243,7 +246,10 @@ int CephxServiceHandler::handle_request(
int service_err = 0;
for (uint32_t service_id = 1; service_id <= ticket_req.keys;
service_id <<= 1) {
if (ticket_req.keys & service_id) {
// skip CEPH_ENTITY_TYPE_AUTH: auth ticket must be obtained with
// CEPHX_GET_AUTH_SESSION_KEY
if ((ticket_req.keys & service_id) &&
service_id != CEPH_ENTITY_TYPE_AUTH) {
ldout(cct, 10) << " adding key for service "
<< ceph_entity_type_name(service_id) << dendl;
CephXSessionAuthInfo info;
Expand Down
19 changes: 18 additions & 1 deletion src/msg/async/ProtocolV1.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1905,7 +1905,8 @@ CtPtr ProtocolV1::handle_connect_message_2() {
// require signatures for cephx?
if (connect_msg.authorizer_protocol == CEPH_AUTH_CEPHX) {
if (connection->peer_type == CEPH_ENTITY_TYPE_OSD ||
connection->peer_type == CEPH_ENTITY_TYPE_MDS) {
connection->peer_type == CEPH_ENTITY_TYPE_MDS ||
connection->peer_type == CEPH_ENTITY_TYPE_MGR) {
if (cct->_conf->cephx_require_signatures ||
cct->_conf->cephx_cluster_require_signatures) {
ldout(cct, 10)
Expand All @@ -1914,6 +1915,14 @@ CtPtr ProtocolV1::handle_connect_message_2() {
<< dendl;
connection->policy.features_required |= CEPH_FEATURE_MSG_AUTH;
}
if (cct->_conf->cephx_require_version >= 2 ||
cct->_conf->cephx_cluster_require_version >= 2) {
ldout(cct, 10)
<< __func__
<< " using cephx, requiring cephx v2 feature bit for cluster"
<< dendl;
connection->policy.features_required |= CEPH_FEATUREMASK_CEPHX_V2;
}
} else {
if (cct->_conf->cephx_require_signatures ||
cct->_conf->cephx_service_require_signatures) {
Expand All @@ -1923,6 +1932,14 @@ CtPtr ProtocolV1::handle_connect_message_2() {
<< dendl;
connection->policy.features_required |= CEPH_FEATURE_MSG_AUTH;
}
if (cct->_conf->cephx_require_version >= 2 ||
cct->_conf->cephx_service_require_version >= 2) {
ldout(cct, 10)
<< __func__
<< " using cephx, requiring cephx v2 feature bit for service"
<< dendl;
connection->policy.features_required |= CEPH_FEATUREMASK_CEPHX_V2;
}
}
}

Expand Down
3 changes: 3 additions & 0 deletions src/rgw/rgw_rest_swift.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2545,6 +2545,9 @@ bool RGWSwiftWebsiteHandler::is_web_dir() const
return false;
} else if (subdir_name.back() == '/') {
subdir_name.pop_back();
if (subdir_name.empty()) {
return false;
}
}

rgw_obj obj(s->bucket, std::move(subdir_name));
Expand Down