*/
if (*group_ctx->dn) {
if (unlang_function_repeat_set(request, ldap_cacheable_userobj_resolve) < 0) RETURN_UNLANG_FAIL;
- if (unlang_function_push(p_result, request,
+ if (unlang_function_push(/* both start and resume provide an rcode */p_result, request,
ldap_group_dn2name_start,
ldap_group_dn2name_resume,
ldap_group_userobj_cancel, ~FR_SIGNAL_CANCEL,
*/
if (*group_ctx->group_name) {
if (unlang_function_repeat_set(request, ldap_cacheable_userobj_resolve) < 0) RETURN_UNLANG_FAIL;
- if (unlang_function_push(p_result, request,
+ if (unlang_function_push(/* both start and resume provide an rcode */p_result, request,
ldap_group_name2dn_start,
ldap_group_name2dn_resume,
ldap_group_userobj_cancel, ~FR_SIGNAL_CANCEL,
*/
if ((name_p != group_ctx->group_name) || (dn_p != group_ctx->group_dn)) {
group_ctx->attrs[0] = inst->group.obj_name_attr;
- if (unlang_function_push(NULL, request,
+ if (unlang_function_push(p_result, request,
ldap_cacheable_userobj_resolve,
NULL,
- ldap_group_userobj_cancel, ~FR_SIGNAL_CANCEL, UNLANG_SUB_FRAME, group_ctx) < 0) {
+ ldap_group_userobj_cancel,
+ ~FR_SIGNAL_CANCEL, UNLANG_SUB_FRAME,
+ group_ctx) < 0) {
talloc_free(group_ctx);
RETURN_UNLANG_FAIL;
}
group_ctx->base_dn = &autz_ctx->call_env->group_base;
fr_value_box_list_init(&group_ctx->expanded_filter);
- if (unlang_function_push(NULL, request, ldap_cacheable_groupobj_start, ldap_cacheable_groupobj_resume,
- ldap_group_groupobj_cancel, ~FR_SIGNAL_CANCEL, UNLANG_SUB_FRAME, group_ctx) < 0) {
+ if (unlang_function_push(p_result,
+ request,
+ ldap_cacheable_groupobj_start,
+ ldap_cacheable_groupobj_resume,
+ ldap_group_groupobj_cancel, ~FR_SIGNAL_CANCEL,
+ UNLANG_SUB_FRAME,
+ group_ctx) < 0) {
error:
talloc_free(group_ctx);
RETURN_UNLANG_FAIL;
group_ctx->base_dn = &xlat_ctx->env_data->group_base;
}
- if (unlang_function_push(NULL, request, ldap_cacheable_groupobj_start, ldap_check_groupobj_resume,
+ if (unlang_function_push(p_result,
+ request,
+ ldap_cacheable_groupobj_start,
+ ldap_check_groupobj_resume,
ldap_group_groupobj_cancel, ~FR_SIGNAL_CANCEL,
- UNLANG_SUB_FRAME, group_ctx) < 0) {
+ UNLANG_SUB_FRAME,
+ group_ctx) < 0) {
error:
talloc_free(group_ctx);
RETURN_UNLANG_FAIL;
request_t *request, void *uctx)
{
ldap_group_userobj_dyn_ctx_t *group_ctx = talloc_get_type_abort(uctx, ldap_group_userobj_dyn_ctx_t);
- ldap_group_xlat_ctx_t *xlat_ctx = talloc_get_type_abort(group_ctx->xlat_ctx, ldap_group_xlat_ctx_t);
+ ldap_group_xlat_ctx_t *xlat_ctx = talloc_get_type_abort(group_ctx->xlat_ctx, ldap_group_xlat_ctx_t);
rlm_ldap_t const *inst = xlat_ctx->inst;
fr_ldap_query_t *query = xlat_ctx->query;
LDAPMessage *entry;
if (unlang_function_repeat_set(request, ldap_check_userobj_resume) < 0) RETURN_UNLANG_FAIL;
- return unlang_function_push(NULL, request, ldap_dn2name_start, NULL, ldap_dn2name_cancel,
- ~FR_SIGNAL_CANCEL, UNLANG_SUB_FRAME, group_ctx);
+ return unlang_function_push(/* discard, ldap_check_userobj_resume looks at the query result */ NULL,
+ request,
+ ldap_dn2name_start,
+ NULL,
+ ldap_dn2name_cancel, ~FR_SIGNAL_CANCEL,
+ UNLANG_SUB_FRAME, group_ctx);
}
if (((talloc_array_length(group_ctx->group_name) - 1) == value->bv_len) &&
if (unlang_function_repeat_set(request, ldap_check_userobj_resume) < 0) RETURN_UNLANG_FAIL;
- return unlang_function_push(NULL, request, ldap_dn2name_start, NULL, ldap_dn2name_cancel,
- ~FR_SIGNAL_CANCEL, UNLANG_SUB_FRAME, group_ctx);
+ return unlang_function_push(/* discard, ldap_check_userobj_resume gets result from group_ctx */ NULL,
+ request,
+ ldap_dn2name_start,
+ NULL,
+ ldap_dn2name_cancel, ~FR_SIGNAL_CANCEL,
+ UNLANG_SUB_FRAME, group_ctx);
}
fr_assert(0);
* can be checked.
* If not then a query is needed to retrieve the user object.
*/
- if (unlang_function_push(NULL, request, xlat_ctx->query ? NULL : ldap_check_userobj_start, ldap_check_userobj_resume,
- ldap_group_userobj_cancel, ~FR_SIGNAL_CANCEL, UNLANG_SUB_FRAME, group_ctx) < 0) {
+ if (unlang_function_push(/* ldap_check_userobj_resume provides an rcode result */p_result,
+ request,
+ xlat_ctx->query ? NULL : ldap_check_userobj_start,
+ ldap_check_userobj_resume,
+ ldap_group_userobj_cancel, ~FR_SIGNAL_CANCEL,
+ UNLANG_SUB_FRAME, group_ctx) < 0) {
talloc_free(group_ctx);
RETURN_UNLANG_FAIL;
}