More warnings
authorAlan T. DeKok <aland@freeradius.org>
Sun, 22 Nov 2009 15:47:29 +0000 (16:47 +0100)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 22 Nov 2009 15:47:29 +0000 (16:47 +0100)
Modifying the values of a virtual attribute is a bad idea.

src/main/evaluate.c

index 96283da..fc86424 100644 (file)
@@ -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.