If we've found a realm while proxying, add a 'Realm' attribute
authoraland <aland>
Mon, 15 Nov 1999 21:59:16 +0000 (21:59 +0000)
committeraland <aland>
Mon, 15 Nov 1999 21:59:16 +0000 (21:59 +0000)
to the packet->vps list, so that we can do stuff in the 'users'
file based on the individual realms

raddb/dictionary
share/dictionary
src/include/radius.h
src/main/proxy.c

index 5078bb0..32683fe 100644 (file)
@@ -112,6 +112,7 @@ ATTRIBUTE   Pam-Auth                1041    string
 ATTRIBUTE      Login-Time              1042    string
 ATTRIBUTE      Stripped-User-Name      1043    string
 ATTRIBUTE      Current-Time            1044    string
+ATTRIBUTE      Realm                   1045    string
 
 #
 #      Non-Protocol Attributes
index 5078bb0..32683fe 100644 (file)
@@ -112,6 +112,7 @@ ATTRIBUTE   Pam-Auth                1041    string
 ATTRIBUTE      Login-Time              1042    string
 ATTRIBUTE      Stripped-User-Name      1043    string
 ATTRIBUTE      Current-Time            1044    string
+ATTRIBUTE      Realm                   1045    string
 
 #
 #      Non-Protocol Attributes
index 0f8e34b..de976be 100644 (file)
@@ -93,6 +93,7 @@
 #define PW_LOGIN_TIME                  1042
 #define PW_STRIPPED_USER_NAME          1043
 #define PW_CURRENT_TIME                        1044
+#define PW_REALM                       1045
 
 /*
  *     Integer Translations
index fa4b8ad..5c14c94 100644 (file)
@@ -195,6 +195,9 @@ int proxy_send(REQUEST *request)
        if (realmname != NULL && realm->striprealm)
                        realmname[-1] = 0;
        namepair->length = strlen(namepair->strvalue);
+       pairadd(&request->packet->vps,
+               pairmake("Realm", realm->realm, T_OP_EQ));
+
 
        /*
         *      Perhaps accounting proxying was turned off.
@@ -398,7 +401,7 @@ int proxy_receive(REQUEST *request)
        }
 
        if (oldreq == NULL) {
-               log(L_PROXY, "Unreckognized proxy reply from server %s - ID %d",
+               log(L_PROXY, "Unrecognized proxy reply from server %s - ID %d",
                        client_name(request->packet->src_ipaddr),
                        request->packet->id);
                return -1;