BIND 10 trac1104, updated. 566d284cd664a78255f5fbc8881ee8996f835960 [trac1104] some minor editroial fixes to comments

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Jul 21 23:24:44 UTC 2011


The branch, trac1104 has been updated
       via  566d284cd664a78255f5fbc8881ee8996f835960 (commit)
       via  8d8c3bc259f8b549a2fbace562afb0984cd427ba (commit)
       via  6a204908cb3f11ba7635d5e0a97a196856fb5748 (commit)
       via  489f9a3bf2078969f746a47a49fdc17d94f898d3 (commit)
      from  67f6e4baa87b5555f3bc13919707a3f3180d57f4 (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 566d284cd664a78255f5fbc8881ee8996f835960
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Thu Jul 21 16:13:34 2011 -0700

    [trac1104] some minor editroial fixes to comments

commit 8d8c3bc259f8b549a2fbace562afb0984cd427ba
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Thu Jul 21 16:11:54 2011 -0700

    [trac1104] updated the head note (which was a niave copy of the logging
    module implementation that uses a similar techinique).

commit 6a204908cb3f11ba7635d5e0a97a196856fb5748
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Thu Jul 21 16:03:00 2011 -0700

    [trac1104] fixed test domain name

commit 489f9a3bf2078969f746a47a49fdc17d94f898d3
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Thu Jul 21 16:00:48 2011 -0700

    [trac1104] removed redundant TSIG key addition to the key ring.
    also added assertEqual checks to catch such naive redundant copies in case
    that happens again.

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

Summary of changes:
 src/bin/xfrout/tests/xfrout_test.py.in             |    8 ++++----
 src/lib/acl/tests/dnsname_check_unittest.cc        |    2 +-
 src/lib/python/isc/acl/_dns.py                     |   12 ++++--------
 .../python/isc/acl/dns_requestcontext_python.cc    |    4 ++--
 4 files changed, 11 insertions(+), 15 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/bin/xfrout/tests/xfrout_test.py.in b/src/bin/xfrout/tests/xfrout_test.py.in
index 44ae1d3..62c7708 100644
--- a/src/bin/xfrout/tests/xfrout_test.py.in
+++ b/src/bin/xfrout/tests/xfrout_test.py.in
@@ -137,7 +137,8 @@ class TestXfroutSession(unittest.TestCase):
         self.assertEqual(rcode.to_text(), "NOTAUTH")
         self.assertTrue(self.xfrsess._tsig_ctx is not None)
         # NOERROR
-        self.xfrsess._tsig_key_ring.add(TSIG_KEY)
+        self.assertEqual(TSIGKeyRing.SUCCESS,
+                         self.xfrsess._tsig_key_ring.add(TSIG_KEY))
         [rcode, msg] = self.xfrsess._parse_query_message(request_data)
         self.assertEqual(rcode.to_text(), "NOERROR")
         self.assertTrue(self.xfrsess._tsig_ctx is not None)
@@ -176,7 +177,8 @@ class TestXfroutSession(unittest.TestCase):
         self.xfrsess._acl = isc.acl.dns.REQUEST_LOADER.load([
             {"key": "example.com", "action": "ACCEPT"}, {"action": "REJECT"}
         ])
-        self.xfrsess._tsig_key_ring.add(TSIG_KEY)
+        self.assertEqual(TSIGKeyRing.SUCCESS,
+                         self.xfrsess._tsig_key_ring.add(TSIG_KEY))
         [rcode, msg] = self.xfrsess._parse_query_message(request_data)
         self.assertEqual(rcode.to_text(), "NOERROR")
 
@@ -184,7 +186,6 @@ class TestXfroutSession(unittest.TestCase):
         self.xfrsess._acl = isc.acl.dns.REQUEST_LOADER.load([
             {"key": "example.org", "action": "ACCEPT"}, {"action": "REJECT"}
         ])
-        self.xfrsess._tsig_key_ring.add(TSIG_KEY)
         [rcode, msg] = self.xfrsess._parse_query_message(request_data)
         self.assertEqual(rcode.to_text(), "REFUSED")
 
@@ -192,7 +193,6 @@ class TestXfroutSession(unittest.TestCase):
         self.xfrsess._acl = isc.acl.dns.REQUEST_LOADER.load([
             {"key": "example.org", "action": "ACCEPT"}, {"action": "REJECT"}
         ])
-        self.xfrsess._tsig_key_ring.add(TSIG_KEY)
         [rcode, msg] = self.xfrsess._parse_query_message(self.mdata)
         self.assertEqual(rcode.to_text(), "REFUSED")
 
diff --git a/src/lib/acl/tests/dnsname_check_unittest.cc b/src/lib/acl/tests/dnsname_check_unittest.cc
index 0f6ffd0..95b5314 100644
--- a/src/lib/acl/tests/dnsname_check_unittest.cc
+++ b/src/lib/acl/tests/dnsname_check_unittest.cc
@@ -53,7 +53,7 @@ TEST(DNSNameCheck, match) {
     EXPECT_TRUE(check.matches(Name("EXAMPLE.COM")));
 
     // this is exact match.  so super/sub domains don't match
-    EXPECT_FALSE(check.matches(Name("org")));
+    EXPECT_FALSE(check.matches(Name("com")));
     EXPECT_FALSE(check.matches(Name("www.example.com")));
 }
 } // Unnamed namespace
diff --git a/src/lib/python/isc/acl/_dns.py b/src/lib/python/isc/acl/_dns.py
index 3bef6e3..a645a7b 100644
--- a/src/lib/python/isc/acl/_dns.py
+++ b/src/lib/python/isc/acl/_dns.py
@@ -13,14 +13,10 @@
 # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
 # WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
-# This file is not installed. The log.so is installed into the right place.
-# It is only to find it in the .libs directory when we run as a test or
-# from the build directory.
-# But as nobody gives us the builddir explicitly (and we can't use generation
-# from .in file, as it would put us into the builddir and we wouldn't be found)
-# we guess from current directory. Any idea for something better? This should
-# be enough for the tests, but would it work for B10_FROM_SOURCE as well?
-# Should we look there? Or define something in bind10_config?
+# This file is not installed; The .so version will be installed into the right
+# place at installation time.
+# This helper script is only to find it in the .libs directory when we run
+# as a test or from the build directory.
 
 import os
 import sys
diff --git a/src/lib/python/isc/acl/dns_requestcontext_python.cc b/src/lib/python/isc/acl/dns_requestcontext_python.cc
index 41d92f1..7f33f59 100644
--- a/src/lib/python/isc/acl/dns_requestcontext_python.cc
+++ b/src/lib/python/isc/acl/dns_requestcontext_python.cc
@@ -136,7 +136,7 @@ private:
         // wire format.  If some evil or buggy python program directly calls
         // us with bogus data, validation in libdns++ will trigger an
         // exception, which will be caught and converted to a Python exception
-        // RequestContext_init().
+        // in RequestContext_init().
         isc::util::InputBuffer b(tsig_data, tsig_len);
         const Name key_name(b);
         const RRType tsig_type(b.readUint16());
@@ -220,7 +220,7 @@ RequestContext_init(PyObject* po_self, PyObject* args, PyObject*) {
                              &remote_flowinfo, &remote_zoneid,
                              &tsig_data, &tsig_len))
         {
-            // We need to clear the error in case the first call to PareTuple
+            // We need to clear the error in case the first call to ParseTuple
             // fails.
             PyErr_Clear();
 




More information about the bind10-changes mailing list