]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Use modern list names
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 16 Jul 2015 23:38:57 +0000 (19:38 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 16 Jul 2015 23:39:25 +0000 (19:39 -0400)
17 files changed:
src/include/radiusd.h
src/main/listen.c
src/main/pair.c
src/main/process.c
src/main/soh.c
src/main/tls.c
src/modules/rlm_eap/libeap/eap_chbind.c
src/modules/rlm_eap/types/rlm_eap_gtc/rlm_eap_gtc.c
src/modules/rlm_eap/types/rlm_eap_mschapv2/rlm_eap_mschapv2.c
src/modules/rlm_eap/types/rlm_eap_pwd/rlm_eap_pwd.c
src/modules/rlm_eap/types/rlm_eap_ttls/ttls.c
src/modules/rlm_mschap/rlm_mschap.c
src/modules/rlm_preprocess/rlm_preprocess.c
src/modules/rlm_realm/rlm_realm.c
src/modules/rlm_realm/trustrouter.c
src/modules/rlm_sql/rlm_sql.c
src/modules/rlm_yubikey/rlm_yubikey.c

index afbbea844b2ab06edd0cbf487a9de3e00e4c3228..8f71005fe7f73dce5265268480539b15891e774f 100644 (file)
@@ -518,7 +518,7 @@ int radius_copy_vp(TALLOC_CTX *ctx, VALUE_PAIR **out, REQUEST *request, char con
  * @param _b value
  * @param _c op
  */
-#define pair_make_packet(_a, _b, _c) fr_pair_make(request->packet, &request->packet->vps, _a, _b, _c)
+#define pair_make_request(_a, _b, _c) fr_pair_make(request->packet, &request->packet->vps, _a, _b, _c)
 #define pair_make_reply(_a, _b, _c) fr_pair_make(request->reply, &request->reply->vps, _a, _b, _c)
 #define pair_make_config(_a, _b, _c) fr_pair_make(request, &request->config, _a, _b, _c)
 
index 2e994e7920bcaf6b30201c1cd0e2c89e823e0955..3bb42e4027cd151b9b21ad9212d684fc6724c03a 100644 (file)
@@ -2147,7 +2147,7 @@ static int client_socket_decode(UNUSED rad_listen_t *listener, REQUEST *request)
                const char *identity = SSL_get_psk_identity(sock->ssn->ssl);
                if (identity) {
                        RDEBUG("Retrieved psk identity: %s", identity);
-                       pair_make_packet("TLS-PSK-Identity", identity, T_OP_SET);
+                       pair_make_request("TLS-PSK-Identity", identity, T_OP_SET);
                }
 #endif
        }
index a83cd1349527837cdd1418472b1d4f6868032a51..c7702aea475b74941ee637e8689f401988d7d9ec 100644 (file)
@@ -870,7 +870,7 @@ void vmodule_failure_msg(REQUEST *request, char const *fmt, va_list ap)
        p = talloc_vasprintf(request, fmt, aq);
        va_end(aq);
 
-       MEM(vp = pair_make_packet("Module-Failure-Message", NULL, T_OP_ADD));
+       MEM(vp = pair_make_request("Module-Failure-Message", NULL, T_OP_ADD));
        if (request->module && (request->module[0] != '\0')) {
                fr_pair_value_sprintf(vp, "%s: %s", request->module, p);
        } else {
index 8981dafd97b893cafb85eb02259e764cd764923a..fdca6b3da0447b9d506c831e6bad1438e46907f8 100644 (file)
@@ -2895,7 +2895,7 @@ do_home:
        /*
         *      Remember that we sent the request to a Realm.
         */
-       if (realmname) pair_make_packet("Realm", realmname, T_OP_EQ);
+       if (realmname) pair_make_request("Realm", realmname, T_OP_EQ);
 
        /*
         *      Strip the name, if told to.
index 4230ab33bb5849489d4a46a752f5d8bfe4d06a2b..ab2bad02594ebbef21dc298af4b16346d2697410 100644 (file)
@@ -162,35 +162,35 @@ static int eapsoh_mstlv(REQUEST *request, uint8_t const *p, unsigned int data_le
                        }
                        data_len -= 18;
 
-                       vp = pair_make_packet("SoH-MS-Machine-OS-vendor", "Microsoft", T_OP_EQ);
+                       vp = pair_make_request("SoH-MS-Machine-OS-vendor", "Microsoft", T_OP_EQ);
                        if (!vp) return 0;
 
-                       vp = pair_make_packet("SoH-MS-Machine-OS-version", NULL, T_OP_EQ);
+                       vp = pair_make_request("SoH-MS-Machine-OS-version", NULL, T_OP_EQ);
                        if (!vp) return 0;
 
                        vp->vp_integer = soh_pull_be_32(p); p+=4;
 
-                       vp = pair_make_packet("SoH-MS-Machine-OS-release", NULL, T_OP_EQ);
+                       vp = pair_make_request("SoH-MS-Machine-OS-release", NULL, T_OP_EQ);
                        if (!vp) return 0;
 
                        vp->vp_integer = soh_pull_be_32(p); p+=4;
 
-                       vp = pair_make_packet("SoH-MS-Machine-OS-build", NULL, T_OP_EQ);
+                       vp = pair_make_request("SoH-MS-Machine-OS-build", NULL, T_OP_EQ);
                        if (!vp) return 0;
 
                        vp->vp_integer = soh_pull_be_32(p); p+=4;
 
-                       vp = pair_make_packet("SoH-MS-Machine-SP-version", NULL, T_OP_EQ);
+                       vp = pair_make_request("SoH-MS-Machine-SP-version", NULL, T_OP_EQ);
                        if (!vp) return 0;
 
                        vp->vp_integer = soh_pull_be_16(p); p+=2;
 
-                       vp = pair_make_packet("SoH-MS-Machine-SP-release", NULL, T_OP_EQ);
+                       vp = pair_make_request("SoH-MS-Machine-SP-release", NULL, T_OP_EQ);
                        if (!vp) return 0;
 
                        vp->vp_integer = soh_pull_be_16(p); p+=2;
 
-                       vp = pair_make_packet("SoH-MS-Machine-Processor", NULL, T_OP_EQ);
+                       vp = pair_make_request("SoH-MS-Machine-Processor", NULL, T_OP_EQ);
                        if (!vp) return 0;
 
                        vp->vp_integer = soh_pull_be_16(p); p+=2;
@@ -245,7 +245,7 @@ static int eapsoh_mstlv(REQUEST *request, uint8_t const *p, unsigned int data_le
                        t = soh_pull_be_16(p);
                        p += 2;
 
-                       vp = pair_make_packet("SoH-MS-Machine-Name", NULL, T_OP_EQ);
+                       vp = pair_make_request("SoH-MS-Machine-Name", NULL, T_OP_EQ);
                        if (!vp) return 0;
 
                        vp->vp_strvalue = q = talloc_array(vp, char, t);
@@ -265,7 +265,7 @@ static int eapsoh_mstlv(REQUEST *request, uint8_t const *p, unsigned int data_le
                         * 24 bytes opaque binary which we might, in future, have
                         * to echo back to the client in a final SoHR
                         */
-                       vp = pair_make_packet("SoH-MS-Correlation-Id", NULL, T_OP_EQ);
+                       vp = pair_make_request("SoH-MS-Correlation-Id", NULL, T_OP_EQ);
                        if (!vp) return 0;
 
                        fr_pair_value_memcpy(vp, p, 24);
@@ -294,7 +294,7 @@ static int eapsoh_mstlv(REQUEST *request, uint8_t const *p, unsigned int data_le
                         * 1 byte product type (client=1 domain_controller=2 server=3)
                         */
                        p += 4;
-                       vp = pair_make_packet("SoH-MS-Machine-Role", NULL, T_OP_EQ);
+                       vp = pair_make_request("SoH-MS-Machine-Role", NULL, T_OP_EQ);
                        if (!vp) return 0;
 
                        vp->vp_integer = *p;
@@ -543,7 +543,7 @@ int soh_verify(REQUEST *request, uint8_t const *data, unsigned int data_len) {
 
                                RDEBUG2("SoH Health-Class-Status microsoft DWORD=%08x", hcstatus);
 
-                               vp = pair_make_packet("SoH-MS-Windows-Health-Status", NULL, T_OP_EQ);
+                               vp = pair_make_request("SoH-MS-Windows-Health-Status", NULL, T_OP_EQ);
                                if (!vp) return 0;
 
                                switch (curr_hc) {
@@ -659,7 +659,7 @@ int soh_verify(REQUEST *request, uint8_t const *data, unsigned int data_len) {
                                        break;
                                }
                        } else {
-                               vp = pair_make_packet("SoH-MS-Health-Other", NULL, T_OP_EQ);
+                               vp = pair_make_request("SoH-MS-Health-Other", NULL, T_OP_EQ);
                                if (!vp) return 0;
 
                                /* FIXME: what to do with the payload? */
index 075c03b3f53665849d87f21a4b4c25e552ac9f8f..75b74d258ea293f89f3972eb6e28753cfa50338c 100644 (file)
@@ -169,7 +169,7 @@ static unsigned int psk_server_callback(SSL *ssl, const char *identity,
                        return 0;
                }
 
-               vp = pair_make_packet("TLS-PSK-Identity", identity, T_OP_SET);
+               vp = pair_make_request("TLS-PSK-Identity", identity, T_OP_SET);
                if (!vp) return 0;
 
                hex_len = radius_xlat(buffer, sizeof(buffer), request, conf->psk_query,
@@ -2042,7 +2042,7 @@ int cbtls_verify(int ok, X509_STORE_CTX *ctx)
                        }
                        fclose(fp);
 
-                       if (!pair_make_packet("TLS-Client-Cert-Filename",
+                       if (!pair_make_request("TLS-Client-Cert-Filename",
                                             filename, T_OP_SET)) {
                                RDEBUG("Failed creating TLS-Client-Cert-Filename");
 
@@ -3015,7 +3015,7 @@ int tls_success(tls_session_t *ssn, REQUEST *request)
                /*
                 *      Mark the request as resumed.
                 */
-               pair_make_packet("EAP-Session-Resumed", "1", T_OP_SET);
+               pair_make_request("EAP-Session-Resumed", "1", T_OP_SET);
        }
 
        return 0;
index 3c9ac6519d08b77bfd2b04920d888d36c80db18e..8ad85642b47100bb0210258c177399637830c089 100644 (file)
@@ -166,7 +166,7 @@ PW_CODE chbind_process(REQUEST *request, CHBIND_REQ *chbind)
 
        /* Set-up the fake request */
        fake = request_alloc_fake(request);
-       pair_make_packet("Freeradius-Proxied-To", "127.0.0.1", T_OP_EQ);
+       pair_make_request("Freeradius-Proxied-To", "127.0.0.1", T_OP_EQ);
 
        /* Add the username to the fake request */
        if (chbind->username) {
index b3b5f997e72051310815e2fb782872fbbe2e601d..aeb7353343038befd36396396f70ddd4d0125d57 100644 (file)
@@ -206,7 +206,7 @@ static int CC_HINT(nonnull) mod_process(void *instance, eap_handler_t *handler)
                 */
                fr_pair_delete_by_num(&request->packet->vps, PW_USER_PASSWORD, 0, TAG_ANY);
 
-               vp = pair_make_packet("User-Password", NULL, T_OP_EQ);
+               vp = pair_make_request("User-Password", NULL, T_OP_EQ);
                if (!vp) {
                        return 0;
                }
index 14e37848a9d7c9b7373161647ea97436366d2393..f086dfb5543994acb00490bd32330e26561f4f79 100644 (file)
@@ -415,11 +415,11 @@ static int CC_HINT(nonnull) mod_process(void *arg, eap_handler_t *handler)
 
                        RDEBUG2("Password change packet received");
 
-                       challenge = pair_make_packet("MS-CHAP-Challenge", NULL, T_OP_EQ);
+                       challenge = pair_make_request("MS-CHAP-Challenge", NULL, T_OP_EQ);
                        if (!challenge) return 0;
                        fr_pair_value_memcpy(challenge, data->challenge, MSCHAPV2_CHALLENGE_LEN);
 
-                       cpw = pair_make_packet("MS-CHAP2-CPW", NULL, T_OP_EQ);
+                       cpw = pair_make_request("MS-CHAP2-CPW", NULL, T_OP_EQ);
                        cpw->vp_length = 68;
 
                        cpw->vp_octets = p = talloc_array(cpw, uint8_t, cpw->vp_length);
@@ -436,7 +436,7 @@ static int CC_HINT(nonnull) mod_process(void *arg, eap_handler_t *handler)
                                int to_copy = 516 - copied;
                                if (to_copy > 243) to_copy = 243;
 
-                               nt_enc = pair_make_packet("MS-CHAP-NT-Enc-PW", NULL, T_OP_ADD);
+                               nt_enc = pair_make_request("MS-CHAP-NT-Enc-PW", NULL, T_OP_ADD);
                                nt_enc->vp_length = 4 + to_copy;
 
                                nt_enc->vp_octets = p = talloc_array(nt_enc, uint8_t, nt_enc->vp_length);
@@ -561,11 +561,11 @@ failure:
         *      to pass to the 'mschap' module.  This is a little wonky,
         *      but it works.
         */
-       challenge = pair_make_packet("MS-CHAP-Challenge", NULL, T_OP_EQ);
+       challenge = pair_make_request("MS-CHAP-Challenge", NULL, T_OP_EQ);
        if (!challenge) return 0;
        fr_pair_value_memcpy(challenge, data->challenge, MSCHAPV2_CHALLENGE_LEN);
 
-       response = pair_make_packet("MS-CHAP2-Response", NULL, T_OP_EQ);
+       response = pair_make_request("MS-CHAP2-Response", NULL, T_OP_EQ);
        if (!response) return 0;
        response->vp_length = MSCHAPV2_RESPONSE_LEN;
        response->vp_octets = p = talloc_array(response, uint8_t, response->vp_length);
@@ -574,7 +574,7 @@ failure:
        p[1] = eap_ds->response->type.data[5 + MSCHAPV2_RESPONSE_LEN];
        memcpy(p + 2, &eap_ds->response->type.data[5], MSCHAPV2_RESPONSE_LEN - 2);
 
-       name = pair_make_packet("MS-CHAP-User-Name", NULL, T_OP_EQ);
+       name = pair_make_request("MS-CHAP-User-Name", NULL, T_OP_EQ);
        if (!name) return 0;
 
        /*
index acadd835c45c4d408a32d1968461851002dd8ce6..4994a62996cc6e6c770cbe64a2ca5e2bc3489c70 100644 (file)
@@ -426,7 +426,7 @@ static int mod_process(void *arg, eap_handler_t *handler)
                        RDEBUG("pwd unable to create fake request!");
                        return 0;
                }
-               fake->username = pair_make_packet("User-Name", NULL, T_OP_EQ);
+               fake->username = pair_make_request("User-Name", NULL, T_OP_EQ);
                if (!fake->username) {
                        RDEBUG("pwd unanable to create value pair for username!");
                        talloc_free(fake);
index 0d577740bbb25b4e075677158dd2139f2881a5bc..bea01b6b30ff631b86e2845e0cc3e7fd6bc7f285 100644 (file)
@@ -1005,7 +1005,7 @@ int eapttls_process(eap_handler_t *handler, tls_session_t *tls_session)
        /*
         *      Tell the request that it's a fake one.
         */
-       pair_make_packet("Freeradius-Proxied-To", "127.0.0.1", T_OP_EQ);
+       pair_make_request("Freeradius-Proxied-To", "127.0.0.1", T_OP_EQ);
 
        RDEBUG("Got tunneled request");
        rdebug_pair_list(L_DBG_LVL_1, request, fake->packet->vps, NULL);
index 07dece6963928467b960a37e0575081494d3b02a..a9d4c408f436c468cfcdb19292f1723ca20e1ef9 100644 (file)
@@ -984,7 +984,7 @@ ntlm_auth_err:
                 *  The new NT hash - this should be preferred over the
                 *  cleartext password as it avoids unicode hassles.
                 */
-               new_hash = pair_make_packet("MS-CHAP-New-NT-Password", NULL, T_OP_EQ);
+               new_hash = pair_make_request("MS-CHAP-New-NT-Password", NULL, T_OP_EQ);
                new_hash->vp_length = NT_DIGEST_LENGTH;
                new_hash->vp_octets = q = talloc_array(new_hash, uint8_t, new_hash->vp_length);
                fr_md4_calc(q, p, passlen);
@@ -1006,7 +1006,7 @@ ntlm_auth_err:
                 *
                 *  First pass: get the length of the converted string.
                 */
-               new_pass = pair_make_packet("MS-CHAP-New-Cleartext-Password", NULL, T_OP_EQ);
+               new_pass = pair_make_request("MS-CHAP-New-Cleartext-Password", NULL, T_OP_EQ);
                new_pass->vp_length = 0;
 
                i = 0;
index 89d8a386597ef8c522aa855d748a0998aa508217..bbcaf18e15e8dced65ffbb9dfc3c7bebc34a05ad 100644 (file)
@@ -147,7 +147,7 @@ static void cisco_vsa_hack(REQUEST *request)
                        gettoken(&p, newattr, sizeof(newattr), false);
 
                        if (dict_attrbyname(newattr) != NULL) {
-                               pair_make_packet(newattr, ptr + 1, T_OP_EQ);
+                               pair_make_request(newattr, ptr + 1, T_OP_EQ);
                        }
                } else {        /* h322-foo-bar = "h323-foo-bar = baz" */
                        /*
index d90868e3edf5d6df1f04d41118127e7fd37d0b87..c7ab893b23eea36cc2adf8e829ad630a49c7d4ea 100644 (file)
@@ -222,7 +222,7 @@ static int check_for_realm(void *instance, REQUEST *request, REALM **returnrealm
         *      entered.
         */
        if (realm->name[0] != '~') realmname = realm->name;
-       pair_make_packet("Realm", realmname, T_OP_EQ);
+       pair_make_request("Realm", realmname, T_OP_EQ);
        RDEBUG2("Adding Realm = \"%s\"", realmname);
 
        talloc_free(namebuf);
index e2ae5e2afd2d04823bf9c54d8d7bd518b27165eb..1636a4b1232b5bc991fa579115c8d1caba831294 100644 (file)
@@ -365,7 +365,7 @@ REALM *tr_query_realm(REQUEST *request, char const *realm,
        vp = fr_pair_find_by_num(request->packet->vps, PW_UKERNA_TR_COI, VENDORPEC_UKERNA, TAG_ANY);
        if (vp)
                community = vp->vp_strvalue;
-       else pair_make_packet("Trust-Router-COI", community, T_OP_SET);
+       else pair_make_request("Trust-Router-COI", community, T_OP_SET);
 
        cookie.fr_realm_name = talloc_asprintf(NULL,
                                               "%s%%%s",
index 28925f4c199881842a20baa4f06aa3002a794ff2..8804a779188963927f9b3d4a390c8e7aa5631cf0 100644 (file)
@@ -669,7 +669,7 @@ static rlm_rcode_t rlm_sql_process_groups(rlm_sql_t *inst, REQUEST *request, rlm
         *      Add the Sql-Group attribute to the request list so we know
         *      which group we're retrieving attributes for
         */
-       sql_group = pair_make_packet(inst->group_da->name, NULL, T_OP_EQ);
+       sql_group = pair_make_request(inst->group_da->name, NULL, T_OP_EQ);
        if (!sql_group) {
                REDEBUG("Error creating %s attribute", inst->group_da->name);
                rcode = RLM_MODULE_FAIL;
index 17629a5761c0fa776a07d52a624296c1b4a504b4..fc58363a55ddb600524100b146a1a19548f1acdc 100644 (file)
@@ -275,7 +275,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_authorize(void *instance, REQUEST *reque
                         *      Insert a new request attribute just containing the OTP
                         *      portion.
                         */
-                       vp = pair_make_packet("Yubikey-OTP", otp, T_OP_SET);
+                       vp = pair_make_request("Yubikey-OTP", otp, T_OP_SET);
                        if (!vp) {
                                REDEBUG("Failed creating 'Yubikey-OTP' attribute");
                                return RLM_MODULE_FAIL;