we don't need the username hack functions any more
authoraland <aland>
Wed, 22 Dec 1999 16:44:17 +0000 (16:44 +0000)
committeraland <aland>
Wed, 22 Dec 1999 16:44:17 +0000 (16:44 +0000)
(not that they were ever used by anything)

src/main/util.c

index bbf3821..1e5c6f2 100644 (file)
@@ -133,56 +133,3 @@ RADIUS_PACKET *build_reply(int code, REQUEST *request,
 
        return rp;
 }
-
-/*
- *     Get one of User-Name or Stripped-User-Name attributes
- *     from the request packet, preferably Stripped-User-Name.
- */
-VALUE_PAIR *rad_get_username(REQUEST *request)
-{
-  VALUE_PAIR *namepair;
-  VALUE_PAIR *pair;
-
-  namepair = NULL;
-
-  for (pair = request->packet->vps; pair; pair = pair->next) {
-       if (pair->attribute == PW_USER_NAME) {
-               namepair = pair;
-
-       } else if (pair->attribute == PW_STRIPPED_USER_NAME) {
-               return pair;
-       }
-  }
-
-  return namepair;
-}
-
-/*
- *     Put a user name into the request packet.  This user name
- *     will go into a Stripped-User-Name attribute, if it exists.
- *     If not, one will be created.
- */
-int rad_put_username(REQUEST *request, const char *username, int length)
-{
-  VALUE_PAIR **tail;
-  VALUE_PAIR *pair;
-
-  if (length >= sizeof(pair->strvalue)) return -1;
-
-  tail = &request->packet->vps;
-  for (pair = request->packet->vps; pair; pair = pair->next) {
-    if (pair->attribute == PW_STRIPPED_USER_NAME) {
-      break;
-    }
-    tail = &pair->next;
-  }
-
-  if (pair) {
-    strncpy(pair->strvalue, username, length);
-  } else {
-    *tail = pairmake("Stripped-User-Name", username, 0);
-    if (*tail == NULL) return -1;
-  }
-
-  return 0;
-}