From 27c1fa93a0b4cef925ddbc69e6cd2bdb78240fea Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Mon, 10 Jul 2000 11:39:51 +0000 Subject: [PATCH] use rndc instead of kill to reload the servers ... with the added benefit that now the body of this test should pass on BSD/OS --- bin/tests/system/views/ns2/named1.conf | 11 ++++++++++- bin/tests/system/views/ns2/named2.conf | 11 ++++++++++- bin/tests/system/views/ns3/named1.conf | 11 ++++++++++- bin/tests/system/views/ns3/named2.conf | 11 ++++++++++- bin/tests/system/views/rndc.conf | 27 ++++++++++++++++++++++++++ bin/tests/system/views/tests.sh | 8 ++++---- 6 files changed, 71 insertions(+), 8 deletions(-) create mode 100644 bin/tests/system/views/rndc.conf diff --git a/bin/tests/system/views/ns2/named1.conf b/bin/tests/system/views/ns2/named1.conf index d67c7daaac..523a6853b0 100644 --- a/bin/tests/system/views/ns2/named1.conf +++ b/bin/tests/system/views/ns2/named1.conf @@ -15,7 +15,7 @@ * SOFTWARE. */ -/* $Id: named1.conf,v 1.7 2000/06/22 21:52:52 tale Exp $ */ +/* $Id: named1.conf,v 1.8 2000/07/10 11:39:47 tale Exp $ */ options { query-source address 10.53.0.2; @@ -27,6 +27,15 @@ options { notify yes; }; +key rndc_key { + secret "1234abcd8765"; + algorithm hmac-md5; +}; + +controls { + inet 10.53.0.2 port 9953 allow { 10.53.0.2; } keys { rndc_key; }; +}; + zone "." { type hint; file "root.hint"; diff --git a/bin/tests/system/views/ns2/named2.conf b/bin/tests/system/views/ns2/named2.conf index dc115904ac..b78dbf6213 100644 --- a/bin/tests/system/views/ns2/named2.conf +++ b/bin/tests/system/views/ns2/named2.conf @@ -15,7 +15,7 @@ * SOFTWARE. */ -/* $Id: named2.conf,v 1.7 2000/06/22 21:52:53 tale Exp $ */ +/* $Id: named2.conf,v 1.8 2000/07/10 11:39:48 tale Exp $ */ options { query-source address 10.53.0.2; @@ -28,6 +28,15 @@ options { notify yes; }; +key rndc_key { + secret "1234abcd8765"; + algorithm hmac-md5; +}; + +controls { + inet 10.53.0.2 port 11953 allow { 10.53.0.2; } keys { rndc_key; }; +}; + view "internal" { match-clients { 10.53.0.2; 10.53.0.3; }; diff --git a/bin/tests/system/views/ns3/named1.conf b/bin/tests/system/views/ns3/named1.conf index 58a5140a93..7c742dd9a6 100644 --- a/bin/tests/system/views/ns3/named1.conf +++ b/bin/tests/system/views/ns3/named1.conf @@ -15,7 +15,7 @@ * SOFTWARE. */ -/* $Id: named1.conf,v 1.8 2000/06/22 21:52:57 tale Exp $ */ +/* $Id: named1.conf,v 1.9 2000/07/10 11:39:50 tale Exp $ */ options { query-source address 10.53.0.3; @@ -29,6 +29,15 @@ options { notify yes; }; +key rndc_key { + secret "1234abcd8765"; + algorithm hmac-md5; +}; + +controls { + inet 10.53.0.3 port 9953 allow { 10.53.0.3; } keys { rndc_key; }; +}; + zone "." { type hint; file "root.hint"; diff --git a/bin/tests/system/views/ns3/named2.conf b/bin/tests/system/views/ns3/named2.conf index f0d32bcc98..d0acb692c3 100644 --- a/bin/tests/system/views/ns3/named2.conf +++ b/bin/tests/system/views/ns3/named2.conf @@ -15,7 +15,7 @@ * SOFTWARE. */ -/* $Id: named2.conf,v 1.8 2000/06/22 21:52:58 tale Exp $ */ +/* $Id: named2.conf,v 1.9 2000/07/10 11:39:51 tale Exp $ */ options { query-source address 10.53.0.3; @@ -29,6 +29,15 @@ options { notify yes; }; +key rndc_key { + secret "1234abcd8765"; + algorithm hmac-md5; +}; + +controls { + inet 10.53.0.3 port 11953 allow { 10.53.0.3; } keys { rndc_key; }; +}; + zone "." { type hint; file "root.hint"; diff --git a/bin/tests/system/views/rndc.conf b/bin/tests/system/views/rndc.conf new file mode 100644 index 0000000000..cd77981316 --- /dev/null +++ b/bin/tests/system/views/rndc.conf @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2000 Internet Software Consortium. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS + * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE + * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS + * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. + */ + +/* $Id: rndc.conf,v 1.1 2000/07/10 11:39:45 tale Exp $ */ + +options { + default-key "rndc_key"; +}; + +key rndc_key { + algorithm hmac-md5; + secret "1234abcd8765"; +}; diff --git a/bin/tests/system/views/tests.sh b/bin/tests/system/views/tests.sh index 00edaf3942..29ea2c138f 100644 --- a/bin/tests/system/views/tests.sh +++ b/bin/tests/system/views/tests.sh @@ -15,7 +15,7 @@ # ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS # SOFTWARE. -# $Id: tests.sh,v 1.16 2000/07/09 16:33:09 tale Exp $ +# $Id: tests.sh,v 1.17 2000/07/10 11:39:46 tale Exp $ # # Perform tests @@ -42,10 +42,10 @@ cp ns2/named2.conf ns2/named.conf cp ns3/named2.conf ns3/named.conf cp ns2/example2.db ns2/example.db -echo "I:sleeping five seconds then reloading ns2 and ns3" +echo "I:sleeping five seconds then reloading ns2 and ns3 with rndc" sleep 5 -kill -HUP `cat ns2/named.pid` -kill -HUP `cat ns3/named.pid` +$RNDC -c rndc.conf -s 10.53.0.2 -p 9953 reload +$RNDC -c rndc.conf -s 10.53.0.3 -p 9953 reload echo "I:sleeping one minute" sleep 60