Skip to content

Commit

Permalink
Add auth av-list to passive rail
Browse files Browse the repository at this point in the history
The auth av list (-A) was not being passed to the passive side
rail. This would break secret-word and multi-domain munge
configuration.
  • Loading branch information
tom95858 committed Jul 7, 2023
1 parent 636a1c6 commit e6447b1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ldms/src/core/ldms_rail.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ ldms_t ldms_xprt_rail_new(const char *xprt_name,
rbt_init(&r->eps[i].sbuf_rbt, __stream_buf_cmp);
}

r->eps[0].ep = __ldms_xprt_new_with_auth(r->name, r->auth_name, auth_av_list);
r->eps[0].ep = __ldms_xprt_new_with_auth(r->name, r->auth_name, r->auth_av_list);
if (!r->eps[0].ep)
goto err_1;
ldms_xprt_ctxt_set(r->eps[0].ep, &r->eps[0], NULL);
Expand Down Expand Up @@ -566,13 +566,15 @@ void __rail_zap_handle_conn_req(zap_ep_t zep, zap_event_t ev)
if (!rbn) {
const char *xprt_name;
const char *auth_name;
struct attr_value_list *auth_av_list = NULL;
int64_t recv_limit;
int32_t rate_limit;
ldms_event_cb_t cb;
void *cb_arg;
if (lr) {
xprt_name = lr->name;
auth_name = lr->auth_name;
auth_av_list = lr->auth_av_list;
recv_limit = lr->recv_limit;
rate_limit = lr->rate_limit;
cb = lr->event_cb;
Expand All @@ -586,7 +588,7 @@ void __rail_zap_handle_conn_req(zap_ep_t zep, zap_event_t ev)
cb_arg = lx->event_cb_arg;
}
r = (void*)ldms_xprt_rail_new(xprt_name, m->n_eps,
recv_limit, rate_limit, auth_name, NULL);
recv_limit, rate_limit, auth_name, auth_av_list);
if (!r) {
snprintf(rej_msg, sizeof(rej_msg), "passive rail create error: %d", errno);
pthread_mutex_unlock(&__rail_mutex);
Expand Down

0 comments on commit e6447b1

Please sign in to comment.