- if (pairfind(check_pairs, PW_STRIP_USER_NAME)) {
- /*
- * I don't think we want to update the User-Name
- * attribute in place... - atd
- */
- strcpy((char *)request->strvalue, rest);
- request->length = strlen(rest);
+ if ((vp = pairfind(check_pairs, PW_STRIP_USER_NAME)) != NULL) {
+ if (vp->lvalue == 1) {
+ /*
+ * I don't think we want to update the User-Name
+ * attribute in place... - atd
+ */
+ strcpy((char *)request->strvalue, rest);
+ request->length = strlen(rest);
+ } else {
+ return ret;
+ }