unlang = cf_section_find(request->server_cs, "authenticate", auth_type);
talloc_free(auth_type);
if (!unlang) {
- REDEBUG("Failed to find 'recv %s' section", auth_type);
+ REDEBUG("Failed to find 'recv %pV' section", &vp->data);
request->reply->code = FR_CODE_ACCESS_REJECT;
goto done;
}
vp = fr_cursor_next(&cursor)) {
fr_dict_vendor_t const *vendor;
FR_NAME_NUMBER const *type;
- char *value;
- value = fr_pair_value_asprint(vp, vp, '\'');
if (vp->da->flags.has_tag) {
- RIDEBUG2("&%s:%s:%i %s %s",
+ RIDEBUG2("&%s:%s:%i %s %pV",
fr_int2str(pair_lists, vpt->tmpl_list, "<INVALID>"),
vp->da->name,
vp->tag,
fr_int2str(fr_tokens_table, vp->op, "<INVALID>"),
- value);
+ &vp->data);
} else {
- RIDEBUG2("&%s:%s %s %s",
+ RIDEBUG2("&%s:%s %s %pV",
fr_int2str(pair_lists, vpt->tmpl_list, "<INVALID>"),
vp->da->name,
fr_int2str(fr_tokens_table, vp->op, "<INVALID>"),
- value);
+ &vp->data);
}
- talloc_free(value);
if (!RDEBUG_ENABLED3) continue;
break;
}
- dst = talloc_zero(vp, fr_value_box_t);
+ dst = fr_value_box_alloc_null(vp);
/* We expect some to fail */
if (fr_value_box_cast(dst, dst, type->number, NULL, &vp->data) < 0) {
goto next_type;
}
- value = fr_value_box_asprint(dst, dst, '\'');
- if (!value) goto next_type;
-
- if ((pad = (11 - strlen(type->name))) < 0) {
- pad = 0;
- }
+ if ((pad = (11 - strlen(type->name))) < 0) pad = 0;
RINDENT();
- RDEBUG2("as %s%*s: %s", type->name, pad, " ", value);
+ RDEBUG2("as %s%*s: %pV", type->name, pad, " ", dst);
REXDENT();
next_type:
return RLM_MODULE_REJECT;
}
- RDEBUG("CHAP user \"%s\" authenticated successfully", request->username->vp_strvalue);
+ RDEBUG("CHAP user \"%pV\" authenticated successfully", &request->username->data);
return RLM_MODULE_OK;
}
* We check for "MD5-sess" and "MD5".
* Anything else is an error.
*/
- REDEBUG("Unknown Digest-Algorithm \"%s\": Cannot perform Digest authentication", vp->vp_strvalue);
+ REDEBUG("%pP - Unknown Digest-Algorithm: Cannot perform Digest authentication", vp);
return RLM_MODULE_INVALID;
}
a2_len += body->vp_length;
} else if (strcasecmp(qop->vp_strvalue, "auth") != 0) {
- REDEBUG("Unknown Digest-QOP \"%s\": Cannot perform Digest authentication", qop->vp_strvalue);
+ REDEBUG("%pP - Unknown value: Cannot perform Digest authentication", qop);
return RLM_MODULE_INVALID;
}
}
int ret;
eap_tunnel_data_t *tunnel;
- RDEBUG("Tunneled authentication will be proxied to %s", vp->vp_strvalue);
+ RDEBUG("Tunneled authentication will be proxied to %pV", &vp->data);
/*
* Tell the original request that it's going to be proxied.
fr_pair_value_bstrncpy(t->username, data + 1, data_len - 1);
- RDEBUG("Got inner identity '%s'", t->username->vp_strvalue);
+ RDEBUG("Got inner identity \"%pV\"", &t->username->data);
if (t->soh) {
t->status = PEAP_STATUS_WAIT_FOR_SOH_RESPONSE;
RDEBUG2("Requesting SoH from client");
fr_pair_value_bstrncpy(t->username, vp->vp_octets + 5, vp->vp_length - 5);
- RDEBUG("Got tunneled identity of %s", t->username->vp_strvalue);
+ RDEBUG("Got tunneled identity of %pV", &t->username->data);
} else {
/*
* Don't reject the request outright,
int ret;
eap_tunnel_data_t *tunnel;
- RDEBUG("Tunneled authentication will be proxied to %s", vp->vp_strvalue);
+ RDEBUG("Tunneled authentication will be proxied to %pV", &vp->data);
/*
* Tell the original request that it's going
for (vp = fr_pair_cursor_first(&groups_cursor);
vp;
vp = fr_pair_cursor_next(&groups_cursor)) {
- RDEBUG("&control:%s += \"%s\"", inst->cache_da->name, vp->vp_strvalue);
+ RDEBUG("&control:%s += \"%pV\"", inst->cache_da->name, &vp->data);
}
}
fr_pair_value_strcpy(vp, *dn_p);
fr_pair_cursor_append(&list_cursor, vp);
- RDEBUG("&control:%s += \"%s\"", inst->cache_da->name, vp->vp_strvalue);
+ RDEBUG("&control:%s += \"%pV\"", inst->cache_da->name, &vp->data);
ldap_memfree(*dn_p);
}
REXDENT();
rad_assert(inst->groupobj_base_dn);
- RDEBUG("Searching for user in group \"%s\"", check->vp_strvalue);
+ RDEBUG("Searching for user in group \"%pV\"", &check->data);
if (check->vp_length == 0) {
REDEBUG("Cannot do comparison (group name is empty)");
if (conn) mod_conn_release(inst, request, conn);
if (!found) {
- RDEBUG("User is not a member of \"%s\"", check->vp_strvalue);
+ RDEBUG("User is not a member of \"%pV\"", &check->data);
return 1;
}
}
}
- RDEBUG("Login attempt by \"%s\"", request->username->vp_strvalue);
+ RDEBUG("Login attempt by \"%pV\"", &request->username->data);
/*
* Get the DN by doing a search.
}
if (ret != RLM_MODULE_OK) {
- RDEBUG("[%s]: Invalid password", request->username->vp_strvalue);
+ RDEBUG("Invalid password: %pV", &request->username->data);
return ret;
}
talloc_free(head);
fr_pool_connection_release(inst->pool, request, handle);
- RDEBUG("sql_groupcmp finished: User is NOT a member of group %s", check->vp_strvalue);
+ RDEBUG("sql_groupcmp finished: User is NOT a member of group %pV", &check->data);
return 1;
}
}
#ifndef NDEBUG
- if (DEBUG_ENABLED2) {
- char buffer[1024];
-
- fr_pair_value_snprint(buffer, sizeof(buffer), vp, '"');
- RDEBUG2("");
- RDEBUG2("# looping with: Foreach-Variable-%d = %s", foreach->depth, buffer);
- }
+ RDEBUG2("");
+ RDEBUG2("# looping with: Foreach-Variable-%d = %pV", foreach->depth, &vp->data);
#endif
rad_assert(vp);