Commit 2e6bef4a authored by Mark Andrews's avatar Mark Andrews

add centos7

parent bbb64955
image: "debian:sid"
variables:
DEBIAN_FRONTEND: noninteractive
LC_ALL: C.UTF-8
DOCKER_DRIVER: overlay2
CI_REGISTRY_IMAGE: oerdnj/bind9
stages:
- build
- test
build:
.centos-centos7-amd64: &centos_centos7_amd64_image
image: "$CI_REGISTRY_IMAGE:centos-centos7-amd64"
variables:
LC_ALL: en_US.UTF-8
tags:
- linux
- docker
- amd64
.debian-sid-amd64: &debian_sid_amd64_image
image: "$CI_REGISTRY_IMAGE:debian-sid-amd64"
variables:
LC_ALL: C.UTF-8
image: "$CI_REGISTRY_IMAGE:debian-sid-amd64"
tags:
- linux
- docker
- amd64
.build: &build_job
stage: build
tags:
- linux
- docker
before_script:
- apt-get update
- apt-get -y install autotools-dev build-essential autoconf automake libtool
- autoreconf -fi
script:
- ./configure
......@@ -27,12 +42,42 @@ build:
- config.log
- genreport
test:
.test: &test_job
stage: test
tags:
- linux
- docker
script:
- echo . f.root-servers.net | ./genreport
build:centos:centos7:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g -D_BSD_SOURCE"
before_script:
- autoreconf -fi
<<: *centos_centos7_amd64_image
<<: *build_job
build:debian:sid:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
before_script:
- apt-get update
- apt-get -y install autotools-dev build-essential autoconf automake libtool
- autoreconf -fi
<<: *debian_sid_amd64_image
<<: *build_job
test:centos:centos7:amd64:
<<: *centos_centos7_amd64_image
<<: *test_job
dependencies:
- build:centos:centos7:amd64
test:debian:sid:amd64:
<<: *debian_sid_amd64_image
<<: *test_job
dependencies:
- build
- build:debian:sid:amd64
# generated automatically by aclocal 1.15.1 -*- Autoconf -*-
# generated automatically by aclocal 1.16.1 -*- Autoconf -*-
# Copyright (C) 1996-2017 Free Software Foundation, Inc.
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -20,7 +20,7 @@ You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
# Copyright (C) 2002-2017 Free Software Foundation, Inc.
# Copyright (C) 2002-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -32,10 +32,10 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.])
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.15'
[am__api_version='1.16'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
m4_if([$1], [1.15.1], [],
m4_if([$1], [1.16.1], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
......@@ -51,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.15.1])dnl
[AM_AUTOMAKE_VERSION([1.16.1])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001-2017 Free Software Foundation, Inc.
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -110,7 +110,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
# AM_CONDITIONAL -*- Autoconf -*-
# Copyright (C) 1997-2017 Free Software Foundation, Inc.
# Copyright (C) 1997-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -141,7 +141,7 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
# Copyright (C) 1999-2017 Free Software Foundation, Inc.
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -332,13 +332,12 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*-
# Copyright (C) 1999-2017 Free Software Foundation, Inc.
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
......@@ -346,49 +345,41 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
# Older Autoconf quotes --file arguments for eval, but not when files
# are listed without --file. Let's play safe and only enable the eval
# if we detect the quoting.
case $CONFIG_FILES in
*\'*) eval set x "$CONFIG_FILES" ;;
*) set x $CONFIG_FILES ;;
esac
# TODO: see whether this extra hack can be removed once we start
# requiring Autoconf 2.70 or later.
AS_CASE([$CONFIG_FILES],
[*\'*], [eval set x "$CONFIG_FILES"],
[*], [set x $CONFIG_FILES])
shift
for mf
# Used to flag and report bootstrapping failures.
am_rc=0
for am_mf
do
# Strip MF so we end up with the name of the file.
mf=`echo "$mf" | sed -e 's/:.*$//'`
# Check whether this is an Automake generated Makefile or not.
# We used to match only the files named 'Makefile.in', but
# some people rename them; so instead we look at the file content.
# Grep'ing the first line is not enough: some people post-process
# each Makefile.in and add a new line on top of each file to say so.
# Grep'ing the whole file is not good either: AIX grep has a line
am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
# Check whether this is an Automake generated Makefile which includes
# dependency-tracking related rules and includes.
# Grep'ing the whole file directly is not great: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000.
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
dirpart=`AS_DIRNAME("$mf")`
else
continue
fi
# Extract the definition of DEPDIR, am__include, and am__quote
# from the Makefile without running 'make'.
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
am__include=`sed -n 's/^am__include = //p' < "$mf"`
test -z "$am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
# Find all dependency output files, they are included files with
# $(DEPDIR) in their names. We invoke sed twice because it is the
# simplest approach to changing $(DEPDIR) to its actual value in the
# expansion.
for file in `sed -n "
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
fdir=`AS_DIRNAME(["$file"])`
AS_MKDIR_P([$dirpart/$fdir])
# echo "creating $dirpart/$file"
echo '# dummy' > "$dirpart/$file"
done
sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
|| continue
am_dirpart=`AS_DIRNAME(["$am_mf"])`
am_filepart=`AS_BASENAME(["$am_mf"])`
AM_RUN_LOG([cd "$am_dirpart" \
&& sed -e '/# am--include-marker/d' "$am_filepart" \
| $MAKE -f - am--depfiles]) || am_rc=$?
done
if test $am_rc -ne 0; then
AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
for automatic dependency tracking. Try re-running configure with the
'--disable-dependency-tracking' option to at least be able to build
the package (albeit without support for automatic dependency tracking).])
fi
AS_UNSET([am_dirpart])
AS_UNSET([am_filepart])
AS_UNSET([am_mf])
AS_UNSET([am_rc])
rm -f conftest-deps.mk
}
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
......@@ -397,18 +388,17 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
# -----------------------------
# This macro should only be invoked once -- use via AC_REQUIRE.
#
# This code is only required when automatic dependency tracking
# is enabled. FIXME. This creates each '.P' file that we will
# need in order to bootstrap the dependency handling code.
# This code is only required when automatic dependency tracking is enabled.
# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
# order to bootstrap the dependency handling code.
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[AC_CONFIG_COMMANDS([depfiles],
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
])
[AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
# Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996-2017 Free Software Foundation, Inc.
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -495,8 +485,8 @@ AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
# For better backward compatibility. To be removed once Automake 1.9.x
# dies out for good. For more background, see:
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
# We need awk for the "check" target (and possibly the TAP driver). The
# system "awk" is bad on some platforms.
......@@ -563,7 +553,7 @@ END
Aborting the configuration process, to ensure you take notice of the issue.
You can download and install GNU coreutils to get an 'rm' implementation
that behaves properly: <http://www.gnu.org/software/coreutils/>.
that behaves properly: <https://www.gnu.org/software/coreutils/>.
If you want to complete the configuration process using your problematic
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
......@@ -605,7 +595,7 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001-2017 Free Software Foundation, Inc.
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -626,7 +616,7 @@ if test x"${install_sh+set}" != xset; then
fi
AC_SUBST([install_sh])])
# Copyright (C) 2003-2017 Free Software Foundation, Inc.
# Copyright (C) 2003-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -647,7 +637,7 @@ AC_SUBST([am__leading_dot])])
# Check to see how 'make' treats includes. -*- Autoconf -*-
# Copyright (C) 2001-2017 Free Software Foundation, Inc.
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -655,49 +645,42 @@ AC_SUBST([am__leading_dot])])
# AM_MAKE_INCLUDE()
# -----------------
# Check to see how make treats includes.
# Check whether make has an 'include' directive that can support all
# the idioms we need for our automatic dependency tracking code.
AC_DEFUN([AM_MAKE_INCLUDE],
[am_make=${MAKE-make}
cat > confinc << 'END'
[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
cat > confinc.mk << 'END'
am__doit:
@echo this is the am__doit target
@echo this is the am__doit target >confinc.out
.PHONY: am__doit
END
# If we don't find an include directive, just comment out the code.
AC_MSG_CHECKING([for style of include used by $am_make])
am__include="#"
am__quote=
_am_result=none
# First try GNU make style include.
echo "include confinc" > confmf
# Ignore all kinds of additional output from 'make'.
case `$am_make -s -f confmf 2> /dev/null` in #(
*the\ am__doit\ target*)
am__include=include
am__quote=
_am_result=GNU
;;
esac
# Now try BSD make style include.
if test "$am__include" = "#"; then
echo '.include "confinc"' > confmf
case `$am_make -s -f confmf 2> /dev/null` in #(
*the\ am__doit\ target*)
am__include=.include
am__quote="\""
_am_result=BSD
;;
esac
fi
AC_SUBST([am__include])
AC_SUBST([am__quote])
AC_MSG_RESULT([$_am_result])
rm -f confinc confmf
])
# BSD make does it like this.
echo '.include "confinc.mk" # ignored' > confmf.BSD
# Other make implementations (GNU, Solaris 10, AIX) do it like this.
echo 'include confinc.mk # ignored' > confmf.GNU
_am_result=no
for s in GNU BSD; do
AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
AS_CASE([$?:`cat confinc.out 2>/dev/null`],
['0:this is the am__doit target'],
[AS_CASE([$s],
[BSD], [am__include='.include' am__quote='"'],
[am__include='include' am__quote=''])])
if test "$am__include" != "#"; then
_am_result="yes ($s style)"
break
fi
done
rm -f confinc.* confmf.*
AC_MSG_RESULT([${_am_result}])
AC_SUBST([am__include])])
AC_SUBST([am__quote])])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
# Copyright (C) 1997-2017 Free Software Foundation, Inc.
# Copyright (C) 1997-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -736,7 +719,7 @@ fi
# Helper functions for option handling. -*- Autoconf -*-
# Copyright (C) 2001-2017 Free Software Foundation, Inc.
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -765,7 +748,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
# Copyright (C) 1999-2017 Free Software Foundation, Inc.
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -812,7 +795,7 @@ AC_LANG_POP([C])])
# For backward compatibility.
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
# Copyright (C) 2001-2017 Free Software Foundation, Inc.
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -831,7 +814,7 @@ AC_DEFUN([AM_RUN_LOG],
# Check to make sure that the build environment is sane. -*- Autoconf -*-
# Copyright (C) 1996-2017 Free Software Foundation, Inc.
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -912,7 +895,7 @@ AC_CONFIG_COMMANDS_PRE(
rm -f conftest.file
])
# Copyright (C) 2009-2017 Free Software Foundation, Inc.
# Copyright (C) 2009-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -972,7 +955,7 @@ AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
])
# Copyright (C) 2001-2017 Free Software Foundation, Inc.
# Copyright (C) 2001-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -1000,7 +983,7 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
# Copyright (C) 2006-2017 Free Software Foundation, Inc.
# Copyright (C) 2006-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......@@ -1019,7 +1002,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
# Copyright (C) 2004-2017 Free Software Foundation, Inc.
# Copyright (C) 2004-2018 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
......
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
scriptversion=2016-01-11.22; # UTC
scriptversion=2018-03-07.03; # UTC
# Copyright (C) 1999-2017 Free Software Foundation, Inc.
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
......@@ -17,7 +17,7 @@ scriptversion=2016-01-11.22; # UTC
# 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/>.
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
......@@ -340,7 +340,7 @@ exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
......
......@@ -5,7 +5,6 @@ AC_PROG_CC_C99
AC_CONFIG_SRCDIR([genreport.c])
AC_CONFIG_HEADER([config.h])
AC_CONFIG_FILES([Makefile])
AC_USE_SYSTEM_EXTENSIONS
AC_CANONICAL_HOST
AC_SEARCH_LIBS([res_mkquery],[resolv bind])
AC_SEARCH_LIBS([res_9_mkquery],[resolv bind])
......
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2016-01-11.22; # UTC
scriptversion=2018-03-07.03; # UTC
# Copyright (C) 1999-2017 Free Software Foundation, Inc.
# Copyright (C) 1999-2018 Free Software Foundation, 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
......@@ -16,7 +16,7 @@ scriptversion=2016-01-11.22; # UTC
# 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/>.
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
......@@ -783,7 +783,7 @@ exit 0
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
......
......@@ -8,9 +8,11 @@
#define FD_SETSIZE 1600
#include <config.h>
#ifndef _BSD_SOURCE
#define _BSD_SOURCE 1
#endif
#define __FAVOR_BSD 1
#include <config.h>
#include <stdio.h>
#include <string.h>
......@@ -559,7 +561,7 @@ struct summary {
char ns[1024]; /* the server's name */
struct sockaddr_storage storage;/* server we are talking to */
int tests; /* number of outstanding tests */
int last; /* last test sent */
unsigned int last; /* last test sent */
int deferred; /* was the printing deferred */
int done; /* we are done */
int type; /* recursive query lookup type */
......@@ -582,7 +584,7 @@ struct summary {
int allrefused; /* all answers are current ok */
int allservfail; /* all answers are current ok */
struct summary *xlink; /* cross link of recursive A/AAAA */
int nsidlen;
unsigned int nsidlen;
char nsid[100]; /* nsid if found */
char results[sizeof(opts)/sizeof(opts[0])][100];
};
......@@ -883,7 +885,7 @@ printandfree(struct summary *summary) {
}
printf(" %s=%s", opts[i].name, summary->results[i]);
}
if (printnsid && summary->nsidlen != 0) {
if (printnsid && summary->nsidlen != 0U) {
printf(" (");
for (i = 0; i < summary->nsidlen; i++) {
if (isprint(summary->nsid[i] & 0xff))
......@@ -1109,7 +1111,8 @@ static void
dotest(struct workitem *item) {
unsigned char *cp;
unsigned int ttl;
int n, fd, id, tries = 0, opcode;
int n, fd, id, tries = 0;
unsigned int opcode;
socklen_t ss_len;
......@@ -1644,7 +1647,8 @@ process(struct workitem *item, unsigned char *buf, int buflen) {
unsigned int i, id, qr, aa, tc, rd, ra, z, ad, cd;
unsigned int qrcount, ancount, aucount, adcount;
unsigned int opcode, rcode;
unsigned int type, ednssize = 0, class, ednsttl = 0, ttl, rdlen;
unsigned int ednssize = 0, class, ednsttl = 0, ttl, rdlen;
unsigned short type;
unsigned char *cp, *eom;
int seenopt = 0, seensoa = 0, seenrrsig = 0;
int seennsid = 0, seenecs = 0, seenexpire = 0, seencookie = 0;
......@@ -1846,7 +1850,7 @@ process(struct workitem *item, unsigned char *buf, int buflen) {
{
struct summary *summarya, *summaryaaaa;
n = dn_expand(buf, eom, cp, ns, sizeof(ns));
if (n != rdlen)
if (n < 0 || (size_t)n != rdlen)
goto err;
item->summary->done = 1;
/*
......@@ -1981,16 +1985,18 @@ process(struct workitem *item, unsigned char *buf, int buflen) {
testname = opts[item->test].name;
else
testname = "";
printf("id=%-5u %-9s opcode=%u rcode=%u aa=%u tc=%u rd=%u "
printf("id=%-5u %-9s opcode=%u rcode=%u qr=%u aa=%u tc=%u rd=%u "
"ra=%u z=%u ad=%u cd=%u qrcount=%u ancount=%u "
"aucount=%u adcount=%u\n"
"\tseensoa=%u seenrrsig=%u seenopt=%u "
"seennsid=%u seenecs=%u seenexpire=%u seencookie=%u\n",
"seennsid=%u seenecs=%u seenexpire=%u seencookie=%u\n"
"\tednsudpsize=%u\n",
id, testname, opcode, rcode,
aa, tc, rd, ra, z, ad, cd,
qr, aa, tc, rd, ra, z, ad, cd,
qrcount, ancount, aucount, adcount,
seensoa, seenrrsig, seenopt,
seennsid, seenecs, seenexpire, seencookie);
seennsid, seenecs, seenexpire, seencookie,
ednssize);
}
if (item->summary->type) {
......@@ -2368,6 +2374,8 @@ readstdin(int fd) {
char address[1204];
int n;
fd = fd; /* unused */
/*
* Too much outstanding work then wait to be called again.
*/
......@@ -2447,9 +2455,9 @@ icmp4read(int fd) {
hlen = icmp->icmp_ip.ip_hl << 2;
offset = offsetof(struct icmp, icmp_ip) + hlen;
if (icmp->icmp_ip.ip_p == IPPROTO_UDP &&
n >= offset + sizeof(struct udphdr)) {
(size_t)n >= offset + sizeof(struct udphdr)) {
udphdr = (struct udphdr *)&buf[offset];
if (n >= offset + sizeof(struct udphdr) + 2) {
if ((size_t)n >= offset + sizeof(struct udphdr) + 2) {
msgdata = offset + sizeof(struct udphdr);
id = (buf[msgdata] << 8) + buf[msgdata + 1];
memset(&storage, 0, sizeof(storage));
......@@ -2463,9 +2471,9 @@ icmp4read(int fd) {
}
}
if (icmp->icmp_ip.ip_p == IPPROTO_TCP &&
n >= offset + sizeof(struct tcphdr)) {
(size_t)n >= offset + sizeof(struct tcphdr)) {
tcphdr = (struct tcphdr *)&buf[offset];
if (n >= offset + sizeof(struct tcphdr) + 4) {
if ((size_t)n >= offset + sizeof(struct tcphdr) + 4) {
msgdata = offset + sizeof(struct tcphdr);
id = (buf[msgdata + 2] << 8) + buf[msgdata + 3];
memset(&storage, 0, sizeof(storage));
......@@ -2534,9 +2542,9 @@ icmp4read(int fd) {
hlen = icmp->icmp_ip.ip_hl << 2;
offset = offsetof(struct icmp, icmp_ip) + hlen;
if (icmp->icmp_ip.ip_p == IPPROTO_UDP &&
n >= offset + sizeof(struct udphdr)) {
(size_t)n >= offset + sizeof(struct udphdr)) {
udphdr = (struct udphdr *)&buf[offset];
if (n >= offset + sizeof(struct udphdr) + 2) {
if ((size_t)n >= offset + sizeof(struct udphdr) + 2) {
msgdata = offset + sizeof(struct udphdr);
id = (buf[msgdata] << 8) + buf[msgdata + 1];
memset(&storage, 0, sizeof(storage));
......@@ -2550,9 +2558,9 @@ icmp4read(int fd) {
}
}
if (icmp->icmp_ip.ip_p == IPPROTO_TCP &&
n >= offset + sizeof(struct tcphdr)) {
(size_t)n >= offset + sizeof(struct tcphdr)) {
tcphdr = (struct tcphdr *)&buf[offset];
if (n >= offset + sizeof(struct tcphdr) + 4) {
if ((size_t)n >= offset + sizeof(struct tcphdr) + 4) {
msgdata = offset + sizeof(struct tcphdr);
id = (buf[msgdata + 2] << 8) + buf[msgdata + 3];
memset(&storage, 0, sizeof(storage));
......@@ -2634,9 +2642,9 @@ icmp6read(int fd) {
offset += 8;
}
if (nxt == IPPROTO_UDP &&
n >= offset + sizeof(struct udphdr)) {
(size_t)n >= offset + sizeof(struct udphdr)) {
udphdr = (struct udphdr *)&buf[offset];
if (n >= offset + sizeof(struct udphdr) + 2) {
if ((size_t)n >= offset + sizeof(struct udphdr) + 2) {
msgdata = offset + sizeof(struct udphdr);
id = (buf[msgdata] << 8) + buf[msgdata + 1];
memset(&storage, 0, sizeof(storage));
......@@ -2669,9 +2677,9 @@ icmp6read(int fd) {
offset += 8;
}
if (nxt == IPPROTO_UDP &&
n >= offset + sizeof(struct udphdr)) {
(size_t)n >= offset + sizeof(struct udphdr)) {
udphdr = (struct udphdr *)&buf[offset];
if (n >= offset + sizeof(struct udphdr) + 2) {
if ((size_t)n >= offset + sizeof(struct udphdr) + 2) {
msgdata = offset + sizeof(struct udphdr);
id = (buf[msgdata] << 8) + buf[msgdata + 1];
memset(&storage, 0, sizeof(storage));
......@@ -2685,9 +2693,9 @@ icmp6read(int fd) {
}
}
if (nxt == IPPROTO_TCP &&
n >= offset + sizeof(struct tcphdr)) {
(size_t)n >= offset + sizeof(struct tcphdr)) {
tcphdr = (struct tcphdr *)&buf[offset];
if (n >= offset + sizeof(struct tcphdr) + 2) {
if ((size_t)n >= offset + sizeof(struct tcphdr) + 2) {
msgdata = offset + sizeof(struct tcphdr);
id = (buf[msgdata + 2] << 8) + buf[msgdata + 3];
memset(&storage, 0, sizeof(storage));
......@@ -2734,9 +2742,9 @@ icmp6read(int fd) {
offset += 8;
}
if (nxt == IPPROTO_UDP &&
n >= offset + sizeof(struct udphdr)) {
(size_t)n >= offset + sizeof(struct udphdr)) {
udphdr = (struct udphdr *)&buf[offset];
if (n >= offset + sizeof(struct udphdr) + 2) {
if ((size_t)n >= offset + sizeof(struct udphdr) + 2) {
msgdata = offset + sizeof(struct udphdr);
id = (buf[msgdata] << 8) + buf[msgdata + 1];
memset(&storage, 0, sizeof(storage));
......@@ -2750,9 +2758,9 @@ icmp6read(int fd) {
}
}
if (nxt == IPPROTO_TCP &&
n >= offset + sizeof(struct tcphdr)) {
(size_t)n >= offset + sizeof(struct tcphdr)) {
tcphdr = (struct tcphdr *)&buf[offset];
if (n >= offset + sizeof(struct tcphdr) + 2) {
if ((size_t)n >= offset + sizeof(struct tcphdr) + 2) {
msgdata = offset + sizeof(struct tcphdr);
id = (buf[msgdata + 2] << 8) + buf[msgdata + 3];
memset(&storage, 0, sizeof(storage));
......@@ -2917,6 +2925,7 @@ static int stats;
static void
info(int sig) {
sig = sig; /* unused */
stats = 1;
}
......
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2016-01-11.22; # UTC
scriptversion=2018-03-11.20; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
......@@ -271,15 +271,18 @@ do
fi
dst=$dst_arg
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
# If destination is a directory, append the input filename.
if test -d "$dst"; then
if test "$is_target_a_directory" = never; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstbase=`basename "$src"`
case $dst in
*/) dst=$dst$dstbase;;
*) dst=$dst/$dstbase;;
esac
dstdir_status=0
else
dstdir=`dirname "$dst"`
......@@ -288,6 +291,11 @@ do
fi
fi
case $dstdir in
*/) dstdirslash=$dstdir;;
*) dstdirslash=$dstdir/;;
esac
obsolete_mkdir_used=false
if test $dst