Don't print secrets for old realms. Fixes #1267
authorAlan T. DeKok <aland@freeradius.org>
Thu, 24 Sep 2015 13:40:36 +0000 (09:40 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 24 Sep 2015 13:40:59 +0000 (09:40 -0400)
src/main/realms.c

index d4fea6c..3ed4686 100644 (file)
@@ -1692,7 +1692,13 @@ static int old_realm_config(realm_config_t *rc, CONF_SECTION *cs, REALM *r)
                }
        }
 
-       if (secret) cf_log_info(cs, "\tsecret = %s", secret);
+       if (secret) {
+               if (rad_debug_lvl <= 2) {
+                       cf_log_info(cs, "\tsecret = <<< secret >>>");
+               } else {
+                       cf_log_info(cs, "\tsecret = %s", secret);
+               }
+       }
 
        return 1;