From f840cbf226333e2ca4126f854e63a51640d5a2f5 Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Sun, 22 Nov 2009 16:47:29 +0100 Subject: [PATCH] More warnings Modifying the values of a virtual attribute is a bad idea. --- src/main/evaluate.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/evaluate.c b/src/main/evaluate.c index 96283da..fc86424 100644 --- a/src/main/evaluate.c +++ b/src/main/evaluate.c @@ -1316,6 +1316,12 @@ int radius_update_attrlist(REQUEST *request, CONF_SECTION *cs, cp = cf_itemtopair(ci); +#ifndef NDEBUG + if (debug_flag && radius_find_compare(vp->attribute)) { + DEBUG("WARNING: You are modifying the value of virtual attribute %s. This is not supported.", vp->name); + } +#endif + /* * The VP && CF lists should be in sync. If they're * not, panic. -- 2.1.4