Convert radlog(L_INFO, ... to DEBUG2(... to avoid polluting
authoraland <aland>
Tue, 27 Nov 2007 15:17:19 +0000 (15:17 +0000)
committeraland <aland>
Tue, 27 Nov 2007 15:17:19 +0000 (15:17 +0000)
the logs

src/modules/rlm_eap/eap.c
src/modules/rlm_eap/types/rlm_eap_leap/rlm_eap_leap.c
src/modules/rlm_eap/types/rlm_eap_md5/rlm_eap_md5.c
src/modules/rlm_eap/types/rlm_eap_mschapv2/rlm_eap_mschapv2.c
src/modules/rlm_eap/types/rlm_eap_tls/rlm_eap_tls.c
src/modules/rlm_eap/types/rlm_eap_ttls/ttls.c

index 4243758..efd6922 100644 (file)
@@ -1034,7 +1034,7 @@ EAP_HANDLER *eap_handler(rlm_eap_t *inst, eap_packet_t **eap_packet_p,
                         *      request vps so that autz's work
                         *      correctly
                        */
-                       radlog(L_INFO, "rlm_eap: Broken NAS did not set User-Name, setting from EAP Identity");
+                       DEBUG2("rlm_eap: Broken NAS did not set User-Name, setting from EAP Identity");
                        vp = pairmake("User-Name", handler->identity, T_OP_EQ);
                        if (vp == NULL) {
                                radlog(L_ERR, "rlm_eap: out of memory");
@@ -1093,7 +1093,7 @@ EAP_HANDLER *eap_handler(rlm_eap_t *inst, eap_packet_t **eap_packet_p,
                         *      request vps so that autz's work
                         *      correctly
                        */
-                       radlog(L_INFO, "rlm_eap: WARNING NAS did not set User-Name.  Setting it locally from EAP Identity");
+                       DEBUG2("rlm_eap: WARNING NAS did not set User-Name.  Setting it locally from EAP Identity");
                        vp = pairmake("User-Name", handler->identity, T_OP_EQ);
                        if (vp == NULL) {
                                radlog(L_ERR, "rlm_eap: out of memory");
index 6321706..9802d2a 100644 (file)
@@ -121,7 +121,7 @@ static int leap_authenticate(UNUSED void *instance, EAP_HANDLER *handler)
        password = pairfind(handler->request->config_items, PW_CLEARTEXT_PASSWORD);
        if (!password) password = pairfind(handler->request->config_items, PW_NT_PASSWORD);
        if (!password) {
-               radlog(L_INFO, "rlm_eap_leap: No Cleartext-Password or NT-Password configured for this user");
+               DEBUG2("rlm_eap_leap: No Cleartext-Password or NT-Password configured for this user");
                eapleap_free(&packet);
                return 0;
        }
index 3c5f711..eb9514e 100644 (file)
@@ -75,7 +75,7 @@ static int md5_initiate(void *type_data, EAP_HANDLER *handler)
        for (i = 0; i < reply->value_size; i++) {
                reply->value[i] = fr_rand();
        }
-       radlog(L_INFO, "rlm_eap_md5: Issuing Challenge");
+       DEBUG2("rlm_eap_md5: Issuing Challenge");
 
        /*
         *      Keep track of the challenge.
@@ -121,7 +121,7 @@ static int md5_authenticate(UNUSED void *arg, EAP_HANDLER *handler)
 
        password = pairfind(handler->request->config_items, PW_CLEARTEXT_PASSWORD);
        if (password == NULL) {
-               radlog(L_INFO, "rlm_eap_md5: Cleartext-Password is required for EAP-MD5 authentication");
+               DEBUG2("rlm_eap_md5: Cleartext-Password is required for EAP-MD5 authentication");
                return 0;
        }
 
index 350ec91..ff9f2f3 100644 (file)
@@ -232,7 +232,7 @@ static int mschapv2_initiate(void *type_data, EAP_HANDLER *handler)
        for (i = 0; i < MSCHAPV2_CHALLENGE_LEN; i++) {
                challenge->vp_strvalue[i] = fr_rand();
        }
-       radlog(L_INFO, "rlm_eap_mschapv2: Issuing Challenge");
+       DEBUG2("rlm_eap_mschapv2: Issuing Challenge");
 
        /*
         *      Keep track of the challenge.
index 614ba5a..239a473 100644 (file)
@@ -100,7 +100,7 @@ static int load_dh_params(SSL_CTX *ctx, char *file)
        dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
        BIO_free(bio);
        if (!dh) {
-               radlog(L_INFO, "WARNING: rlm_eap_tls: Unable to set DH parameters.  DH cipher suites may not work!");
+               DEBUG2("WARNING: rlm_eap_tls: Unable to set DH parameters.  DH cipher suites may not work!");
                DEBUG2("WARNING: Fix this by running the OpenSSL command listed in eap.conf");
                return 0;
        }
@@ -249,14 +249,14 @@ static int cbtls_verify(int ok, X509_STORE_CTX *ctx)
        } /* depth == 0 */
 
        if (debug_flag > 0) {
-               radlog(L_INFO, "chain-depth=%d, ", depth);
-               radlog(L_INFO, "error=%d", err);
-
-               radlog(L_INFO, "--> User-Name = %s", handler->identity);
-               radlog(L_INFO, "--> BUF-Name = %s", common_name);
-               radlog(L_INFO, "--> subject = %s", subject);
-               radlog(L_INFO, "--> issuer  = %s", issuer);
-               radlog(L_INFO, "--> verify return:%d", my_ok);
+               DEBUG2("chain-depth=%d, ", depth);
+               DEBUG2("error=%d", err);
+
+               DEBUG2("--> User-Name = %s", handler->identity);
+               DEBUG2("--> BUF-Name = %s", common_name);
+               DEBUG2("--> subject = %s", subject);
+               DEBUG2("--> issuer  = %s", issuer);
+               DEBUG2("--> verify return:%d", my_ok);
        }
        return my_ok;
 }
@@ -315,7 +315,7 @@ static SSL_CTX *init_tls_ctx(EAP_TLS_CONF *conf)
         *      openSSL.org
         */
        if (type == SSL_FILETYPE_PEM) {
-               radlog(L_INFO, "rlm_eap_tls: Loading the certificate file as a chain");
+               DEBUG2("rlm_eap_tls: Loading the certificate file as a chain");
                if (!(SSL_CTX_use_certificate_chain_file(ctx, conf->certificate_file))) {
                        radlog(L_ERR, "rlm_eap: SSL error %s", ERR_error_string(ERR_get_error(), NULL));
                        radlog(L_ERR, "rlm_eap_tls: Error reading certificate file %s", conf->certificate_file);
index 7bc5586..bc006ab 100644 (file)
@@ -973,7 +973,7 @@ int eapttls_process(EAP_HANDLER *handler, tls_session_t *tls_session)
                 *      FIXME: Call SSL_get_error() to see what went
                 *      wrong.
                 */
-               radlog(L_INFO, "rlm_eap_ttls: SSL_read Error");
+               DEBUG2("rlm_eap_ttls: SSL_read Error");
                return PW_AUTHENTICATION_REJECT;
        }