*/
new_nt_enc_len = 0;
for (seq = 1; seq < 4; seq++) {
- vp_cursor_t cursor;
+ fr_cursor_t cursor;
int found = 0;
- for (nt_enc = fr_pair_cursor_init(&cursor, &request->packet->vps);
+ for (nt_enc = fr_cursor_init(&cursor, &request->packet->vps);
nt_enc;
- nt_enc = fr_pair_cursor_next(&cursor)) {
+ nt_enc = fr_cursor_next(&cursor)) {
if (nt_enc->da->vendor != VENDORPEC_MICROSOFT)
continue;
bool auth_type = false;
bool found_pw = false;
VALUE_PAIR *vp;
- vp_cursor_t cursor;
+ fr_cursor_t cursor;
- for (vp = fr_pair_cursor_init(&cursor, &request->control);
+ for (vp = fr_cursor_init(&cursor, &request->control);
vp;
- vp = fr_pair_cursor_next(&cursor)) {
+ vp = fr_cursor_next(&cursor)) {
VP_VERIFY(vp);
next:
switch (vp->da->attr) {
}
new = normify_with_header(request, vp);
- if (new) fr_pair_cursor_append(&cursor, new); /* inserts at the end of the list */
+ if (new) fr_cursor_append(&cursor, new); /* inserts at the end of the list */
RDEBUG2("Removing &control:Password-With-Header");
- vp = fr_pair_cursor_remove(&cursor); /* advances the cursor for us */
+ vp = fr_cursor_remove(&cursor); /* advances the cursor for us */
talloc_free(vp);
found_pw = true;
- vp = fr_pair_cursor_current(&cursor);
+ vp = fr_cursor_current(&cursor);
if (vp) goto next;
}
break;
rlm_pap_t const *inst = instance;
VALUE_PAIR *vp;
rlm_rcode_t rc = RLM_MODULE_INVALID;
- vp_cursor_t cursor;
+ fr_cursor_t cursor;
rlm_rcode_t (*auth_func)(rlm_pap_t const *, REQUEST *, VALUE_PAIR *) = NULL;
if (!request->password ||
* config items, to find out which authentication
* function to call.
*/
- for (vp = fr_pair_cursor_init(&cursor, &request->control);
+ for (vp = fr_cursor_init(&cursor, &request->control);
vp;
- vp = fr_pair_cursor_next(&cursor)) {
+ vp = fr_cursor_next(&cursor)) {
if (!vp->da->vendor) switch (vp->da->attr) {
case FR_CLEARTEXT_PASSWORD:
auth_func = &pap_auth_clear;
hv_undef(rad_hv);
- vp_cursor_t cursor;
+ fr_cursor_t cursor;
RINDENT();
fr_pair_list_sort(vps, fr_pair_cmp_by_da_tag);
- for (vp = fr_pair_cursor_init(&cursor, vps);
+ for (vp = fr_cursor_init(&cursor, vps);
vp;
- vp = fr_pair_cursor_next(&cursor)) {
+ vp = fr_cursor_next(&cursor)) {
VALUE_PAIR *next;
char const *name;
* We've sorted by type, then tag, so attributes of the
* same type/tag should follow on from each other.
*/
- if ((next = fr_pair_cursor_next_peek(&cursor)) && ATTRIBUTE_EQ(vp, next)) {
+ if ((next = fr_cursor_next_peek(&cursor)) && ATTRIBUTE_EQ(vp, next)) {
int i = 0;
AV *av;
perl_vp_to_svpvn_element(request, av, vp, &i, hash_name, list_name);
do {
perl_vp_to_svpvn_element(request, av, next, &i, hash_name, list_name);
- fr_pair_cursor_next(&cursor);
- } while ((next = fr_pair_cursor_next_peek(&cursor)) && ATTRIBUTE_EQ(vp, next));
+ fr_cursor_next(&cursor);
+ } while ((next = fr_cursor_next_peek(&cursor)) && ATTRIBUTE_EQ(vp, next));
(void)hv_store(rad_hv, name, strlen(name), newRV_noinc((SV *)av), 0);
continue;
static rlm_rcode_t do_python_single(REQUEST *request, PyObject *pFunc, char const *funcname)
{
- vp_cursor_t cursor;
+ fr_cursor_t cursor;
VALUE_PAIR *vp;
PyObject *pRet = NULL;
PyObject *pArgs = NULL;
*/
tuplelen = 0;
if (request != NULL) {
- for (vp = fr_pair_cursor_init(&cursor, &request->packet->vps);
+ for (vp = fr_cursor_init(&cursor, &request->packet->vps);
vp;
- vp = fr_pair_cursor_next(&cursor)) tuplelen++;
+ vp = fr_cursor_next(&cursor)) tuplelen++;
}
if (tuplelen == 0) {
goto finish;
}
- for (vp = fr_pair_cursor_init(&cursor, &request->packet->vps);
+ for (vp = fr_cursor_init(&cursor, &request->packet->vps);
vp;
- vp = fr_pair_cursor_next(&cursor), i++) {
+ vp = fr_cursor_next(&cursor), i++) {
PyObject *pp;
/* The inside tuple has two only: */
{
rlm_rcode_t rcode = RLM_MODULE_OK;
struct radutmp ut, u;
- vp_cursor_t cursor;
+ fr_cursor_t cursor;
VALUE_PAIR *vp;
int status = -1;
int protocol = -1;
/*
* First, find the interesting attributes.
*/
- for (vp = fr_pair_cursor_init(&cursor, &request->packet->vps);
+ for (vp = fr_cursor_init(&cursor, &request->packet->vps);
vp;
- vp = fr_pair_cursor_next(&cursor)) {
+ vp = fr_cursor_next(&cursor)) {
if (!vp->da->vendor) switch (vp->da->attr) {
case FR_LOGIN_IP_HOST:
case FR_FRAMED_IP_ADDRESS:
case SIGTRAN_RESPONSE_OK:
{
unsigned int i = 0;
- vp_cursor_t cursor;
+ fr_cursor_t cursor;
VALUE_PAIR *vp;
sigtran_vector_t *vec;
sigtran_map_send_auth_info_res_t *res = talloc_get_type_abort(txn->response.data,
sigtran_map_send_auth_info_res_t);
- fr_pair_cursor_init(&cursor, &request->control);
+ fr_cursor_init(&cursor, &request->control);
for (vec = res->vector; vec; vec = vec->next) {
switch (vec->type) {
vp = fr_pair_afrom_child_num(request, root, FR_EAP_SIM_RAND);
fr_pair_value_memsteal(vp, vec->sim.rand);
rdebug_pair(L_DBG_LVL_2, request, vp, "&control:");
- fr_pair_cursor_append(&cursor, vp);
+ fr_cursor_append(&cursor, vp);
vp = fr_pair_afrom_child_num(request, root, FR_EAP_SIM_SRES);
fr_pair_value_memsteal(vp, vec->sim.sres);
rdebug_pair(L_DBG_LVL_2, request, vp, "&control:");
- fr_pair_cursor_append(&cursor, vp);
+ fr_cursor_append(&cursor, vp);
vp = fr_pair_afrom_child_num(request, root, FR_EAP_SIM_KC);
fr_pair_value_memsteal(vp, vec->sim.kc);
rdebug_pair(L_DBG_LVL_2, request, vp, "&control:");
- fr_pair_cursor_append(&cursor, vp);
+ fr_cursor_append(&cursor, vp);
REXDENT();
i++;
vp = fr_pair_afrom_child_num(request, root, FR_EAP_AKA_RAND);
fr_pair_value_memsteal(vp, vec->umts.rand);
rdebug_pair(L_DBG_LVL_2, request, vp, "&control:");
- fr_pair_cursor_append(&cursor, vp);
+ fr_cursor_append(&cursor, vp);
vp = fr_pair_afrom_child_num(request, root, FR_EAP_AKA_XRES);
fr_pair_value_memsteal(vp, vec->umts.xres);
rdebug_pair(L_DBG_LVL_2, request, vp, "&control:");
- fr_pair_cursor_append(&cursor, vp);
+ fr_cursor_append(&cursor, vp);
vp = fr_pair_afrom_child_num(request, root, FR_EAP_AKA_CK);
fr_pair_value_memsteal(vp, vec->umts.ck);
rdebug_pair(L_DBG_LVL_2, request, vp, "&control:");
- fr_pair_cursor_append(&cursor, vp);
+ fr_cursor_append(&cursor, vp);
vp = fr_pair_afrom_child_num(request, root, FR_EAP_AKA_IK);
fr_pair_value_memsteal(vp, vec->umts.ik);
rdebug_pair(L_DBG_LVL_2, request, vp, "&control:");
- fr_pair_cursor_append(&cursor, vp);
+ fr_cursor_append(&cursor, vp);
vp = fr_pair_afrom_child_num(request, root, FR_EAP_AKA_AUTN);
fr_pair_value_memsteal(vp, vec->umts.authn);
rdebug_pair(L_DBG_LVL_2, request, vp, "&control:");
- fr_pair_cursor_append(&cursor, vp);
+ fr_cursor_append(&cursor, vp);
REXDENT();
i++;
fr_pair_value_strcpy(sql_group, entry->name);
if (inst->config->authorize_group_check_query) {
- vp_cursor_t cursor;
+ fr_cursor_t cursor;
VALUE_PAIR *vp;
/*
RDEBUG2("Group \"%s\": Merging assignment check items", entry->name);
RINDENT();
- for (vp = fr_pair_cursor_init(&cursor, &check_tmp);
+ for (vp = fr_cursor_init(&cursor, &check_tmp);
vp;
- vp = fr_pair_cursor_next(&cursor)) {
+ vp = fr_cursor_next(&cursor)) {
if (!fr_assignment_op[vp->op]) continue;
rcode = RLM_MODULE_UPDATED;
* Query the check table to find any conditions associated with this user/realm/whatever...
*/
if (inst->config->authorize_check_query) {
- vp_cursor_t cursor;
- VALUE_PAIR *vp;
+ fr_cursor_t cursor;
+ VALUE_PAIR *vp;
if (xlat_aeval(request, &expanded, request, inst->config->authorize_check_query,
inst->sql_escape_func, handle) < 0) {
RDEBUG2("Conditional check items matched, merging assignment check items");
RINDENT();
- for (vp = fr_pair_cursor_init(&cursor, &check_tmp);
+ for (vp = fr_cursor_init(&cursor, &check_tmp);
vp;
- vp = fr_pair_cursor_next(&cursor)) {
+ vp = fr_cursor_next(&cursor)) {
if (!fr_assignment_op[vp->op]) continue;
rdebug_pair(2, request, vp, NULL);
static rlm_rcode_t CC_HINT(nonnull) mod_accounting(void *instance, UNUSED void *thread, REQUEST *request)
{
VALUE_PAIR *vp;
- vp_cursor_t cursor;
+ fr_cursor_t cursor;
FILE *fp;
struct utmp ut;
time_t t;
/*
* First, find the interesting attributes.
*/
- for (vp = fr_pair_cursor_init(&cursor, &request->packet->vps);
+ for (vp = fr_cursor_init(&cursor, &request->packet->vps);
vp;
- vp = fr_pair_cursor_next(&cursor)) {
+ vp = fr_cursor_next(&cursor)) {
if (!vp->da->vendor) switch (vp->da->attr) {
case FR_USER_NAME:
if (vp->vp_length >= sizeof(ut.ut_name)) {
*/
static rlm_rcode_t CC_HINT(nonnull) mod_utf8_clean(UNUSED void *instance, UNUSED void *thread, REQUEST *request)
{
- size_t i, len;
- VALUE_PAIR *vp;
- vp_cursor_t cursor;
+ size_t i, len;
+ VALUE_PAIR *vp;
+ fr_cursor_t cursor;
- for (vp = fr_pair_cursor_init(&cursor, &request->packet->vps);
+ for (vp = fr_cursor_init(&cursor, &request->packet->vps);
vp;
- vp = fr_pair_cursor_next(&cursor)) {
+ vp = fr_cursor_next(&cursor)) {
if (vp->vp_type != FR_TYPE_STRING) continue;
for (i = 0; i < vp->vp_length; i += len) {