This bug reported a sysconfig agent crash due to an unhandled exception
when the is_postboot_configured property was set to an incompatible
value (string instead of an int).
In my opinion, this property should just be removed. Any intended usage
of this flag should be replaced with using the is_configured method.
Signed-off-by: Russell Bryant <rbryant(a)redhat.com>
---
src/sysconfig/schema.xml | 1 -
src/sysconfig/sysconfig-qmf.cpp | 2 --
2 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/src/sysconfig/schema.xml b/src/sysconfig/schema.xml
index 24197c6..7f11043 100644
--- a/src/sysconfig/schema.xml
+++ b/src/sysconfig/schema.xml
@@ -4,7 +4,6 @@
<class name="Sysconfig">
<property name="uuid" type="sstr" access="RO" desc="Host UUID" />
<property name="hostname" type="sstr" access="RO" desc="Hostname" index="y"/>
- <property name="is_postboot_configured" type="uint32" access="RO" desc="Check if agent is configured." />
<statistic name="qmf-gen-no-crash" type="absTime" desc="Dummy stat to stop qmf-gen from crashing." />
diff --git a/src/sysconfig/sysconfig-qmf.cpp b/src/sysconfig/sysconfig-qmf.cpp
index 442d27a..6cbe54b 100644
--- a/src/sysconfig/sysconfig-qmf.cpp
+++ b/src/sysconfig/sysconfig-qmf.cpp
@@ -69,7 +69,6 @@ ConfigAgent::setup(qmf::AgentSession session)
_instance.setProperty("hostname", mh_hostname());
_instance.setProperty("uuid", mh_uuid());
- _instance.setProperty("is_postboot_configured", 0);
session.addData(_instance, SYSCONFIG_NAME);
return 0;
@@ -109,7 +108,6 @@ ConfigAgent::invoke(qmf::AgentSession session, qmf::AgentEvent event, gpointer u
event.addReturnArgument("query", data);
} else if (methodName == "is_configured") {
status = mh_sysconfig_is_configured(args["key"].asString().c_str());
- _instance.setProperty("is_postboot_configured", status);
event.addReturnArgument("status", status);
} else {
session.raiseException(event, MH_NOT_IMPLEMENTED);
--
1.7.6