summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2010-10-18 18:53:30 -0700
committerAn-Cheng Huang <ancheng@vyatta.com>2010-10-18 18:53:30 -0700
commitaea223efd75647e31e4f9c2a6836b58d289f7371 (patch)
tree72e4ced944a10b94a5bd36559b227710dbd23508
parent462f91ccaddad767f06f588ef9c0d21ab89fe88f (diff)
downloadvyatta-cfg-aea223efd75647e31e4f9c2a6836b58d289f7371.tar.gz
vyatta-cfg-aea223efd75647e31e4f9c2a6836b58d289f7371.zip
temporary workaround for bug 5708
* disallow deactivate on leaf nodes. revisit after "default value"-related issues are resolved.
-rw-r--r--src/cstore/cstore.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/cstore/cstore.cpp b/src/cstore/cstore.cpp
index 11cdb30..a52cae1 100644
--- a/src/cstore/cstore.cpp
+++ b/src/cstore/cstore.cpp
@@ -2022,6 +2022,17 @@ Cstore::validate_act_deact(const vector<string>& path_comps, const string& op,
output_user("%s\n", terr.c_str());
return false;
}
+ {
+ /* XXX this is a temporary workaround for bug 5708, which should be
+ * addressed _after_ the "default value"-related issues have been
+ * resolved (see bug for more details). once those are resolved,
+ * this workaround should be removed and the bug fixed properly.
+ */
+ if (!def.tag && def.def_type != ERROR_TYPE) {
+ output_user("Cannot %s a leaf configuration node\n", op.c_str());
+ return false;
+ }
+ }
if (def.is_value && !def.tag) {
/* last component is a value of a single- or multi-value node (i.e.,
* a leaf value) => not allowed