* it doesn't already exist.
*/
case T_OP_EQ:
- found = pairfind(*to, i->da->attr, i->da->vendor, TAG_ANY);
+ found = pairfind_da(*to, i->da, TAG_ANY);
if (!found) goto do_add;
tail_from = &(i->next);
* of the same vendor/attr which already exists.
*/
case T_OP_SET:
- found = pairfind(*to, i->da->attr, i->da->vendor, TAG_ANY);
+ found = pairfind_da(*to, i->da, TAG_ANY);
if (!found) goto do_add;
/*
* This allows users to manipulate virtual attributes as if they
* were real ones.
*/
- vp = pairfind(vps, da->attr, da->vendor, tag);
+ vp = pairfind_da(vps, da, tag);
if (vp) goto do_print;
/*
* AND attributes which are copied there
* from below.
*/
- if (pairfind(fake->packet->vps, vp->da->attr, vp->da->vendor, TAG_ANY)) {
- continue;
- }
+ if (pairfind_da(fake->packet->vps, vp->da, TAG_ANY)) continue;
/*
* Some attributes are handled specially.
* AND attributes which are copied there
* from below.
*/
- if (pairfind(fake->packet->vps, vp->da->attr, vp->da->vendor, TAG_ANY)) {
+ if (pairfind_da(fake->packet->vps, vp->da, TAG_ANY)) {
continue;
}
}
if (!from) continue;
- found = pairfind(*from, map->rhs->tmpl_da->attr, map->rhs->tmpl_da->vendor, TAG_ANY);
+ found = pairfind_da(*from, map->rhs->tmpl_da, TAG_ANY);
if (!found) continue;
expanded->attrs[total++] = talloc_typed_strdup(request, found->vp_strvalue);
{
VALUE_PAIR *cvp, *rvp;
- cvp = pairfind(request->packet->vps, pwattr[pwe - 1]->attr, pwattr[pwe - 1]->vendor, TAG_ANY);
- rvp = pairfind(request->packet->vps, pwattr[pwe]->attr, pwattr[pwe]->vendor, TAG_ANY);
+ cvp = pairfind_da(request->packet->vps, pwattr[pwe - 1], TAG_ANY);
+ rvp = pairfind_da(request->packet->vps, pwattr[pwe], TAG_ANY);
if (!cvp || !rvp) {
return;
}
struct mypasswd * pw, *last_found;
vp_cursor_t cursor;
- key = pairfind(request->packet->vps, inst->keyattr->attr, inst->keyattr->vendor, TAG_ANY);
+ key = pairfind_da(request->packet->vps, inst->keyattr, TAG_ANY);
if (!key) {
return RLM_MODULE_NOTFOUND;
}
/*
* Hash based on the given key. Usually User-Name.
*/
- vp = pairfind(packet->vps, inst->da->attr, inst->da->vendor, TAG_ANY);
+ vp = pairfind_da(packet->vps, inst->da, TAG_ANY);
if (!vp) return RLM_MODULE_NOOP;
hash = fr_hash(&vp->data, vp->length);
if ((inst->key_attr->vendor == 0) && (inst->key_attr->attr == PW_USER_NAME)) {
key_vp = request->username;
} else {
- key_vp = pairfind(request->packet->vps, inst->key_attr->attr, inst->key_attr->vendor, TAG_ANY);
+ key_vp = pairfind_da(request->packet->vps, inst->key_attr, TAG_ANY);
}
if (!key_vp) {
RWDEBUG2("Couldn't find key attribute, request:%s, doing nothing...", inst->key_attr->name);
return rcode;
}
- limit = pairfind(request->config_items, da->attr, da->vendor, TAG_ANY);
+ limit = pairfind_da(request->config_items, da, TAG_ANY);
if (limit == NULL) {
/* Yes this really is 'check' as distinct from control */
RWDEBUG2("Couldn't find check attribute, control:%s, doing nothing...", inst->limit_name);
/*
* Limit the reply attribute to the minimum of the existing value, or this new one.
*/
- reply_item = pairfind(request->reply->vps, inst->reply_attr->attr, inst->reply_attr->vendor, TAG_ANY);
+ reply_item = pairfind_da(request->reply->vps, inst->reply_attr, TAG_ANY);
if (reply_item) {
if (reply_item->vp_integer64 <= res) {
RDEBUG2("Leaving existing reply:%s value of %" PRIu64, inst->reply_attr->name,
return RLM_MODULE_FAIL;
}
- key = pairfind(request->config_items, da->attr, da->vendor, TAG_ANY);
+ key = pairfind_da(request->config_items, da, TAG_ANY);
if (!key) {
REDEBUG("Yubikey-Key attribute not found in control list, can't decrypt OTP data");
return RLM_MODULE_INVALID;
/*
* Now we check for replay attacks
*/
- vp = pairfind(request->config_items, vp->da->attr, vp->da->vendor, TAG_ANY);
+ vp = pairfind_da(request->config_items, da, TAG_ANY);
if (!vp) {
RWDEBUG("Yubikey-Counter not found in control list, skipping replay attack checks");
return RLM_MODULE_OK;