]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Remove L_CONS
authorAlan T. DeKok <aland@freeradius.org>
Mon, 18 Feb 2013 16:17:07 +0000 (11:17 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 18 Feb 2013 16:31:21 +0000 (11:31 -0500)
26 files changed:
src/include/radiusd.h
src/main/conffile.c
src/main/exec.c
src/main/files.c
src/main/log.c
src/main/modcall.c
src/main/radiusd.c
src/main/realms.c
src/main/session.c
src/modules/rlm_always/rlm_always.c
src/modules/rlm_attr_filter/rlm_attr_filter.c
src/modules/rlm_eap/rlm_eap.c
src/modules/rlm_eap2/rlm_eap2.c
src/modules/rlm_files/rlm_files.c
src/modules/rlm_otp/otp_util.c
src/modules/rlm_otp/rlm_otp.c
src/modules/rlm_preprocess/rlm_preprocess.c
src/modules/rlm_python/rlm_python.c
src/modules/rlm_realm/rlm_realm.c
src/modules/rlm_ruby/rlm_ruby.c
src/modules/rlm_securid/rlm_securid.c
src/modules/rlm_smsotp/rlm_smsotp.c
src/modules/rlm_sometimes/rlm_sometimes.c
src/modules/rlm_sql/drivers/rlm_sql_iodbc/rlm_sql_iodbc.c
src/modules/rlm_sql/rlm_sql.c
src/modules/rlm_sql/sql.c

index a5bd5b84f371e802aae137877fe44743990f87fd..b9196d73327afefc2f095b162438ffcbb6946e7b 100644 (file)
@@ -469,7 +469,6 @@ typedef struct main_config_t {
 #define L_ERR                  4
 #define L_PROXY                        5
 #define L_ACCT                 6
-#define L_CONS                 128
 
 /* for paircompare_register */
 typedef int (*RAD_COMPARE_FUNC)(void *instance, REQUEST *,VALUE_PAIR *, VALUE_PAIR *, VALUE_PAIR *, VALUE_PAIR **);
index da1a4c99355253d9029c663c7ef2283909fd9dcc..06e3e256ed99df6182259e94c4bfd28d188584a4 100644 (file)
@@ -1580,7 +1580,7 @@ static int cf_section_read(const char *filename, int *lineno, FILE *fp,
                                }
 
                                if ((stat_buf.st_mode & S_IWOTH) != 0) {
-                                       radlog(L_ERR|L_CONS, "%s[%d]: Directory %s is globally writable.  Refusing to start due to insecure configuration.",
+                                       radlog(L_ERR, "%s[%d]: Directory %s is globally writable.  Refusing to start due to insecure configuration.",
                                               filename, *lineno, value);
                                        return -1;
                                }
@@ -1893,7 +1893,7 @@ int cf_file_include(const char *filename, CONF_SECTION *cs)
 
        fp = fopen(filename, "r");
        if (!fp) {
-               radlog(L_ERR|L_CONS, "Unable to open file \"%s\": %s",
+               radlog(L_ERR, "Unable to open file \"%s\": %s",
                       filename, strerror(errno));
                return -1;
        }
@@ -1902,7 +1902,7 @@ int cf_file_include(const char *filename, CONF_SECTION *cs)
 #ifdef S_IWOTH
                if ((statbuf.st_mode & S_IWOTH) != 0) {
                        fclose(fp);
-                       radlog(L_ERR|L_CONS, "Configuration file %s is globally writable.  Refusing to start due to insecure configuration.",
+                       radlog(L_ERR, "Configuration file %s is globally writable.  Refusing to start due to insecure configuration.",
                               filename);
                        return -1;
                }
@@ -1911,7 +1911,7 @@ int cf_file_include(const char *filename, CONF_SECTION *cs)
 #ifdef S_IROTH
                if (0 && (statbuf.st_mode & S_IROTH) != 0) {
                        fclose(fp);
-                       radlog(L_ERR|L_CONS, "Configuration file %s is globally readable.  Refusing to start due to insecure configuration.",
+                       radlog(L_ERR, "Configuration file %s is globally readable.  Refusing to start due to insecure configuration.",
                               filename);
                        return -1;
                }
@@ -1934,7 +1934,7 @@ int cf_file_include(const char *filename, CONF_SECTION *cs)
        if (cf_data_add_internal(cs, filename, mtime, free,
                                 PW_TYPE_FILENAME) < 0) {
                fclose(fp);
-               radlog(L_ERR|L_CONS, "Internal error opening file \"%s\"",
+               radlog(L_ERR, "Internal error opening file \"%s\"",
                       filename);
                return -1;
        }
@@ -1942,7 +1942,7 @@ int cf_file_include(const char *filename, CONF_SECTION *cs)
        cd = cf_data_find_internal(cs, filename, PW_TYPE_FILENAME);
        if (!cd) {
                fclose(fp);
-               radlog(L_ERR|L_CONS, "Internal error opening file \"%s\"",
+               radlog(L_ERR, "Internal error opening file \"%s\"",
                       filename);
                return -1;
        }
index 86ffa8f49eb462ada41873ab5a72def13c943058..9b1279bce5ff57b596d1d40bfd6c612622a154df 100644 (file)
@@ -110,7 +110,7 @@ pid_t radius_start_program(const char *cmd, REQUEST *request,
        char mycmd[1024];
 
        if (strlen(cmd) > (sizeof(mycmd) - 1)) {
-               radlog(L_ERR|L_CONS, "Command line is too long");
+               radlog(L_ERR, "Command line is too long");
                return -1;
        }
 
@@ -118,7 +118,7 @@ pid_t radius_start_program(const char *cmd, REQUEST *request,
         *      Check for bad escapes.
         */
        if (cmd[strlen(cmd) - 1] == '\\') {
-               radlog(L_ERR|L_CONS, "Command line has final backslash, without a following character");
+               radlog(L_ERR, "Command line has final backslash, without a following character");
                return -1;
        }
 
@@ -159,7 +159,7 @@ pid_t radius_start_program(const char *cmd, REQUEST *request,
                        case '\'':
                                length = rad_copy_string(to, from);
                                if (length < 0) {
-                                       radlog(L_ERR|L_CONS, "Invalid string passed as argument for external program");
+                                       radlog(L_ERR, "Invalid string passed as argument for external program");
                                        return -1;
                                }
                                from += length;
@@ -172,7 +172,7 @@ pid_t radius_start_program(const char *cmd, REQUEST *request,
 
                                        length = rad_copy_variable(to, from);
                                        if (length < 0) {
-                                               radlog(L_ERR|L_CONS, "Invalid variable expansion passed as argument for external program");
+                                               radlog(L_ERR, "Invalid variable expansion passed as argument for external program");
                                                return -1;
                                        }
                                        from += length;
@@ -248,14 +248,14 @@ pid_t radius_start_program(const char *cmd, REQUEST *request,
        if (exec_wait) {
                if (input_fd) {
                        if (pipe(to_child) != 0) {
-                               radlog(L_ERR|L_CONS, "Couldn't open pipe to child: %s",
+                               radlog(L_ERR, "Couldn't open pipe to child: %s",
                                       strerror(errno));
                                return -1;
                        }
                }
                if (output_fd) {
                        if (pipe(from_child) != 0) {
-                               radlog(L_ERR|L_CONS, "Couldn't open pipe from child: %s",
+                               radlog(L_ERR, "Couldn't open pipe from child: %s",
                                       strerror(errno));
                                /* safe because these either need closing or are == -1 */
                                close(to_child[0]);
@@ -330,7 +330,7 @@ pid_t radius_start_program(const char *cmd, REQUEST *request,
                 */
                devnull = open("/dev/null", O_RDWR);
                if (devnull < 0) {
-                       radlog(L_ERR|L_CONS, "Failed opening /dev/null: %s\n",
+                       radlog(L_ERR, "Failed opening /dev/null: %s\n",
                               strerror(errno));
                        exit(1);
                }
@@ -397,7 +397,7 @@ pid_t radius_start_program(const char *cmd, REQUEST *request,
         *      Parent process.
         */
        if (pid < 0) {
-               radlog(L_ERR|L_CONS, "Couldn't fork %s: %s",
+               radlog(L_ERR, "Couldn't fork %s: %s",
                       argv[0], strerror(errno));
                if (exec_wait) {
                        /* safe because these either need closing or are == -1 */
@@ -736,7 +736,7 @@ int radius_exec_program(const char *cmd, REQUEST *request,
                }
        }
 
-       radlog(L_ERR|L_CONS, "Exec-Program: Abnormal child exit: %s",
+       radlog(L_ERR, "Exec-Program: Abnormal child exit: %s",
               strerror(errno));
 #endif /* __MINGW32__ */
 
index e6f75b5233d161ee4ad9cf7ae880e7444c417e3c..e707a51a19751dd38ff722214bfb8fd45e83a189 100644 (file)
@@ -83,7 +83,7 @@ int pairlist_read(const char *file, PAIR_LIST **list, int complain)
        if ((fp = fopen(file, "r")) == NULL) {
                if (!complain)
                        return -1;
-               radlog(L_CONS|L_ERR, "Couldn't open %s for reading: %s",
+               radlog(L_ERR, "Couldn't open %s for reading: %s",
                                file, strerror(errno));
                return -1;
        }
@@ -118,7 +118,7 @@ parse_again:
                         */
                        if (isspace((int) buffer[0]))  {
                                if (parsecode != T_EOL) {
-                                       radlog(L_ERR|L_CONS,
+                                       radlog(L_ERR,
                                               "%s[%d]: Unexpected trailing comma for entry %s",
                                               file, lineno, entry);
                                        fclose(fp);
@@ -167,7 +167,7 @@ parse_again:
                                
                                if (pairlist_read(newfile, &t, 0) != 0) {
                                        pairlist_free(&pl);
-                                       radlog(L_ERR|L_CONS,
+                                       radlog(L_ERR,
                                               "%s[%d]: Could not open included file %s: %s",
                                               file, lineno, newfile, strerror(errno));
                                        fclose(fp);
@@ -195,13 +195,13 @@ parse_again:
                        parsecode = userparse(ptr, &check_tmp);
                        if (parsecode == T_OP_INVALID) {
                                pairlist_free(&pl);
-                               radlog(L_ERR|L_CONS,
+                               radlog(L_ERR,
                                "%s[%d]: Parse error (check) for entry %s: %s",
                                        file, lineno, entry, fr_strerror());
                                fclose(fp);
                                return -1;
                        } else if (parsecode == T_COMMA) {
-                               radlog(L_ERR|L_CONS,
+                               radlog(L_ERR,
                                       "%s[%d]: Unexpected trailing comma in check item list for entry %s",
                                       file, lineno, entry);
                                fclose(fp);
@@ -213,7 +213,7 @@ parse_again:
                else {
                        if(*buffer == ' ' || *buffer == '\t') {
                                if (parsecode != T_COMMA) {
-                                       radlog(L_ERR|L_CONS,
+                                       radlog(L_ERR,
                                               "%s[%d]: Syntax error: Previous line is missing a trailing comma for entry %s",
                                               file, lineno, entry);
                                        fclose(fp);
@@ -227,7 +227,7 @@ parse_again:
                                /* valid tokens are 1 or greater */
                                if (parsecode < 1) {
                                        pairlist_free(&pl);
-                                       radlog(L_ERR|L_CONS,
+                                       radlog(L_ERR,
                                               "%s[%d]: Parse error (reply) for entry %s: %s",
                                               file, lineno, entry, fr_strerror());
                                        fclose(fp);
index f3a14c2ce8f0367602e5abd5772bf341036efd24..64e9e6fc48150cf1319f55d89254b4583196f639 100644 (file)
@@ -125,7 +125,7 @@ int vradlog(int lvl, const char *fmt, va_list ap)
                len = strlen(buffer);
 
                len += strlcpy(buffer + len,
-                              fr_int2str(levels, (lvl & ~L_CONS), ": "),
+                              fr_int2str(levels, lvl, ": "),
                               sizeof(buffer) - len);
        }
 
@@ -161,7 +161,7 @@ int vradlog(int lvl, const char *fmt, va_list ap)
 
 #ifdef HAVE_SYSLOG_H
        case RADLOG_SYSLOG:
-               switch(lvl & ~L_CONS) {
+               switch(lvl) {
                        case L_DBG:
                                lvl = LOG_DEBUG;
                                break;
@@ -334,7 +334,7 @@ void radlog_request(int lvl, int priority, REQUEST *request, const char *msg, ..
                }
                
                len += strlcpy(buffer + len, 
-                              fr_int2str(levels, (lvl & ~L_CONS), ": "), 
+                              fr_int2str(levels, lvl, ": "),
                               sizeof(buffer) - len);
                               
                if (len >= sizeof(buffer)) goto finish;
index ca080fb04b9199579daa0fb8ddf872cf68052bf4..6ad3bcfadfaf3dac4409f41fe94713868e59c1e1 100644 (file)
@@ -2429,6 +2429,9 @@ void modcallable_free(modcallable **pc)
 {
        modcallable *c, *loop, *next;
        c = *pc;
+
+       DEBUG3("Freeing module %s", c->name);
+
        if (c->type != MOD_SINGLE) {
                modgroup *g = mod_callabletogroup(c);
 
index 58eec256b479e414be2e06e1b8eca996e8305fca..b376309c1ec8b40b42a52e98d3325bf93b7eee41 100644 (file)
@@ -317,7 +317,7 @@ int main(int argc, char *argv[])
 
                devnull = open("/dev/null", O_RDWR);
                if (devnull < 0) {
-                       radlog(L_ERR|L_CONS, "Failed opening /dev/null: %s\n",
+                       radlog(L_ERR, "Failed opening /dev/null: %s\n",
                               strerror(errno));
                        exit(1);
                }
@@ -416,7 +416,7 @@ int main(int argc, char *argv[])
                        fprintf(fp, "%d\n", (int) radius_pid);
                        fclose(fp);
                } else {
-                       radlog(L_ERR|L_CONS, "Failed creating PID file %s: %s\n",
+                       radlog(L_ERR, "Failed creating PID file %s: %s\n",
                               mainconfig.pid_file, strerror(errno));
                        exit(1);
                }
index fee9ab0f53dac6b271bd37c894bdf3d7989d7b33..651d2555129b16a80c6ee3cd9d31397fbb993dea 100644 (file)
@@ -2108,7 +2108,7 @@ void home_server_update_request(home_server *home, REQUEST *request)
         */
        if (!request->proxy) {
                if ((request->proxy = rad_alloc(TRUE)) == NULL) {
-                       radlog(L_ERR|L_CONS, "no memory");
+                       radlog(L_ERR, "no memory");
                        exit(1);
                }
                
index 87f6f37a189a1971b9bfe08d9dbe1f798d201d70..d093ca5a3347e3846355f82ee6d75a881c3f80a5 100644 (file)
@@ -53,7 +53,7 @@ int session_zap(REQUEST *request, uint32_t nasaddr, unsigned int port,
 #define PAIR(n,v,e) do { \
                if(!(vp = paircreate(n, 0))) {  \
                        request_free(&stopreq); \
-                       radlog(L_ERR|L_CONS, "no memory"); \
+                       radlog(L_ERR, "no memory"); \
                        pairfree(&(stopreq->packet->vps)); \
                        return 0; \
                } \
@@ -65,7 +65,7 @@ int session_zap(REQUEST *request, uint32_t nasaddr, unsigned int port,
 #define STRINGPAIR(n,v) do { \
        if(!(vp = paircreate(n, 0))) {  \
                request_free(&stopreq); \
-               radlog(L_ERR|L_CONS, "no memory"); \
+               radlog(L_ERR, "no memory"); \
                pairfree(&(stopreq->packet->vps)); \
                return 0; \
        } \
index 56decf23f0bd8d5f44ceafc7420c495443d99ee5..b3993209b698423897cadd34968927023d211fd3 100644 (file)
@@ -80,7 +80,7 @@ static rlm_rcode_t str2rcode(const char *s)
        else if(!strcasecmp(s, "updated"))
                return RLM_MODULE_UPDATED;
        else {
-               radlog(L_ERR|L_CONS,
+               radlog(L_ERR,
                        "rlm_always: Unknown module rcode '%s'.\n", s);
                return RLM_MODULE_UNKNOWN;
        }
index 676c6719a035873a665ca084ce66a4784d578cc7..1ed3a41b44cff3d2ca632ce3fd54c3c678552dbb 100644 (file)
@@ -155,7 +155,7 @@ static int attr_filter_instantiate(CONF_SECTION *conf, void **instance)
 
        rcode = attr_filter_getfile(inst->file, &inst->attrs);
         if (rcode != 0) {
-               radlog(L_ERR|L_CONS, "Errors reading %s", inst->file);
+               radlog(L_ERR, "Errors reading %s", inst->file);
                attr_filter_detach(inst);
                return -1;
        }
index b59c529c2ee0b6986c4e82a396c891d2657355c8..9bdb8bfaa4cc15970707c3fe3975b5e0801bd3de 100644 (file)
@@ -203,7 +203,7 @@ static int eap_instantiate(CONF_SECTION *cs, void **instance)
        }
 
        if (num_types == 0) {
-               radlog(L_ERR|L_CONS, "rlm_eap: No EAP type configured, module cannot do anything.");
+               radlog(L_ERR, "rlm_eap: No EAP type configured, module cannot do anything.");
                eap_detach(inst);
                return -1;
        }
@@ -213,14 +213,14 @@ static int eap_instantiate(CONF_SECTION *cs, void **instance)
         */
        eap_type = eaptype_name2type(inst->default_eap_type_name);
        if (eap_type < 0) {
-               radlog(L_ERR|L_CONS, "rlm_eap: Unknown default EAP type %s",
+               radlog(L_ERR, "rlm_eap: Unknown default EAP type %s",
                       inst->default_eap_type_name);
                eap_detach(inst);
                return -1;
        }
 
        if (inst->types[eap_type] == NULL) {
-               radlog(L_ERR|L_CONS, "rlm_eap: No such sub-type for default EAP type %s",
+               radlog(L_ERR, "rlm_eap: No such sub-type for default EAP type %s",
                       inst->default_eap_type_name);
                eap_detach(inst);
                return -1;
@@ -238,7 +238,7 @@ static int eap_instantiate(CONF_SECTION *cs, void **instance)
         */
        inst->session_tree = rbtree_create(eap_handler_cmp, NULL, 0);
        if (!inst->session_tree) {
-               radlog(L_ERR|L_CONS, "rlm_eap: Cannot initialize tree");
+               radlog(L_ERR, "rlm_eap: Cannot initialize tree");
                eap_detach(inst);
                return -1;
        }
@@ -246,14 +246,14 @@ static int eap_instantiate(CONF_SECTION *cs, void **instance)
        if (fr_debug_flag) {
                inst->handler_tree = rbtree_create(eap_handler_ptr_cmp, NULL, 0);
                if (!inst->handler_tree) {
-                       radlog(L_ERR|L_CONS, "rlm_eap: Cannot initialize tree");
+                       radlog(L_ERR, "rlm_eap: Cannot initialize tree");
                        eap_detach(inst);
                        return -1;
                }
 
 #ifdef HAVE_PTHREAD_H
                if (pthread_mutex_init(&(inst->handler_mutex), NULL) < 0) {
-                       radlog(L_ERR|L_CONS, "rlm_eap: Failed initializing mutex: %s", strerror(errno));
+                       radlog(L_ERR, "rlm_eap: Failed initializing mutex: %s", strerror(errno));
                        eap_detach(inst);
                        return -1;
                }
@@ -262,7 +262,7 @@ static int eap_instantiate(CONF_SECTION *cs, void **instance)
 
 #ifdef HAVE_PTHREAD_H
        if (pthread_mutex_init(&(inst->session_mutex), NULL) < 0) {
-               radlog(L_ERR|L_CONS, "rlm_eap: Failed initializing mutex: %s", strerror(errno));
+               radlog(L_ERR, "rlm_eap: Failed initializing mutex: %s", strerror(errno));
                eap_detach(inst);
                return -1;
        }
index 2621886d810373dd81ba7269a0f1ae21578a61c5..395a3b390d4c2146cb0d4933dd21593d6cdb3b3f 100644 (file)
@@ -556,7 +556,7 @@ static int eap_instantiate(CONF_SECTION *cs, void **instance)
         */
        inst->session_tree = rbtree_create(eap_handler_cmp, NULL, 0);
        if (!inst->session_tree) {
-               radlog(L_ERR|L_CONS, "rlm_eap2: Cannot initialize tree");
+               radlog(L_ERR, "rlm_eap2: Cannot initialize tree");
                eap_detach(inst);
                return -1;
        }
@@ -604,7 +604,7 @@ static int eap_instantiate(CONF_SECTION *cs, void **instance)
                inst->methods[num_types] = eap_server_get_type(buffer,
                                                               &inst->vendors[num_types]);
                if (inst->methods[num_types] == EAP_TYPE_NONE) {
-                       radlog(L_ERR|L_CONS, "rlm_eap2: Unknown EAP type %s",
+                       radlog(L_ERR, "rlm_eap2: Unknown EAP type %s",
                               auth_type);
                        eap_detach(inst);
                        return -1;
@@ -630,7 +630,7 @@ static int eap_instantiate(CONF_SECTION *cs, void **instance)
        inst->num_types = num_types;
 
        if (do_tls && !has_tls) {
-               radlog(L_ERR|L_CONS, "rlm_eap2: TLS has not been configured.  Cannot do methods that need TLS.");
+               radlog(L_ERR, "rlm_eap2: TLS has not been configured.  Cannot do methods that need TLS.");
                eap_detach(inst);
                return -1;
        }
@@ -640,7 +640,7 @@ static int eap_instantiate(CONF_SECTION *cs, void **instance)
                 *      Initialize TLS.
                 */
                if (eap_example_server_init_tls(inst) < 0) {
-                       radlog(L_ERR|L_CONS, "rlm_eap2: Cannot initialize TLS");
+                       radlog(L_ERR, "rlm_eap2: Cannot initialize TLS");
                        eap_detach(inst);
                        return -1;
                }
index 8e266d58e18fb0f0e3ea260c702b734817921980..ac938bf6ebb02e31aa0b9ccf12026316e1b0eeb7 100644 (file)
@@ -357,14 +357,14 @@ static int file_instantiate(CONF_SECTION *conf, void **instance)
 
        rcode = getusersfile(inst->usersfile, &inst->users, inst->compat_mode);
        if (rcode != 0) {
-         radlog(L_ERR|L_CONS, "Errors reading %s", inst->usersfile);
+         radlog(L_ERR, "Errors reading %s", inst->usersfile);
                file_detach(inst);
                return -1;
        }
 
        rcode = getusersfile(inst->acctusersfile, &inst->acctusers, inst->compat_mode);
        if (rcode != 0) {
-               radlog(L_ERR|L_CONS, "Errors reading %s", inst->acctusersfile);
+               radlog(L_ERR, "Errors reading %s", inst->acctusersfile);
                file_detach(inst);
                return -1;
        }
@@ -375,14 +375,14 @@ static int file_instantiate(CONF_SECTION *conf, void **instance)
         */
        rcode = getusersfile(inst->preproxy_usersfile, &inst->preproxy_users, inst->compat_mode);
        if (rcode != 0) {
-               radlog(L_ERR|L_CONS, "Errors reading %s", inst->preproxy_usersfile);
+               radlog(L_ERR, "Errors reading %s", inst->preproxy_usersfile);
                file_detach(inst);
                return -1;
        }
 
        rcode = getusersfile(inst->postproxy_usersfile, &inst->postproxy_users, inst->compat_mode);
        if (rcode != 0) {
-               radlog(L_ERR|L_CONS, "Errors reading %s", inst->postproxy_usersfile);
+               radlog(L_ERR, "Errors reading %s", inst->postproxy_usersfile);
                file_detach(inst);
                return -1;
        }
@@ -390,14 +390,14 @@ static int file_instantiate(CONF_SECTION *conf, void **instance)
 
        rcode = getusersfile(inst->auth_usersfile, &inst->auth_users, inst->compat_mode);
        if (rcode != 0) {
-               radlog(L_ERR|L_CONS, "Errors reading %s", inst->auth_usersfile);
+               radlog(L_ERR, "Errors reading %s", inst->auth_usersfile);
                file_detach(inst);
                return -1;
        }
 
        rcode = getusersfile(inst->postauth_usersfile, &inst->postauth_users, inst->compat_mode);
        if (rcode != 0) {
-               radlog(L_ERR|L_CONS, "Errors reading %s", inst->postauth_usersfile);
+               radlog(L_ERR, "Errors reading %s", inst->postauth_usersfile);
                file_detach(inst);
                return -1;
        }
index 7f23cad4abc9887cd555cbd7b8540b44f530e5b7..f9c6b2b5108d9d424aa8da3a675e63e067243502 100644 (file)
@@ -88,7 +88,7 @@ void _otp_pthread_mutex_init(pthread_mutex_t *mutexp,
 
        rc = pthread_mutex_init(mutexp, attr);
        if (rc) {
-               radlog(L_ERR|L_CONS, "rlm_otp: %s: pthread_mutex_init: %s",
+               radlog(L_ERR, "rlm_otp: %s: pthread_mutex_init: %s",
                       caller, strerror(rc));
                       
                exit(1);
@@ -104,7 +104,7 @@ void _otp_pthread_mutex_lock(pthread_mutex_t *mutexp, const char *caller)
 
        rc = pthread_mutex_lock(mutexp);
        if (rc) {
-               radlog(L_ERR|L_CONS, "rlm_otp: %s: pthread_mutex_lock: %s",
+               radlog(L_ERR, "rlm_otp: %s: pthread_mutex_lock: %s",
                       caller, strerror(rc));
                       
                exit(1);
@@ -120,7 +120,7 @@ int _otp_pthread_mutex_trylock(pthread_mutex_t *mutexp, const char *caller)
 
        rc = pthread_mutex_trylock(mutexp);
        if (rc && rc != EBUSY) {
-               radlog(L_ERR|L_CONS, "rlm_otp: %s: pthread_mutex_trylock: %s",
+               radlog(L_ERR, "rlm_otp: %s: pthread_mutex_trylock: %s",
                       caller, strerror(rc));
                       
                exit(1);
@@ -138,7 +138,7 @@ void _otp_pthread_mutex_unlock(pthread_mutex_t *mutexp, const char *caller)
 
        rc = pthread_mutex_unlock(mutexp);
        if (rc) {
-               radlog(L_ERR|L_CONS, "rlm_otp: %s: pthread_mutex_unlock: %s",
+               radlog(L_ERR, "rlm_otp: %s: pthread_mutex_unlock: %s",
                       caller, strerror(rc));
                       
                exit(1);
index d7282d0d2e8bcbc2671a8e9b23d39ed48950ccbc..1891c93b4cd81886e94e3b33d0e613c8d032d5d6 100644 (file)
@@ -147,7 +147,7 @@ static int otp_instantiate(CONF_SECTION *conf, void **instance)
        }
        
        if (!opt->name) {
-               radlog(L_ERR|L_CONS, "rlm_otp: %s: no instance name "
+               radlog(L_ERR, "rlm_otp: %s: no instance name "
                       "(this can't happen)", __func__);
                free(opt);
                return -1;
index 5ef2f1721834217bf23a28d363d4e3148ff3b5a4..999b5ce1e029c5987a745650a7ec8abe8160ab90 100644 (file)
@@ -553,7 +553,7 @@ static int preprocess_instantiate(CONF_SECTION *conf, void **instance)
                rcode = pairlist_read(data->huntgroup_file,
                                      &(data->huntgroups), 0);
                if (rcode < 0) {
-                       radlog(L_ERR|L_CONS, "rlm_preprocess: Error reading %s",
+                       radlog(L_ERR, "rlm_preprocess: Error reading %s",
                               data->huntgroup_file);
                        return -1;
                }
@@ -565,7 +565,7 @@ static int preprocess_instantiate(CONF_SECTION *conf, void **instance)
        if (data->hints_file) {
                rcode = pairlist_read(data->hints_file, &(data->hints), 0);
                if (rcode < 0) {
-                       radlog(L_ERR|L_CONS, "rlm_preprocess: Error reading %s",
+                       radlog(L_ERR, "rlm_preprocess: Error reading %s",
                               data->hints_file);
                        return -1;
                }
index 2ac817fb11f1e088157d5e40a71f49c6bf953afe..5f0bd67e334376d13f6e793929b61d654179b62a 100644 (file)
@@ -112,7 +112,6 @@ static struct {
   A(L_INFO)
   A(L_ERR)
   A(L_PROXY)
-  A(L_CONS)
   A(RLM_MODULE_REJECT)
   A(RLM_MODULE_FAIL)
   A(RLM_MODULE_OK)
@@ -161,7 +160,7 @@ static PyMethodDef radiusd_methods[] = {
        { "radlog", &python_radlog, METH_VARARGS, 
          "radiusd.radlog(level, msg)\n\n" \
          "Print a message using radiusd logging system. level should be one of the\n" \
-         "constants L_DBG, L_AUTH, L_INFO, L_ERR, L_PROXY, L_CONS\n"
+         "constants L_DBG, L_AUTH, L_INFO, L_ERR, L_PROXY\n"
        },
        { NULL, NULL, 0, NULL },
 };
index 58a18ff25ce64e1bd170a2d8373700f359372ae5..a7139f98048f779d4ef6be88194a5f6fc6aaa67a 100644 (file)
@@ -336,7 +336,7 @@ static void add_proxy_to_realm(VALUE_PAIR **vps, REALM *realm)
         */
        vp = pairmake("Proxy-To-Realm", realm->name, T_OP_EQ);
        if (!vp) {
-               radlog(L_ERR|L_CONS, "no memory");
+               radlog(L_ERR, "no memory");
                exit(1);
        }
 
index b1a0c08005ff39ad73a687d6f069e7e4e8787966..385b8973fd0e85fc4ebe9946bf1e9a1155f7c373 100644 (file)
@@ -296,7 +296,6 @@ static struct varlookup {
     { "L_INFO", L_INFO},
     { "L_ERR", L_ERR},
     { "L_PROXY", L_PROXY},
-    { "L_CONS", L_CONS},
     { "RLM_MODULE_REJECT", RLM_MODULE_REJECT},
     { "RLM_MODULE_FAIL", RLM_MODULE_FAIL},
     { "RLM_MODULE_OK", RLM_MODULE_OK},
index 2e2abc881260065b58fcbf122f67e8f280a45e3e..c17d1b0297ac5c1ec5f61629994346384f6e8f08 100644 (file)
@@ -403,7 +403,7 @@ static SECURID_AUTH_RC securidAuth(void *instance, REQUEST *request,
                        return rc;
                                
                default:
-                       radlog(L_ERR|L_CONS, "rlm_securid: Invalid session state %d for user [%s]",
+                       radlog(L_ERR, "rlm_securid: Invalid session state %d for user [%s]",
                               pSecurid_session->securidSessionState,
                               username);
                        break;  
@@ -443,7 +443,7 @@ static rlm_rcode_t securid_instantiate(CONF_SECTION *conf, void **instance)
 
         /* If the configuration parameters can't be parsed, then fail. */
        if (cf_section_parse(conf, inst, module_config) < 0) {
-               radlog(L_ERR|L_CONS, "rlm_securid: Unable to parse configuration section.");
+               radlog(L_ERR, "rlm_securid: Unable to parse configuration section.");
                securid_detach(inst);
                return -1;
         }
@@ -454,7 +454,7 @@ static rlm_rcode_t securid_instantiate(CONF_SECTION *conf, void **instance)
         */
        inst->session_tree = rbtree_create(securid_session_cmp, NULL, 0);
        if (!inst->session_tree) {
-               radlog(L_ERR|L_CONS, "rlm_securid: Cannot initialize session tree.");
+               radlog(L_ERR, "rlm_securid: Cannot initialize session tree.");
                securid_detach(inst);
                return -1;
        }
index 8c4f20ad33cdc91b9a30e246daf5870aa9ee5c4c..3db22bb5033dd958828f89fd4ae35008a3565e9c 100644 (file)
@@ -409,7 +409,7 @@ static void _smsotp_pthread_mutex_init(pthread_mutex_t *mutexp, const pthread_mu
   int rc;
 
   if ((rc = pthread_mutex_init(mutexp, attr))) {
-    (void) radlog(L_ERR|L_CONS, "rlm_smsotp: %s: pthread_mutex_init: %s", caller, strerror(rc));
+    (void) radlog(L_ERR, "rlm_smsotp: %s: pthread_mutex_init: %s", caller, strerror(rc));
     exit(1);
   }
 }
@@ -420,7 +420,7 @@ static void _smsotp_pthread_mutex_lock(pthread_mutex_t *mutexp, const char *call
   int rc;
 
   if ((rc = pthread_mutex_lock(mutexp))) {
-    (void) radlog(L_ERR|L_CONS, "rlm_smsotp: %s: pthread_mutex_lock: %s", caller, strerror(rc));
+    (void) radlog(L_ERR, "rlm_smsotp: %s: pthread_mutex_lock: %s", caller, strerror(rc));
     exit(1);
   }
 }
@@ -432,7 +432,7 @@ static int _smsotp_pthread_mutex_trylock(pthread_mutex_t *mutexp, const char *ca
 
   rc = pthread_mutex_trylock(mutexp);
   if (rc && rc != EBUSY) {
-    (void) radlog(L_ERR|L_CONS, "rlm_smsotp: %s: pthread_mutex_trylock: %s", caller, strerror(rc));
+    (void) radlog(L_ERR, "rlm_smsotp: %s: pthread_mutex_trylock: %s", caller, strerror(rc));
     exit(1);
   }
 
@@ -445,7 +445,7 @@ static void _smsotp_pthread_mutex_unlock(pthread_mutex_t *mutexp, const char *ca
   int rc;
 
   if ((rc = pthread_mutex_unlock(mutexp))) {
-    (void) radlog(L_ERR|L_CONS, "rlm_smsotp: %s: pthread_mutex_unlock: %s", caller, strerror(rc));
+    (void) radlog(L_ERR, "rlm_smsotp: %s: pthread_mutex_unlock: %s", caller, strerror(rc));
     exit(1);
   }
 }
index 6bbb9b808725d99c2c42baba2603a3815338ca47..4763ffaa258e711c878aa14824ea689d9fa848a6 100644 (file)
@@ -85,7 +85,7 @@ static int str2rcode(const char *s)
        else if(!strcasecmp(s, "updated"))
                return RLM_MODULE_UPDATED;
        else {
-               radlog(L_ERR|L_CONS,
+               radlog(L_ERR,
                        "rlm_sometimes: Unknown module rcode '%s'.\n", s);
                return -1;
        }
index d73e6e01867eba1902627745d70fbbce22d2e723..d0fc690994da807068a782b0117baedb78e98f52 100644 (file)
@@ -72,7 +72,7 @@ static int sql_init_socket(SQLSOCK *sqlsocket, SQL_CONFIG *config) {
 
        rcode = SQLAllocEnv(&iodbc_sock->env_handle);
        if (!SQL_SUCCEEDED(rcode)) {
-               radlog(L_CONS|L_ERR, "sql_create_socket: SQLAllocEnv failed:  %s",
+               radlog(L_ERR, "sql_create_socket: SQLAllocEnv failed:  %s",
                                sql_error(sqlsocket, config));
                return -1;
        }
@@ -80,7 +80,7 @@ static int sql_init_socket(SQLSOCK *sqlsocket, SQL_CONFIG *config) {
        rcode = SQLAllocConnect(iodbc_sock->env_handle,
                                &iodbc_sock->dbc_handle);
        if (!SQL_SUCCEEDED(rcode)) {
-               radlog(L_CONS|L_ERR, "sql_create_socket: SQLAllocConnect failed:  %s",
+               radlog(L_ERR, "sql_create_socket: SQLAllocConnect failed:  %s",
                                sql_error(sqlsocket, config));
                return -1;
        }
@@ -89,7 +89,7 @@ static int sql_init_socket(SQLSOCK *sqlsocket, SQL_CONFIG *config) {
                           SQL_NTS, config->sql_login, SQL_NTS,
                           config->sql_password, SQL_NTS);
        if (!SQL_SUCCEEDED(rcode)) {
-               radlog(L_CONS|L_ERR, "sql_create_socket: SQLConnectfailed:  %s",
+               radlog(L_ERR, "sql_create_socket: SQLConnectfailed:  %s",
                                sql_error(sqlsocket, config));
                return -1;
        }
@@ -127,7 +127,7 @@ static int sql_query(SQLSOCK *sqlsocket, SQL_CONFIG *config, char *querystr) {
        rcode = SQLAllocStmt(iodbc_sock->dbc_handle,
                             &iodbc_sock->stmt_handle);
        if (!SQL_SUCCEEDED(rcode)) {
-               radlog(L_CONS|L_ERR, "sql_create_socket: SQLAllocStmt failed:  %s",
+               radlog(L_ERR, "sql_create_socket: SQLAllocStmt failed:  %s",
                                sql_error(sqlsocket, config));
                return -1;
        }
@@ -139,7 +139,7 @@ static int sql_query(SQLSOCK *sqlsocket, SQL_CONFIG *config, char *querystr) {
 
        rcode = SQLExecDirect(iodbc_sock->stmt_handle, querystr, SQL_NTS);
        if (!SQL_SUCCEEDED(rcode)) {
-               radlog(L_CONS|L_ERR, "sql_query: failed:  %s",
+               radlog(L_ERR, "sql_query: failed:  %s",
                                sql_error(sqlsocket, config));
                return -1;
        }
index a068c25081d6425e8126b76215bcbc3a92a1926a..ce78623a7eb4be731f0a405014e46752a775b0f2 100644 (file)
@@ -342,7 +342,7 @@ static int generate_sql_clients(SQL_INST *inst)
                 *      Always get the numeric representation of IP
                 */
                if (ip_hton(row[1], AF_UNSPEC, &c->ipaddr) < 0) {
-                       radlog(L_CONS|L_ERR, "rlm_sql (%s): Failed to look up hostname %s: %s",
+                       radlog(L_ERR, "rlm_sql (%s): Failed to look up hostname %s: %s",
                               inst->config->xlat_name,
                               row[1], fr_strerror());
                        free(c);
index 02cb305e114c4ecf699f95faf11766806b040c78..d42d2f84ad10e6d22288c371a11b3233a326ef39 100644 (file)
@@ -395,7 +395,7 @@ int sql_getvpdata(SQL_INST * inst, SQLSOCK **sqlsocket, VALUE_PAIR **pair, char
                if (!row)
                        break;
                if (sql_userparse(pair, row) != 0) {
-                       radlog(L_ERR | L_CONS, "rlm_sql (%s): Error getting data from database", inst->config->xlat_name);
+                       radlog(L_ERR, "rlm_sql (%s): Error getting data from database", inst->config->xlat_name);
                        
                        (inst->module->sql_finish_select_query)(*sqlsocket, inst->config);