diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2007-10-31 15:38:46 -0700 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2007-10-31 15:38:46 -0700 |
commit | 03aa6e3af09e3d12d877d459a973898a12b2e5ee (patch) | |
tree | 8f3f5253325791c53577d05bc0bc91804c16d1b4 /src | |
parent | b3121cf6e2e025f42cb0686dcf47488e085881a0 (diff) | |
download | vyatta-cfg-03aa6e3af09e3d12d877d459a973898a12b2e5ee.tar.gz vyatta-cfg-03aa6e3af09e3d12d877d459a973898a12b2e5ee.zip |
fix cli backend bug: disallow setting values for type-less nodes.
Diffstat (limited to 'src')
-rw-r--r-- | src/set.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -69,6 +69,12 @@ boolean set_validate(vtw_def *defp, char *valp, boolean empty_val) free(path_end); path_end=NULL; } + if (defp->def_type == ERROR_TYPE) { + /* no type in def. setting value not allowed. */ + fprintf(out_stream, "The specified configuration node is not valid\n"); + bye("Can not set value: no type for %s, template %s", + m_path.path, t_path.path); + } if (empty_val) { if (defp->def_type != TEXT_TYPE || defp->tag || defp->multi){ printf("Empty string may be assigned only to TEXT type leaf node\n"); |