BIND 10 trac1627, updated. f5d82c257cd8251a5cb47234d527d7deeded5051 [1627] Check for empty origin and file in config, and throw with more relevant error msg

BIND 10 source code commits bind10-changes at lists.isc.org
Tue Mar 27 07:10:23 UTC 2012


The branch, trac1627 has been updated
       via  f5d82c257cd8251a5cb47234d527d7deeded5051 (commit)
      from  7efd7463b051d3dc8babb54d910e27ab471c3a49 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f5d82c257cd8251a5cb47234d527d7deeded5051
Author: Mukund Sivaraman <muks at isc.org>
Date:   Tue Mar 27 12:33:38 2012 +0530

    [1627] Check for empty origin and file in config, and throw with more relevant error msg

-----------------------------------------------------------------------

Summary of changes:
 src/bin/auth/auth_config.cc |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/bin/auth/auth_config.cc b/src/bin/auth/auth_config.cc
index c6d8ecf..e2961b4 100644
--- a/src/bin/auth/auth_config.cc
+++ b/src/bin/auth/auth_config.cc
@@ -155,11 +155,13 @@ MemoryDatasourceConfig::build(ConstElementPtr config_value) {
 
     BOOST_FOREACH(ConstElementPtr zone_config, zones_config->listValue()) {
         ConstElementPtr origin = zone_config->get("origin");
-        if (!origin) {
+        const string origin_txt = origin ? origin->stringValue() : "";
+        if (origin_txt.empty()) {
             isc_throw(AuthConfigError, "Missing zone origin");
         }
         ConstElementPtr file = zone_config->get("file");
-        if (!file) {
+        const string file_txt = file ? file->stringValue() : "";
+        if (file_txt.empty()) {
             isc_throw(AuthConfigError, "Missing zone file for zone: "
                       << origin->str());
         }



More information about the bind10-changes mailing list