Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
BIND
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
635
Issues
635
List
Boards
Labels
Service Desk
Milestones
Merge Requests
106
Merge Requests
106
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
BIND
Commits
362a27e8
Commit
362a27e8
authored
Feb 27, 2004
by
Mark Andrews
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1586. [func] "check-names" is now implemented.
parent
2047977c
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
336 additions
and
0 deletions
+336
-0
bin/tests/system/checknames/clean.sh
bin/tests/system/checknames/clean.sh
+5
-0
bin/tests/system/checknames/ns1/fail.example.db.in
bin/tests/system/checknames/ns1/fail.example.db.in
+10
-0
bin/tests/system/checknames/ns1/fail.update.db.in
bin/tests/system/checknames/ns1/fail.update.db.in
+9
-0
bin/tests/system/checknames/ns1/ignore.example.db.in
bin/tests/system/checknames/ns1/ignore.example.db.in
+11
-0
bin/tests/system/checknames/ns1/ignore.update.db.in
bin/tests/system/checknames/ns1/ignore.update.db.in
+9
-0
bin/tests/system/checknames/ns1/named.conf
bin/tests/system/checknames/ns1/named.conf
+61
-0
bin/tests/system/checknames/ns1/root.db
bin/tests/system/checknames/ns1/root.db
+23
-0
bin/tests/system/checknames/ns1/warn.example.db.in
bin/tests/system/checknames/ns1/warn.example.db.in
+10
-0
bin/tests/system/checknames/ns1/warn.update.db.in
bin/tests/system/checknames/ns1/warn.update.db.in
+9
-0
bin/tests/system/checknames/ns2/named.conf
bin/tests/system/checknames/ns2/named.conf
+23
-0
bin/tests/system/checknames/ns2/root.hints
bin/tests/system/checknames/ns2/root.hints
+7
-0
bin/tests/system/checknames/ns3/named.conf
bin/tests/system/checknames/ns3/named.conf
+23
-0
bin/tests/system/checknames/ns3/root.hints
bin/tests/system/checknames/ns3/root.hints
+7
-0
bin/tests/system/checknames/setup.sh
bin/tests/system/checknames/setup.sh
+7
-0
bin/tests/system/checknames/tests.sh
bin/tests/system/checknames/tests.sh
+122
-0
No files found.
bin/tests/system/checknames/clean.sh
0 → 100644
View file @
362a27e8
rm
-f
dig.out.ns?.test
*
rm
-f
nsupdate.out.test
*
rm
-f
ns1/
*
.example.db
rm
-f
ns1/
*
.update.db
rm
-f
ns1/
*
.update.db.jnl
bin/tests/system/checknames/ns1/fail.example.db.in
0 → 100644
View file @
362a27e8
; Copyright
; $Id: fail.example.db.in,v 1.2 2004/02/27 20:44:07 marka Exp $
$TTL 300
@ SOA ns1.fail.example. hostmaster.fail.example. (
1 3600 1200 604800 3600 )
NS ns1.fail.example.
ns1.fail.example. A 10.53.0.1
xx_xx.fail.example. A 127.0.0.1
bin/tests/system/checknames/ns1/fail.update.db.in
0 → 100644
View file @
362a27e8
; Copyright
; $Id: fail.update.db.in,v 1.2 2004/02/27 20:44:07 marka Exp $
$TTL 300
@ SOA ns1.fail.update. hostmaster.fail.update. (
1 3600 1200 604800 3600 )
NS ns1.fail.update.
ns1.fail.update. A 10.53.0.1
bin/tests/system/checknames/ns1/ignore.example.db.in
0 → 100644
View file @
362a27e8
; Copyright
; $Id: ignore.example.db.in,v 1.2 2004/02/27 20:44:07 marka Exp $
$TTL 300
@ SOA ns1.ignore.example. hostmaster.ignore.example. (
1 3600 1200 604800 3600 )
NS ns1.ignore.example.
ns1.ignore.example. A 10.53.0.1
yy_yy.ignore.example. A 10.53.0.1
mx.ignore.example. MX 10 zz_zz.ignore.example.
bin/tests/system/checknames/ns1/ignore.update.db.in
0 → 100644
View file @
362a27e8
; Copyright
; $Id: ignore.update.db.in,v 1.2 2004/02/27 20:44:07 marka Exp $
$TTL 300
@ SOA ns1.ignore.update. hostmaster.ignore.update. (
1 3600 1200 604800 3600 )
NS ns1.ignore.update.
ns1.ignore.update. A 10.53.0.1
bin/tests/system/checknames/ns1/named.conf
0 → 100644
View file @
362a27e8
/*
*
Copyright
*/
/* $
Id
:
named
.
conf
,
v
1
.
2
2004
/
02
/
27
20
:
44
:
08
marka
Exp
$ */
options
{
query
-
source
address
10
.
53
.
0
.
1
;
notify
-
source
10
.
53
.
0
.
1
;
transfer
-
source
10
.
53
.
0
.
1
;
port
5300
;
pid
-
file
"named.pid"
;
listen
-
on
{
10
.
53
.
0
.
1
; };
listen
-
on
-
v6
{
none
; };
recursion
no
;
notify
yes
;
};
zone
"."
{
type
master
;
file
"root.db"
;
};
zone
"ignore.example"
{
type
master
;
file
"ignore.example.db"
;
check
-
names
ignore
;
};
zone
"warn.example"
{
type
master
;
file
"warn.example.db"
;
check
-
names
warn
;
};
zone
"fail.example"
{
type
master
;
file
"fail.example.db"
;
check
-
names
fail
;
};
zone
"ignore.update"
{
type
master
;
file
"ignore.update.db"
;
allow
-
update
{
any
; };
check
-
names
ignore
;
};
zone
"warn.update"
{
type
master
;
file
"warn.update.db"
;
allow
-
update
{
any
; };
check
-
names
warn
;
};
zone
"fail.update"
{
type
master
;
file
"fail.update.db"
;
allow
-
update
{
any
; };
check
-
names
fail
;
};
bin/tests/system/checknames/ns1/root.db
0 → 100644
View file @
362a27e8
; Copyright
; $Id: root.db,v 1.2 2004/02/27 20:44:08 marka Exp $
$TTL 300
@ SOA ns1. hostmaster.warn.example. (
1 3600 1200 604800 3600 )
NS ns1.
ns1. A 10.53.0.1
;
ignore.example. NS ns1.ignore.example.
ns1.ignore.example. A 10.53.0.1
warn.example. NS ns1.warn.example.
ns1.warn.example. A 10.53.0.1
fail.example. NS ns1.fail.example.
ns1.fail.example. A 10.53.0.1
;
ignore.update. NS ns1.ignore.update.
ns1.ignore.update. A 10.53.0.1
warn.update. NS ns1.warn.update.
ns1.warn.update. A 10.53.0.1
fail.update. NS ns1.fail.update.
ns1.fail.update. A 10.53.0.1
bin/tests/system/checknames/ns1/warn.example.db.in
0 → 100644
View file @
362a27e8
; Copyright
; $Id: warn.example.db.in,v 1.2 2004/02/27 20:44:08 marka Exp $
$TTL 300
@ SOA ns1.warn.example. hostmaster.warn.example. (
1 3600 1200 604800 3600 )
NS ns1.warn.example.
ns1.warn.example. A 10.53.0.1
xx_xx.warn.example. A 10.53.0.1
bin/tests/system/checknames/ns1/warn.update.db.in
0 → 100644
View file @
362a27e8
; Copyright
; $Id: warn.update.db.in,v 1.2 2004/02/27 20:44:08 marka Exp $
$TTL 300
@ SOA ns1.warn.update. hostmaster.warn.update. (
1 3600 1200 604800 3600 )
NS ns1.warn.update.
ns1.warn.update. A 10.53.0.1
bin/tests/system/checknames/ns2/named.conf
0 → 100644
View file @
362a27e8
/*
*
Copyright
*/
/* $
Id
:
named
.
conf
,
v
1
.
2
2004
/
02
/
27
20
:
44
:
08
marka
Exp
$ */
options
{
query
-
source
address
10
.
53
.
0
.
2
;
notify
-
source
10
.
53
.
0
.
2
;
transfer
-
source
10
.
53
.
0
.
2
;
port
5300
;
pid
-
file
"named.pid"
;
listen
-
on
{
10
.
53
.
0
.
2
; };
listen
-
on
-
v6
{
none
; };
recursion
yes
;
check
-
names
response
warn
;
notify
yes
;
};
zone
"."
{
type
hint
;
file
"root.hints"
;
};
bin/tests/system/checknames/ns2/root.hints
0 → 100644
View file @
362a27e8
; Copyright
; $Id: root.hints,v 1.2 2004/02/27 20:44:09 marka Exp $
$TTL 300
. NS ns1.
ns1. A 10.53.0.1
bin/tests/system/checknames/ns3/named.conf
0 → 100644
View file @
362a27e8
/*
*
Copyright
*/
/* $
Id
:
named
.
conf
,
v
1
.
2
2004
/
02
/
27
20
:
44
:
09
marka
Exp
$ */
options
{
query
-
source
address
10
.
53
.
0
.
3
;
notify
-
source
10
.
53
.
0
.
3
;
transfer
-
source
10
.
53
.
0
.
3
;
port
5300
;
pid
-
file
"named.pid"
;
listen
-
on
{
10
.
53
.
0
.
3
; };
listen
-
on
-
v6
{
none
; };
recursion
yes
;
check
-
names
response
fail
;
notify
yes
;
};
zone
"."
{
type
hint
;
file
"root.hints"
;
};
bin/tests/system/checknames/ns3/root.hints
0 → 100644
View file @
362a27e8
; Copyright
; $Id: root.hints,v 1.2 2004/02/27 20:44:09 marka Exp $
$TTL 300
. NS ns1.
ns1. A 10.53.0.1
bin/tests/system/checknames/setup.sh
0 → 100644
View file @
362a27e8
cp
ns1/ignore.example.db.in ns1/ignore.example.db
cp
ns1/warn.example.db.in ns1/warn.example.db
cp
ns1/fail.example.db.in ns1/fail.example.db
cp
ns1/ignore.update.db.in ns1/ignore.update.db
cp
ns1/warn.update.db.in ns1/warn.update.db
cp
ns1/fail.update.db.in ns1/fail.update.db
bin/tests/system/checknames/tests.sh
0 → 100644
View file @
362a27e8
#!/bin/sh
#
# Copyright
# $Id: tests.sh,v 1.2 2004/02/27 20:44:06 marka Exp $
SYSTEMTESTTOP
=
..
.
$SYSTEMTESTTOP
/conf.sh
status
=
0
n
=
1
DIGOPTS
=
"+tcp +noadd +nosea +nostat +nocmd -p 5300"
# Entry should exist.
echo
"I: check for failure from on zone load for 'check-names fail;' (
$n
)"
ret
=
0
$DIG
$DIGOPTS
fail.example. @10.53.0.1 a
>
dig.out.ns1.test
$n
||
ret
=
1
grep
SERVFAIL dig.out.ns1.test
$n
>
/dev/null
||
ret
=
1
grep
'xx_xx.fail.example: bad owner name (check-names)'
ns1/named.run
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
status
=
`
expr
$status
+
$ret
`
n
=
`
expr
$n
+ 1
`
# Entry should exist.
echo
"I: check for warnings from on zone load for 'check-names warn;' (
$n
)"
ret
=
0
grep
'xx_xx.warn.example: bad owner name (check-names)'
ns1/named.run
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
status
=
`
expr
$status
+
$ret
`
n
=
`
expr
$n
+ 1
`
# Entry should not exist.
echo
"I: check for warnings from on zone load for 'check-names ignore;' (
$n
)"
ret
=
1
grep
'yy_yy.ignore.example: bad owner name (check-names)'
ns1/named.run
||
ret
=
0
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
status
=
`
expr
$status
+
$ret
`
n
=
`
expr
$n
+ 1
`
# Entry should exist
echo
"I: check that 'check-names response warn;' works (
$n
)"
ret
=
0
$DIG
$DIGOPTS
yy_yy.ignore.example. @10.53.0.1 a
>
dig.out.ns1.test
$n
||
ret
=
1
$DIG
$DIGOPTS
yy_yy.ignore.example. @10.53.0.2 a
>
dig.out.ns2.test
$n
||
ret
=
1
$PERL
../digcomp.pl dig.out.ns1.test
$n
dig.out.ns2.test
$n
||
ret
=
1
grep
"check-names warning yy_yy.ignore.example/A/IN"
ns2/named.run
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
status
=
`
expr
$status
+
$ret
`
n
=
`
expr
$n
+ 1
`
# Entry should exist
echo
"I: check that 'check-names response (owner) fails;' works (
$n
)"
ret
=
0
$DIG
$DIGOPTS
yy_yy.ignore.example. @10.53.0.1 a
>
dig.out.ns1.test
$n
||
ret
=
1
$DIG
$DIGOPTS
yy_yy.ignore.example. @10.53.0.3 a
>
dig.out.ns3.test
$n
||
ret
=
1
grep
NOERROR dig.out.ns1.test
$n
>
/dev/null
||
ret
=
1
grep
REFUSED dig.out.ns3.test
$n
>
/dev/null
||
ret
=
1
grep
"check-names failure yy_yy.ignore.example/A/IN"
ns3/named.run
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
status
=
`
expr
$status
+
$ret
`
n
=
`
expr
$n
+ 1
`
# Entry should exist
echo
"I: check that 'check-names response (rdata) fails;' works (
$n
)"
ret
=
0
$DIG
$DIGOPTS
mx.ignore.example. @10.53.0.1 MX
>
dig.out.ns1.test
$n
||
ret
=
1
$DIG
$DIGOPTS
mx.ignore.example. @10.53.0.3 MX
>
dig.out.ns3.test
$n
||
ret
=
1
grep
NOERROR dig.out.ns1.test
$n
>
/dev/null
||
ret
=
1
grep
SERVFAIL dig.out.ns3.test
$n
>
/dev/null
||
ret
=
1
grep
"check-names failure mx.ignore.example/MX/IN"
ns3/named.run
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
status
=
`
expr
$status
+
$ret
`
n
=
`
expr
$n
+ 1
`
echo
"I: check that updates to 'check-names fail;' are rejected (
$n
)"
ret
=
0
not
=
1
$NSUPDATE
-d
<<
END
> nsupdate.out.test
$n
2>&1 || not=0
server 10.53.0.1 5300
update add xxx_xxx.fail.update. 600 A 10.10.10.1
send
END
if
[
$not
!=
0
]
;
then
ret
=
1
;
fi
$DIG
$DIGOPTS
xxx_xxx.fail.update @10.53.0.1 A
>
dig.out.ns1.test
$n
||
ret
=
1
grep
"xxx_xxx.fail.update/A: bad owner name (check-names)"
ns1/named.run
>
/dev/null
||
ret
=
1
grep
NXDOMAIN dig.out.ns1.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
status
=
`
expr
$status
+
$ret
`
n
=
`
expr
$n
+ 1
`
echo
"I: check that updates to 'check-names warn;' succeed and are logged (
$n
)"
ret
=
0
$NSUPDATE
-d
<<
END
> nsupdate.out.test
$n
2>&1|| ret=1
server 10.53.0.1 5300
update add xxx_xxx.warn.update. 600 A 10.10.10.1
send
END
$DIG
$DIGOPTS
xxx_xxx.warn.update @10.53.0.1 A
>
dig.out.ns1.test
$n
||
ret
=
1
grep
"xxx_xxx.warn.update/A: bad owner name (check-names)"
ns1/named.run
>
/dev/null
||
ret
=
1
grep
NOERROR dig.out.ns1.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
status
=
`
expr
$status
+
$ret
`
n
=
`
expr
$n
+ 1
`
echo
"I: check that updates to 'check-names ignore;' succeed and are not logged (
$n
)"
ret
=
0
not
=
1
$NSUPDATE
-d
<<
END
> nsupdate.out.test
$n
2>&1 || ret=1
server 10.53.0.1 5300
update add xxx_xxx.ignore.update. 600 A 10.10.10.1
send
END
grep
"xxx_xxx.ignore.update/A.*(check-names)"
ns1/named.run
>
/dev/null
||
not
=
0
if
[
$not
!=
0
]
;
then
ret
=
1
;
fi
$DIG
$DIGOPTS
xxx_xxx.ignore.update @10.53.0.1 A
>
dig.out.ns1.test
$n
||
ret
=
1
grep
NOERROR dig.out.ns1.test
$n
>
/dev/null
||
ret
=
1
if
[
$ret
!=
0
]
;
then
echo
"I:failed"
;
fi
status
=
`
expr
$status
+
$ret
`
n
=
`
expr
$n
+ 1
`
exit
$status
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment