request->password = NULL;
for (vp = request->packet->vps; vp != NULL; vp = vp->next) {
+ if (vp->vendor) 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) continue;
}
}
/*
* 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