From aea223efd75647e31e4f9c2a6836b58d289f7371 Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Mon, 18 Oct 2010 18:53:30 -0700 Subject: temporary workaround for bug 5708 * disallow deactivate on leaf nodes. revisit after "default value"-related issues are resolved. --- src/cstore/cstore.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) 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& 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 -- cgit v1.2.3