projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b7c9d5
)
Unknown types in CONF_PARSER are catastrophic failures
author
Alan T. DeKok
<aland@freeradius.org>
Wed, 20 Feb 2013 04:32:10 +0000
(23:32 -0500)
committer
Alan T. DeKok
<aland@freeradius.org>
Wed, 20 Feb 2013 04:32:10 +0000
(23:32 -0500)
src/main/conffile.c
patch
|
blob
|
history
diff --git
a/src/main/conffile.c
b/src/main/conffile.c
index
3371d5f
..
3e6bcbb
100644
(file)
--- a/
src/main/conffile.c
+++ b/
src/main/conffile.c
@@
-955,7
+955,16
@@
int cf_item_parse(CONF_SECTION *cs, const char *name,
break;
default:
- radlog(L_ERR, "type %d not supported yet", type);
+ /*
+ * If we get here, it's a sanity check error.
+ * It's not an error parsing the configuration
+ * file.
+ */
+ rad_assert(type > PW_TYPE_INVALID);
+ rad_assert(type < PW_TYPE_MAX);
+
+ radlog(L_ERR, "type '%s' is not supported in the configuration files",
+ fr_int2str(dict_attr_types, type, "?Unknown?"));
return -1;
} /* switch over variable type */