default:
if ((p[1] >= '0') && (p[1] <= '9') &&
- (sscanf(p, "%3o", &x) == 1)) {
+ (sscanf(p + 1, "%3o", &x) == 1)) {
*q++ = x;
p += 2;
} else {
/*
* May not may not be found, but it *is* a known name.
*/
- *vp_p = pairfind(vps, da->attr);
+ *vp_p = pairfind(vps, da->attr, da->vendor);
return TRUE;
}
* If so, try looking for it.
*/
da = dict_attrbyname(pleft);
- if (da && radius_find_compare(da->attr)) {
+ if (da && (da->vendor == 0) && radius_find_compare(da->attr)) {
VALUE_PAIR *check = pairmake(pleft, pright, token);
*presult = (radius_callback_compare(request, NULL, check, NULL, NULL) == 0);
RDEBUG3(" Callback returns %d",
RDEBUG2(" (Attribute %s was not found)",
pleft);
- return FALSE;
+ *presult = 0;
+ return TRUE;
}
#ifdef HAVE_REGEX_H
request->password = NULL;
for (vp = request->packet->vps; vp != NULL; vp = vp->next) {
+ if (vp->vendor != 0) continue;
+
if ((vp->attribute == PW_USER_NAME) &&
!request->username) {
request->username = vp;
} else if (vp->attribute == PW_USER_PASSWORD) {
request->password = vp;
}
+
+ if (request->username && request->password) break;
}
}
/*
* Attributes aren't the same, skip them.
*/
- if (from_list[i]->attribute != to_list[j]->attribute) {
+ if ((from_list[i]->attribute != to_list[j]->attribute) ||
+ (from_list[i]->vendor != to_list[j]->vendor)) {
continue;
}
cp = cf_itemtopair(ci);
#ifndef NDEBUG
- if (debug_flag && radius_find_compare(vp->attribute)) {
+ if (debug_flag && (vp->vendor == 0) &&
+ radius_find_compare(vp->attribute)) {
DEBUG("WARNING: You are modifying the value of virtual attribute %s. This is not supported.", vp->name);
}
#endif