]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Increase debug level required to show missing attribute messages in rlm_ldap
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 5 Dec 2013 10:24:58 +0000 (10:24 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 5 Dec 2013 10:24:58 +0000 (10:24 +0000)
src/modules/rlm_ldap/attrmap.c
src/modules/rlm_ldap/clients.c
src/modules/rlm_ldap/ldap.h

index df5d7a28d13cfee19ee3eba3733d90ca65dfef49..795ea00e595eaecbf63d74448afcaf25cf08e7df 100644 (file)
@@ -267,7 +267,7 @@ void rlm_ldap_map_do(UNUSED const ldap_instance_t *inst, REQUEST *request, LDAP
 
                result.values = ldap_get_values(handle, entry, name);
                if (!result.values) {
-                       RDEBUG2("Attribute \"%s\" not found in LDAP object", name);
+                       RDEBUG3("Attribute \"%s\" not found in LDAP object", name);
 
                        goto next;
                }
index 6b6e09110ca55ad2c5a11b9b591fd01431438f20..87931eef35ee45d34af347bb52aa762f1deead06 100644 (file)
@@ -168,28 +168,28 @@ int rlm_ldap_load_clients(ldap_instance_t const *inst)
                if (inst->clientobj_shortname) {
                        shortname = ldap_get_values(conn->handle, entry, inst->clientobj_shortname);
                        if (!shortname) {
-                               LDAP_DBG("Client \"%s\" missing optional attribute 'shortname'", dn);
+                               LDAP_DBG3("Client \"%s\" missing optional attribute 'shortname'", dn);
                        }
                }
 
                if (inst->clientobj_type) {
                        type = ldap_get_values(conn->handle, entry, inst->clientobj_type);
                        if (!type) {
-                               LDAP_DBG("Client \"%s\" missing optional attribute 'type'", dn);
+                               LDAP_DBG3("Client \"%s\" missing optional attribute 'type'", dn);
                        }
                }
 
                if (inst->clientobj_server) {
                        server = ldap_get_values(conn->handle, entry, inst->clientobj_server);
                        if (!server) {
-                               LDAP_DBG("Client \"%s\" missing optional attribute 'server'", dn);
+                               LDAP_DBG3("Client \"%s\" missing optional attribute 'server'", dn);
                        }
                }
 
                if (inst->clientobj_require_ma) {
                        require_ma = ldap_get_values(conn->handle, entry, inst->clientobj_require_ma);
                        if (!require_ma) {
-                               LDAP_DBG("Client \"%s\" missing optional attribute 'require_ma'", dn);
+                               LDAP_DBG3("Client \"%s\" missing optional attribute 'require_ma'", dn);
                        }
                }
 
index f6cc9372c1e3ae3bcc3213f7a831580e8258c6b8..0ee586ac18317b401c12bc544041d3e37d4a91ed 100644 (file)
@@ -266,6 +266,12 @@ typedef enum {
 #define LDAP_DBG(fmt, ...) radlog(L_DBG, "rlm_ldap (%s): " fmt, inst->xlat_name, ##__VA_ARGS__)
 #define LDAP_DBG_REQ(fmt, ...) do { if (request) {RDEBUG(fmt, ##__VA_ARGS__);} else {LDAP_DBG(fmt, ##__VA_ARGS__);}} while (0)
 
+#define LDAP_DBG2(fmt, ...) if (debug_flag >= L_DBG_LVL_2) radlog(L_DBG, "rlm_ldap (%s): " fmt, inst->xlat_name, ##__VA_ARGS__)
+#define LDAP_DBG_REQ2(fmt, ...) do { if (request) {RDEBUG2(fmt, ##__VA_ARGS__);} else if (debug_flag >= L_DBG_LVL_2) {LDAP_DBG(fmt, ##__VA_ARGS__);}} while (0)
+
+#define LDAP_DBG3(fmt, ...) if (debug_flag >= L_DBG_LVL_3) radlog(L_DBG, "rlm_ldap (%s): " fmt, inst->xlat_name, ##__VA_ARGS__)
+#define LDAP_DBG_REQ3(fmt, ...) do { if (request) {RDEBUG3(fmt, ##__VA_ARGS__);} else if (debug_flag >= L_DBG_LVL_3) {LDAP_DBG(fmt, ##__VA_ARGS__);}} while (0)
+
 #define LDAP_ERR(fmt, ...) ERROR("rlm_ldap (%s): " fmt, inst->xlat_name, ##__VA_ARGS__)
 #define LDAP_ERR_REQ(fmt, ...) do { if (request) {REDEBUG(fmt, ##__VA_ARGS__);} else {LDAP_ERR(fmt, ##__VA_ARGS__);}} while (0)