]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Add more debug output when applying suspension profiles
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 23 Feb 2024 22:13:08 +0000 (15:13 -0700)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 23 Feb 2024 22:13:08 +0000 (15:13 -0700)
src/modules/rlm_ldap/rlm_ldap.c

index 81286197801346b04a92cb850b3afc4a39984915..99e83529e22f00b1d694e5fd3d929a32233b3dda 100644 (file)
@@ -1650,6 +1650,12 @@ static unlang_action_t mod_authorize_resume(rlm_rcode_t *p_result, UNUSED int *p
                        if (inst->profile_attr) {
                                autz_ctx->profile_values = ldap_get_values_len(handle, autz_ctx->entry, inst->profile_attr);
 
+                               if (autz_ctx->profile_values) {
+                                       RDEBUG2("Processing profile(s) found in attribute \"%s\"", inst->profile_attr);
+                               } else {
+                                       RDEBUG2("No profile(s) found in attribute \"%s\"", inst->profile_attr);
+                               }
+
                                if (RDEBUG_ENABLED3) {
                                        for (struct berval **bv_p = autz_ctx->profile_values; *bv_p; bv_p++) {
                                                RDEBUG3("Will evaluate profile with DN \"%pV\"", fr_box_strvalue_len((*bv_p)->bv_val, (*bv_p)->bv_len));
@@ -1662,9 +1668,16 @@ static unlang_action_t mod_authorize_resume(rlm_rcode_t *p_result, UNUSED int *p
                        if (inst->profile_attr_suspend) {
                                autz_ctx->profile_values = ldap_get_values_len(handle, autz_ctx->entry, inst->profile_attr_suspend);
 
+                               if (autz_ctx->profile_values) {
+                                       RDEBUG2("Processing suspension profile(s) found in attribute \"%s\"", inst->profile_attr_suspend);
+                               } else {
+                                       RDEBUG2("No suspension profile(s) found in attribute \"%s\"", inst->profile_attr_suspend);
+                               }
+
                                if (RDEBUG_ENABLED3) {
                                        for (struct berval **bv_p = autz_ctx->profile_values; *bv_p; bv_p++) {
-                                               RDEBUG3("Will evaluate suspended profile with DN \"%pV\"", fr_box_strvalue_len((*bv_p)->bv_val, (*bv_p)->bv_len));
+                                               RDEBUG3("Will evaluate suspenension profile with DN \"%pV\"",
+                                                       fr_box_strvalue_len((*bv_p)->bv_val, (*bv_p)->bv_len));
                                        }
                                }
                        }