New upstream version 2.3.3
This commit is contained in:
parent
21323d25dd
commit
e7bdd1c6c6
6
INSTALL
6
INSTALL
|
@ -1,8 +1,8 @@
|
||||||
Installation Instructions
|
Installation Instructions
|
||||||
*************************
|
*************************
|
||||||
|
|
||||||
Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software
|
Copyright (C) 1994-1996, 1999-2002, 2004-2017, 2020-2021 Free
|
||||||
Foundation, Inc.
|
Software Foundation, Inc.
|
||||||
|
|
||||||
Copying and distribution of this file, with or without modification,
|
Copying and distribution of this file, with or without modification,
|
||||||
are permitted in any medium without royalty provided the copyright
|
are permitted in any medium without royalty provided the copyright
|
||||||
|
@ -225,7 +225,7 @@ order to use an ANSI C compiler:
|
||||||
|
|
||||||
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
|
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
|
||||||
|
|
||||||
HP-UX 'make' updates targets which have the same time stamps as their
|
HP-UX 'make' updates targets which have the same timestamps as their
|
||||||
prerequisites, which makes it generally unusable when shipped generated
|
prerequisites, which makes it generally unusable when shipped generated
|
||||||
files such as 'configure' are involved. Use GNU 'make' instead.
|
files such as 'configure' are involved. Use GNU 'make' instead.
|
||||||
|
|
||||||
|
|
11
Makefile.in
11
Makefile.in
|
@ -1,7 +1,7 @@
|
||||||
# Makefile.in generated by automake 1.16.3 from Makefile.am.
|
# Makefile.in generated by automake 1.16.5 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This Makefile.in is free software; the Free Software Foundation
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -250,9 +250,6 @@ am__define_uniq_tagged_files = \
|
||||||
unique=`for i in $$list; do \
|
unique=`for i in $$list; do \
|
||||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
done | $(am__uniquify_input)`
|
done | $(am__uniquify_input)`
|
||||||
ETAGS = etags
|
|
||||||
CTAGS = ctags
|
|
||||||
CSCOPE = cscope
|
|
||||||
DIST_SUBDIRS = $(SUBDIRS)
|
DIST_SUBDIRS = $(SUBDIRS)
|
||||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
|
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
|
||||||
$(srcdir)/test.pl.in $(top_srcdir)/build-aux/compile \
|
$(srcdir)/test.pl.in $(top_srcdir)/build-aux/compile \
|
||||||
|
@ -337,6 +334,8 @@ CCDEPMODE = @CCDEPMODE@
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CSCOPE = @CSCOPE@
|
||||||
|
CTAGS = @CTAGS@
|
||||||
CYGPATH_W = @CYGPATH_W@
|
CYGPATH_W = @CYGPATH_W@
|
||||||
DBILIBS = @DBILIBS@
|
DBILIBS = @DBILIBS@
|
||||||
DEFS = -DLOCALEDIR=\"$(localedir)\"
|
DEFS = -DLOCALEDIR=\"$(localedir)\"
|
||||||
|
@ -356,6 +355,7 @@ ENOLINK_VALUE = @ENOLINK_VALUE@
|
||||||
EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
|
EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
|
||||||
EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
|
EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
|
||||||
ERRNO_H = @ERRNO_H@
|
ERRNO_H = @ERRNO_H@
|
||||||
|
ETAGS = @ETAGS@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
EXTRAS = @EXTRAS@
|
EXTRAS = @EXTRAS@
|
||||||
EXTRAS_ROOT = @EXTRAS_ROOT@
|
EXTRAS_ROOT = @EXTRAS_ROOT@
|
||||||
|
@ -1640,7 +1640,6 @@ cscopelist-am: $(am__tagged_files)
|
||||||
distclean-tags:
|
distclean-tags:
|
||||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||||
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
|
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
|
||||||
|
|
||||||
distdir: $(BUILT_SOURCES)
|
distdir: $(BUILT_SOURCES)
|
||||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||||
|
|
||||||
|
|
38
NEWS
38
NEWS
|
@ -1,5 +1,43 @@
|
||||||
This file documents the major additions and syntax changes between releases.
|
This file documents the major additions and syntax changes between releases.
|
||||||
|
|
||||||
|
2.3.3 2nd Feb 2023
|
||||||
|
ENHANCEMENTS
|
||||||
|
using PRId64 and PRIu64 instead of %ld directly
|
||||||
|
check_http: Make faster with larger files
|
||||||
|
check_snmp: add 'multiplier' to modify current value
|
||||||
|
check_http: Implement chunked encoding decoding
|
||||||
|
check_http/check_curl: add chunked encoding test
|
||||||
|
check_log: Added --exclude to exclude patterns
|
||||||
|
check_log: Add tests
|
||||||
|
check_disk: Clarify usage possibilites
|
||||||
|
|
||||||
|
FIXES
|
||||||
|
fixed two PRId64 to PRIu64 in perfdata_uint64
|
||||||
|
check_pgsql: Removing is_pg_dbname alltogether,using postgres API.
|
||||||
|
check_http: Remove superflous CRLF in HTTP-Requests
|
||||||
|
check_curl: detect ipv6
|
||||||
|
check_icmp: fix parsing help/version long options
|
||||||
|
check_http: fix test plan
|
||||||
|
check_disk: Find accessible mount path if multiple are available
|
||||||
|
check_apt: Fix unknown escape sequence error output
|
||||||
|
check_curl: fix checking large bodys
|
||||||
|
check_snmp: Improve tests for check_snmp & multiply option
|
||||||
|
check_snmp: always apply format when applying multiplier
|
||||||
|
check_http: Use real booleans instead of ints
|
||||||
|
check_http: Document process_arguments a little bit better
|
||||||
|
check_http: Remove dead code
|
||||||
|
check_http: Fix several bug in the implementation of unchunking
|
||||||
|
check_http: Reformat a part to increase readability
|
||||||
|
check_apt: Put upgrade options in the root sections
|
||||||
|
check_apt: Fix comment
|
||||||
|
check_apt: Use real booleans
|
||||||
|
check_mailq: Fixing nullmailer regex
|
||||||
|
check_snmp: Fix regex matches
|
||||||
|
check_log: Fixed a bug when using --all
|
||||||
|
check_log: Cleaned up duplicated code in the args
|
||||||
|
check_http: Fix memory reallocation error in chunk decoding logic
|
||||||
|
check_http: Add space for ending NULL byte in array for chunked encoding
|
||||||
|
|
||||||
2.3.2 20th Oct 2022
|
2.3.2 20th Oct 2022
|
||||||
GENERAL
|
GENERAL
|
||||||
Use netcat-openbsd for debian explicitely (by @RincewindsHat #1704)
|
Use netcat-openbsd for debian explicitely (by @RincewindsHat #1704)
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
SRC_ROOT=`dirname $0`
|
SRC_ROOT=`dirname $0`
|
||||||
|
|
||||||
NPVF=NP-VERSION-FILE
|
NPVF=NP-VERSION-FILE
|
||||||
DEF_VER=2.3.2
|
DEF_VER=2.3.3
|
||||||
|
|
||||||
LF='
|
LF='
|
||||||
'
|
'
|
||||||
|
|
35
THANKS
35
THANKS
|
@ -2,28 +2,28 @@ This software is brought to you by the Monitoring Plugins Development Team. Howe
|
||||||
there have been many contributors to this project. Everyone below has helped in
|
there have been many contributors to this project. Everyone below has helped in
|
||||||
raising bug reports, creating patches or contributing new plugins.
|
raising bug reports, creating patches or contributing new plugins.
|
||||||
|
|
||||||
dag rob?le
|
|
||||||
Aksel Sjögren
|
|
||||||
Marc Sánchez
|
|
||||||
Wolfgang Karall-Ahlborn
|
|
||||||
Randy O'Meara
|
|
||||||
Elan Ruusamäe
|
Elan Ruusamäe
|
||||||
Matthias Hähnel
|
Randy O'Meara
|
||||||
|
Wolfgang Karall-Ahlborn
|
||||||
Nicolai Søborg
|
Nicolai Søborg
|
||||||
fabiodds
|
dag rob?le
|
||||||
Diego Elio Pettenò
|
Diego Elio Pettenò
|
||||||
|
Matthias Hähnel
|
||||||
|
Marc Sánchez
|
||||||
|
Aksel Sjögren
|
||||||
|
fabiodds
|
||||||
Oskar Ahner
|
Oskar Ahner
|
||||||
Lance Albertson
|
Lance Albertson
|
||||||
David Alden
|
David Alden
|
||||||
|
Patrick Allen
|
||||||
Rodger Allen
|
Rodger Allen
|
||||||
Paul Allen
|
Paul Allen
|
||||||
Patrick Allen
|
|
||||||
Felipe Gustavo de Almeida
|
Felipe Gustavo de Almeida
|
||||||
Michael Almond
|
Michael Almond
|
||||||
Michael Anthon
|
Michael Anthon
|
||||||
Bernd Apfel
|
Bernd Apfel
|
||||||
Paula Arnold
|
|
||||||
Bernd Arnold
|
Bernd Arnold
|
||||||
|
Paula Arnold
|
||||||
Kondoros Attila
|
Kondoros Attila
|
||||||
Daniel Austin
|
Daniel Austin
|
||||||
Karol Babioch
|
Karol Babioch
|
||||||
|
@ -55,6 +55,7 @@ Prathamesh Bhanuse
|
||||||
Daniel Bimschas
|
Daniel Bimschas
|
||||||
Jeffery Blank
|
Jeffery Blank
|
||||||
Tom De Blende
|
Tom De Blende
|
||||||
|
Robert Bohne
|
||||||
Eric Bollengier
|
Eric Bollengier
|
||||||
Aurelien Bompard
|
Aurelien Bompard
|
||||||
Stéphane Bortzmeyer
|
Stéphane Bortzmeyer
|
||||||
|
@ -83,9 +84,9 @@ Lee Clemens
|
||||||
Ben Clewett
|
Ben Clewett
|
||||||
Jean-Claude Computing
|
Jean-Claude Computing
|
||||||
Lionel Cons
|
Lionel Cons
|
||||||
Ollie Cook
|
|
||||||
Charlie Cook
|
|
||||||
Garry Cook
|
Garry Cook
|
||||||
|
Charlie Cook
|
||||||
|
Ollie Cook
|
||||||
Luca Corti
|
Luca Corti
|
||||||
Greg Cox
|
Greg Cox
|
||||||
Jason Crawford
|
Jason Crawford
|
||||||
|
@ -155,12 +156,13 @@ Olaf Greis
|
||||||
Alex Griffin
|
Alex Griffin
|
||||||
Chris Grim
|
Chris Grim
|
||||||
Steven Grimm
|
Steven Grimm
|
||||||
|
Lorenz Gruenwald
|
||||||
Sebastien Guay
|
Sebastien Guay
|
||||||
Linda Guo
|
Linda Guo
|
||||||
Jon Hallett
|
Jon Hallett
|
||||||
Steve Hanselman
|
Steve Hanselman
|
||||||
Jacob Hansen
|
|
||||||
Ask Bjoern Hansen
|
Ask Bjoern Hansen
|
||||||
|
Jacob Hansen
|
||||||
Sebastian Harl
|
Sebastian Harl
|
||||||
Michael Haro
|
Michael Haro
|
||||||
Olli Hauer
|
Olli Hauer
|
||||||
|
@ -237,8 +239,8 @@ Pawel Malachowski
|
||||||
Ricardo Maraschini
|
Ricardo Maraschini
|
||||||
Michael Markstaller
|
Michael Markstaller
|
||||||
John Marquart
|
John Marquart
|
||||||
Jason Martin
|
|
||||||
Ernst-Dieter Martin
|
Ernst-Dieter Martin
|
||||||
|
Jason Martin
|
||||||
Christopher Maser
|
Christopher Maser
|
||||||
Mathieu Masseboeuf
|
Mathieu Masseboeuf
|
||||||
Alexander Matey
|
Alexander Matey
|
||||||
|
@ -269,6 +271,7 @@ Jan-Frode Myklebust
|
||||||
Sivakumar Nellurandi
|
Sivakumar Nellurandi
|
||||||
Peter Newman
|
Peter Newman
|
||||||
Truongchinh Nguyen
|
Truongchinh Nguyen
|
||||||
|
Wolfgang Nieder
|
||||||
Simon L Nielsen
|
Simon L Nielsen
|
||||||
Thomas Nilsen
|
Thomas Nilsen
|
||||||
Sebastian Nohn
|
Sebastian Nohn
|
||||||
|
@ -326,8 +329,8 @@ Sven Schaffranneck
|
||||||
Christoph Schell
|
Christoph Schell
|
||||||
Thomas Schimpke
|
Thomas Schimpke
|
||||||
Benjamin Schmid
|
Benjamin Schmid
|
||||||
Christian Schmidt
|
|
||||||
Sebastian Schmidt
|
Sebastian Schmidt
|
||||||
|
Christian Schmidt
|
||||||
Henning Schmiedehausen
|
Henning Schmiedehausen
|
||||||
Christian Schneemann
|
Christian Schneemann
|
||||||
Cove Schneider
|
Cove Schneider
|
||||||
|
@ -356,6 +359,7 @@ David Sullivan
|
||||||
Kjell Sundtjonn
|
Kjell Sundtjonn
|
||||||
Ziya Suzen
|
Ziya Suzen
|
||||||
Christian Tacke
|
Christian Tacke
|
||||||
|
Danijel Tasov
|
||||||
Michael Tiernan
|
Michael Tiernan
|
||||||
Ben Timby
|
Ben Timby
|
||||||
Ronald Tin
|
Ronald Tin
|
||||||
|
@ -398,9 +402,10 @@ Shawn Wills
|
||||||
Rob Windsor
|
Rob Windsor
|
||||||
Mario Witte
|
Mario Witte
|
||||||
Alexander Wittig
|
Alexander Wittig
|
||||||
Tobias Wolf
|
|
||||||
Brian De Wolf
|
Brian De Wolf
|
||||||
|
Tobias Wolf
|
||||||
Eric Wunderlin
|
Eric Wunderlin
|
||||||
Patric Wust
|
Patric Wust
|
||||||
Jamie Zawinski
|
Jamie Zawinski
|
||||||
Vadim Zhukov
|
Vadim Zhukov
|
||||||
|
andrew bezella
|
||||||
|
|
70
aclocal.m4
vendored
70
aclocal.m4
vendored
|
@ -1,6 +1,6 @@
|
||||||
# generated automatically by aclocal 1.16.3 -*- Autoconf -*-
|
# generated automatically by aclocal 1.16.5 -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -14,13 +14,13 @@
|
||||||
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
|
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
|
||||||
m4_ifndef([AC_AUTOCONF_VERSION],
|
m4_ifndef([AC_AUTOCONF_VERSION],
|
||||||
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||||
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
|
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
|
||||||
[m4_warning([this file was generated for autoconf 2.69.
|
[m4_warning([this file was generated for autoconf 2.71.
|
||||||
You have another version of autoconf. It may work, but is not guaranteed to.
|
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.
|
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'.])])
|
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
|
||||||
|
|
||||||
# Copyright (C) 2002-2020 Free Software Foundation, Inc.
|
# Copyright (C) 2002-2021 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -35,7 +35,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
|
||||||
[am__api_version='1.16'
|
[am__api_version='1.16'
|
||||||
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
|
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.
|
dnl require some minimum version. Point them to the right macro.
|
||||||
m4_if([$1], [1.16.3], [],
|
m4_if([$1], [1.16.5], [],
|
||||||
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
|
[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.
|
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
|
||||||
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
|
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
|
||||||
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
||||||
[AM_AUTOMAKE_VERSION([1.16.3])dnl
|
[AM_AUTOMAKE_VERSION([1.16.5])dnl
|
||||||
m4_ifndef([AC_AUTOCONF_VERSION],
|
m4_ifndef([AC_AUTOCONF_VERSION],
|
||||||
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||||
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
|
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
|
||||||
|
|
||||||
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
|
# Copyright (C) 2001-2021 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -110,7 +110,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
|
||||||
|
|
||||||
# AM_CONDITIONAL -*- Autoconf -*-
|
# AM_CONDITIONAL -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1997-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1997-2021 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# 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.]])
|
Usually this means the macro was only invoked conditionally.]])
|
||||||
fi])])
|
fi])])
|
||||||
|
|
||||||
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1999-2021 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -332,7 +332,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
|
||||||
|
|
||||||
# Generate code to set up dependency tracking. -*- Autoconf -*-
|
# Generate code to set up dependency tracking. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1999-2021 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -400,7 +400,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||||
|
|
||||||
# Do all the work for Automake. -*- Autoconf -*-
|
# Do all the work for Automake. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -428,6 +428,10 @@ m4_defn([AC_PROG_CC])
|
||||||
# release and drop the old call support.
|
# release and drop the old call support.
|
||||||
AC_DEFUN([AM_INIT_AUTOMAKE],
|
AC_DEFUN([AM_INIT_AUTOMAKE],
|
||||||
[AC_PREREQ([2.65])dnl
|
[AC_PREREQ([2.65])dnl
|
||||||
|
m4_ifdef([_$0_ALREADY_INIT],
|
||||||
|
[m4_fatal([$0 expanded multiple times
|
||||||
|
]m4_defn([_$0_ALREADY_INIT]))],
|
||||||
|
[m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl
|
||||||
dnl Autoconf wants to disallow AM_ names. We explicitly allow
|
dnl Autoconf wants to disallow AM_ names. We explicitly allow
|
||||||
dnl the ones we care about.
|
dnl the ones we care about.
|
||||||
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
|
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
|
||||||
|
@ -464,7 +468,7 @@ m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
|
||||||
[_AM_SET_OPTIONS([$1])dnl
|
[_AM_SET_OPTIONS([$1])dnl
|
||||||
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
|
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
|
||||||
m4_if(
|
m4_if(
|
||||||
m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
|
m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
|
||||||
[ok:ok],,
|
[ok:ok],,
|
||||||
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
|
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
|
||||||
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
|
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
|
||||||
|
@ -516,6 +520,20 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
|
||||||
[m4_define([AC_PROG_OBJCXX],
|
[m4_define([AC_PROG_OBJCXX],
|
||||||
m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
|
m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
|
||||||
])
|
])
|
||||||
|
# Variables for tags utilities; see am/tags.am
|
||||||
|
if test -z "$CTAGS"; then
|
||||||
|
CTAGS=ctags
|
||||||
|
fi
|
||||||
|
AC_SUBST([CTAGS])
|
||||||
|
if test -z "$ETAGS"; then
|
||||||
|
ETAGS=etags
|
||||||
|
fi
|
||||||
|
AC_SUBST([ETAGS])
|
||||||
|
if test -z "$CSCOPE"; then
|
||||||
|
CSCOPE=cscope
|
||||||
|
fi
|
||||||
|
AC_SUBST([CSCOPE])
|
||||||
|
|
||||||
AC_REQUIRE([AM_SILENT_RULES])dnl
|
AC_REQUIRE([AM_SILENT_RULES])dnl
|
||||||
dnl The testsuite driver may need to know about EXEEXT, so add the
|
dnl The testsuite driver may need to know about EXEEXT, so add the
|
||||||
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
|
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
|
||||||
|
@ -597,7 +615,7 @@ for _am_header in $config_headers :; do
|
||||||
done
|
done
|
||||||
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
|
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
|
||||||
|
|
||||||
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
|
# Copyright (C) 2001-2021 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -618,7 +636,7 @@ if test x"${install_sh+set}" != xset; then
|
||||||
fi
|
fi
|
||||||
AC_SUBST([install_sh])])
|
AC_SUBST([install_sh])])
|
||||||
|
|
||||||
# Copyright (C) 2003-2020 Free Software Foundation, Inc.
|
# Copyright (C) 2003-2021 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -640,7 +658,7 @@ AC_SUBST([am__leading_dot])])
|
||||||
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
|
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
|
||||||
# From Jim Meyering
|
# From Jim Meyering
|
||||||
|
|
||||||
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -675,7 +693,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
|
||||||
|
|
||||||
# Check to see how 'make' treats includes. -*- Autoconf -*-
|
# Check to see how 'make' treats includes. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
|
# Copyright (C) 2001-2021 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -718,7 +736,7 @@ AC_SUBST([am__quote])])
|
||||||
|
|
||||||
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
|
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1997-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1997-2021 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -752,7 +770,7 @@ fi
|
||||||
|
|
||||||
# Helper functions for option handling. -*- Autoconf -*-
|
# Helper functions for option handling. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
|
# Copyright (C) 2001-2021 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -781,7 +799,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
|
||||||
AC_DEFUN([_AM_IF_OPTION],
|
AC_DEFUN([_AM_IF_OPTION],
|
||||||
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
|
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
|
||||||
|
|
||||||
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1999-2021 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -828,7 +846,7 @@ AC_LANG_POP([C])])
|
||||||
# For backward compatibility.
|
# For backward compatibility.
|
||||||
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
|
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
|
||||||
|
|
||||||
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
|
# Copyright (C) 2001-2021 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -847,7 +865,7 @@ AC_DEFUN([AM_RUN_LOG],
|
||||||
|
|
||||||
# Check to make sure that the build environment is sane. -*- Autoconf -*-
|
# Check to make sure that the build environment is sane. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -928,7 +946,7 @@ AC_CONFIG_COMMANDS_PRE(
|
||||||
rm -f conftest.file
|
rm -f conftest.file
|
||||||
])
|
])
|
||||||
|
|
||||||
# Copyright (C) 2009-2020 Free Software Foundation, Inc.
|
# Copyright (C) 2009-2021 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -988,7 +1006,7 @@ AC_SUBST([AM_BACKSLASH])dnl
|
||||||
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
|
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
|
||||||
])
|
])
|
||||||
|
|
||||||
# Copyright (C) 2001-2020 Free Software Foundation, Inc.
|
# Copyright (C) 2001-2021 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -1016,7 +1034,7 @@ fi
|
||||||
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
|
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
|
||||||
AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
||||||
|
|
||||||
# Copyright (C) 2006-2020 Free Software Foundation, Inc.
|
# Copyright (C) 2006-2021 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -1035,7 +1053,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
|
||||||
|
|
||||||
# Check how to create a tarball. -*- Autoconf -*-
|
# Check how to create a tarball. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 2004-2020 Free Software Foundation, Inc.
|
# Copyright (C) 2004-2021 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This file is free software; the Free Software Foundation
|
# This file is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
scriptversion=2018-03-07.03; # UTC
|
scriptversion=2018-03-07.03; # UTC
|
||||||
|
|
||||||
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1999-2021 Free Software Foundation, Inc.
|
||||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
|
1454
build-aux/config.guess
vendored
1454
build-aux/config.guess
vendored
File diff suppressed because it is too large
Load diff
2849
build-aux/config.sub
vendored
2849
build-aux/config.sub
vendored
File diff suppressed because it is too large
Load diff
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
scriptversion=2018-03-07.03; # UTC
|
scriptversion=2018-03-07.03; # UTC
|
||||||
|
|
||||||
# Copyright (C) 1999-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1999-2021 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
scriptversion=2018-03-07.03; # UTC
|
scriptversion=2018-03-07.03; # UTC
|
||||||
|
|
||||||
# Copyright (C) 1996-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
|
||||||
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
scriptversion=2018-03-07.03; # UTC
|
scriptversion=2018-03-07.03; # UTC
|
||||||
|
|
||||||
# Copyright (C) 2011-2020 Free Software Foundation, Inc.
|
# Copyright (C) 2011-2021 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -105,8 +105,11 @@ trap "st=130; $do_exit" 2
|
||||||
trap "st=141; $do_exit" 13
|
trap "st=141; $do_exit" 13
|
||||||
trap "st=143; $do_exit" 15
|
trap "st=143; $do_exit" 15
|
||||||
|
|
||||||
# Test script is run here.
|
# Test script is run here. We create the file first, then append to it,
|
||||||
"$@" >$log_file 2>&1
|
# to ameliorate tests themselves also writing to the log file. Our tests
|
||||||
|
# don't, but others can (automake bug#35762).
|
||||||
|
: >"$log_file"
|
||||||
|
"$@" >>"$log_file" 2>&1
|
||||||
estatus=$?
|
estatus=$?
|
||||||
|
|
||||||
if test $enable_hard_errors = no && test $estatus -eq 99; then
|
if test $enable_hard_errors = no && test $estatus -eq 99; then
|
||||||
|
@ -128,7 +131,7 @@ esac
|
||||||
# know whether the test passed or failed simply by looking at the '.log'
|
# know whether the test passed or failed simply by looking at the '.log'
|
||||||
# file, without the need of also peaking into the corresponding '.trs'
|
# file, without the need of also peaking into the corresponding '.trs'
|
||||||
# file (automake bug#11814).
|
# file (automake bug#11814).
|
||||||
echo "$res $test_name (exit status: $estatus)" >>$log_file
|
echo "$res $test_name (exit status: $estatus)" >>"$log_file"
|
||||||
|
|
||||||
# Report outcome to console.
|
# Report outcome to console.
|
||||||
echo "${col}${res}${std}: $test_name"
|
echo "${col}${res}${std}: $test_name"
|
||||||
|
|
45
config.h.in
45
config.h.in
|
@ -27,12 +27,7 @@
|
||||||
/* Define if 2-argument SVR4 swapctl exists */
|
/* Define if 2-argument SVR4 swapctl exists */
|
||||||
#undef CHECK_SWAP_SWAPCTL_SVR4
|
#undef CHECK_SWAP_SWAPCTL_SVR4
|
||||||
|
|
||||||
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
|
/* Define to 1 if using 'alloca.c'. */
|
||||||
systems. This function is required for `alloca.c' support on those systems.
|
|
||||||
*/
|
|
||||||
#undef CRAY_STACKSEG_END
|
|
||||||
|
|
||||||
/* Define to 1 if using `alloca.c'. */
|
|
||||||
#undef C_ALLOCA
|
#undef C_ALLOCA
|
||||||
|
|
||||||
/* Define as the bit index in the word where to find bit 0 of the exponent of
|
/* Define as the bit index in the word where to find bit 0 of the exponent of
|
||||||
|
@ -177,8 +172,7 @@
|
||||||
may be supplied by this distribution. */
|
may be supplied by this distribution. */
|
||||||
#undef HAVE_ALLOCA
|
#undef HAVE_ALLOCA
|
||||||
|
|
||||||
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
|
/* Define to 1 if <alloca.h> works. */
|
||||||
*/
|
|
||||||
#undef HAVE_ALLOCA_H
|
#undef HAVE_ALLOCA_H
|
||||||
|
|
||||||
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||||
|
@ -537,9 +531,6 @@
|
||||||
/* Define to 1 if you have the `memmove' function. */
|
/* Define to 1 if you have the `memmove' function. */
|
||||||
#undef HAVE_MEMMOVE
|
#undef HAVE_MEMMOVE
|
||||||
|
|
||||||
/* Define to 1 if you have the <memory.h> header file. */
|
|
||||||
#undef HAVE_MEMORY_H
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <mntent.h> header file. */
|
/* Define to 1 if you have the <mntent.h> header file. */
|
||||||
#undef HAVE_MNTENT_H
|
#undef HAVE_MNTENT_H
|
||||||
|
|
||||||
|
@ -1481,6 +1472,9 @@
|
||||||
uintmax_t. */
|
uintmax_t. */
|
||||||
#undef HAVE_STDINT_H_WITH_UINTMAX
|
#undef HAVE_STDINT_H_WITH_UINTMAX
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <stdio.h> header file. */
|
||||||
|
#undef HAVE_STDIO_H
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||||
#undef HAVE_STDLIB_H
|
#undef HAVE_STDLIB_H
|
||||||
|
|
||||||
|
@ -1493,7 +1487,7 @@
|
||||||
/* Define to 1 if you have the `strdup' function. */
|
/* Define to 1 if you have the `strdup' function. */
|
||||||
#undef HAVE_STRDUP
|
#undef HAVE_STRDUP
|
||||||
|
|
||||||
/* Define to 1 if you have the `strerror_r' function. */
|
/* Define if you have `strerror_r'. */
|
||||||
#undef HAVE_STRERROR_R
|
#undef HAVE_STRERROR_R
|
||||||
|
|
||||||
/* Define to 1 if you have the <strings.h> header file. */
|
/* Define to 1 if you have the <strings.h> header file. */
|
||||||
|
@ -2085,7 +2079,9 @@
|
||||||
/* Define if statvfs64 should be preferred over statvfs. */
|
/* Define if statvfs64 should be preferred over statvfs. */
|
||||||
#undef STAT_STATVFS64
|
#undef STAT_STATVFS64
|
||||||
|
|
||||||
/* Define to 1 if you have the ANSI C header files. */
|
/* Define to 1 if all of the C90 standard headers exist (not just the ones
|
||||||
|
required in a freestanding environment). This macro is provided for
|
||||||
|
backward compatibility; new code need not use it. */
|
||||||
#undef STDC_HEADERS
|
#undef STDC_HEADERS
|
||||||
|
|
||||||
/* Define to 1 if strerror_r returns char *. */
|
/* Define to 1 if strerror_r returns char *. */
|
||||||
|
@ -2103,7 +2099,8 @@
|
||||||
/* Format string for parsing swap output */
|
/* Format string for parsing swap output */
|
||||||
#undef SWAP_FORMAT
|
#undef SWAP_FORMAT
|
||||||
|
|
||||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. This
|
||||||
|
macro is obsolete. */
|
||||||
#undef TIME_WITH_SYS_TIME
|
#undef TIME_WITH_SYS_TIME
|
||||||
|
|
||||||
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
|
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
|
||||||
|
@ -2213,9 +2210,6 @@
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Enable large inode numbers on Mac OS X 10.5. */
|
|
||||||
#undef _DARWIN_USE_64_BIT_INODE
|
|
||||||
|
|
||||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||||
#undef _FILE_OFFSET_BITS
|
#undef _FILE_OFFSET_BITS
|
||||||
|
|
||||||
|
@ -2373,7 +2367,7 @@
|
||||||
/* Define to `int' if <sys/types.h> does not define. */
|
/* Define to `int' if <sys/types.h> does not define. */
|
||||||
#undef mode_t
|
#undef mode_t
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> does not define. */
|
/* Define as a signed integer type capable of holding a process identifier. */
|
||||||
#undef pid_t
|
#undef pid_t
|
||||||
|
|
||||||
/* Define as the type of the result of subtracting two pointers, if the system
|
/* Define as the type of the result of subtracting two pointers, if the system
|
||||||
|
@ -2427,14 +2421,15 @@
|
||||||
|
|
||||||
/* Define to the equivalent of the C99 'restrict' keyword, or to
|
/* Define to the equivalent of the C99 'restrict' keyword, or to
|
||||||
nothing if this is not supported. Do not define if restrict is
|
nothing if this is not supported. Do not define if restrict is
|
||||||
supported directly. */
|
supported only directly. */
|
||||||
#undef restrict
|
#undef restrict
|
||||||
/* Work around a bug in Sun C++: it does not support _Restrict or
|
/* Work around a bug in older versions of Sun C++, which did not
|
||||||
__restrict__, even though the corresponding Sun C compiler ends up with
|
#define __restrict__ or support _Restrict or __restrict__
|
||||||
"#define restrict _Restrict" or "#define restrict __restrict__" in the
|
even though the corresponding Sun C compiler ended up with
|
||||||
previous line. Perhaps some future version of Sun C++ will work with
|
"#define restrict _Restrict" or "#define restrict __restrict__"
|
||||||
restrict; if so, hopefully it defines __RESTRICT like Sun C does. */
|
in the previous line. This workaround can be removed once
|
||||||
#if defined __SUNPRO_CC && !defined __RESTRICT
|
we assume Oracle Developer Studio 12.5 (2016) or later. */
|
||||||
|
#if defined __SUNPRO_CC && !defined __RESTRICT && !defined __restrict__
|
||||||
# define _Restrict
|
# define _Restrict
|
||||||
# define __restrict__
|
# define __restrict__
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
dnl Process this file with autoconf to produce a configure script.
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
AC_PREREQ(2.59)
|
AC_PREREQ(2.59)
|
||||||
AC_INIT(monitoring-plugins,2.3.2)
|
AC_INIT(monitoring-plugins,2.3.3)
|
||||||
AC_CONFIG_SRCDIR(NPTest.pm)
|
AC_CONFIG_SRCDIR(NPTest.pm)
|
||||||
AC_CONFIG_FILES([gl/Makefile])
|
AC_CONFIG_FILES([gl/Makefile])
|
||||||
AC_CONFIG_AUX_DIR(build-aux)
|
AC_CONFIG_AUX_DIR(build-aux)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Makefile.in generated by automake 1.16.3 from Makefile.am.
|
# Makefile.in generated by automake 1.16.5 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This Makefile.in is free software; the Free Software Foundation
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -359,8 +359,6 @@ am__define_uniq_tagged_files = \
|
||||||
unique=`for i in $$list; do \
|
unique=`for i in $$list; do \
|
||||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
done | $(am__uniquify_input)`
|
done | $(am__uniquify_input)`
|
||||||
ETAGS = etags
|
|
||||||
CTAGS = ctags
|
|
||||||
DIST_SUBDIRS = $(SUBDIRS)
|
DIST_SUBDIRS = $(SUBDIRS)
|
||||||
am__DIST_COMMON = $(srcdir)/Makefile.in \
|
am__DIST_COMMON = $(srcdir)/Makefile.in \
|
||||||
$(top_srcdir)/build-aux/depcomp \
|
$(top_srcdir)/build-aux/depcomp \
|
||||||
|
@ -415,6 +413,8 @@ CCDEPMODE = @CCDEPMODE@
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CSCOPE = @CSCOPE@
|
||||||
|
CTAGS = @CTAGS@
|
||||||
CYGPATH_W = @CYGPATH_W@
|
CYGPATH_W = @CYGPATH_W@
|
||||||
DBILIBS = @DBILIBS@
|
DBILIBS = @DBILIBS@
|
||||||
DEFS = @DEFS@
|
DEFS = @DEFS@
|
||||||
|
@ -434,6 +434,7 @@ ENOLINK_VALUE = @ENOLINK_VALUE@
|
||||||
EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
|
EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
|
||||||
EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
|
EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
|
||||||
ERRNO_H = @ERRNO_H@
|
ERRNO_H = @ERRNO_H@
|
||||||
|
ETAGS = @ETAGS@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
EXTRAS = @EXTRAS@
|
EXTRAS = @EXTRAS@
|
||||||
EXTRAS_ROOT = @EXTRAS_ROOT@
|
EXTRAS_ROOT = @EXTRAS_ROOT@
|
||||||
|
@ -1930,7 +1931,6 @@ cscopelist-am: $(am__tagged_files)
|
||||||
|
|
||||||
distclean-tags:
|
distclean-tags:
|
||||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||||
|
|
||||||
distdir: $(BUILT_SOURCES)
|
distdir: $(BUILT_SOURCES)
|
||||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Makefile.in generated by automake 1.16.3 from Makefile.am.
|
# Makefile.in generated by automake 1.16.5 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This Makefile.in is free software; the Free Software Foundation
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -293,8 +293,6 @@ am__define_uniq_tagged_files = \
|
||||||
unique=`for i in $$list; do \
|
unique=`for i in $$list; do \
|
||||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
done | $(am__uniquify_input)`
|
done | $(am__uniquify_input)`
|
||||||
ETAGS = etags
|
|
||||||
CTAGS = ctags
|
|
||||||
DIST_SUBDIRS = $(SUBDIRS)
|
DIST_SUBDIRS = $(SUBDIRS)
|
||||||
am__DIST_COMMON = $(srcdir)/Makefile.in \
|
am__DIST_COMMON = $(srcdir)/Makefile.in \
|
||||||
$(top_srcdir)/build-aux/depcomp \
|
$(top_srcdir)/build-aux/depcomp \
|
||||||
|
@ -349,6 +347,8 @@ CCDEPMODE = @CCDEPMODE@
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CSCOPE = @CSCOPE@
|
||||||
|
CTAGS = @CTAGS@
|
||||||
CYGPATH_W = @CYGPATH_W@
|
CYGPATH_W = @CYGPATH_W@
|
||||||
DBILIBS = @DBILIBS@
|
DBILIBS = @DBILIBS@
|
||||||
DEFS = @DEFS@
|
DEFS = @DEFS@
|
||||||
|
@ -368,6 +368,7 @@ ENOLINK_VALUE = @ENOLINK_VALUE@
|
||||||
EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
|
EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
|
||||||
EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
|
EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
|
||||||
ERRNO_H = @ERRNO_H@
|
ERRNO_H = @ERRNO_H@
|
||||||
|
ETAGS = @ETAGS@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
EXTRAS = @EXTRAS@
|
EXTRAS = @EXTRAS@
|
||||||
EXTRAS_ROOT = @EXTRAS_ROOT@
|
EXTRAS_ROOT = @EXTRAS_ROOT@
|
||||||
|
@ -1660,7 +1661,6 @@ cscopelist-am: $(am__tagged_files)
|
||||||
|
|
||||||
distclean-tags:
|
distclean-tags:
|
||||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||||
|
|
||||||
distdir: $(BUILT_SOURCES)
|
distdir: $(BUILT_SOURCES)
|
||||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Makefile.in generated by automake 1.16.3 from Makefile.am.
|
# Makefile.in generated by automake 1.16.5 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This Makefile.in is free software; the Free Software Foundation
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -319,8 +319,6 @@ am__define_uniq_tagged_files = \
|
||||||
unique=`for i in $$list; do \
|
unique=`for i in $$list; do \
|
||||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
done | $(am__uniquify_input)`
|
done | $(am__uniquify_input)`
|
||||||
ETAGS = etags
|
|
||||||
CTAGS = ctags
|
|
||||||
am__tty_colors_dummy = \
|
am__tty_colors_dummy = \
|
||||||
mgn= red= grn= lgn= blu= brg= std=; \
|
mgn= red= grn= lgn= blu= brg= std=; \
|
||||||
am__color_tests=no
|
am__color_tests=no
|
||||||
|
@ -553,6 +551,8 @@ CCDEPMODE = @CCDEPMODE@
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CSCOPE = @CSCOPE@
|
||||||
|
CTAGS = @CTAGS@
|
||||||
CYGPATH_W = @CYGPATH_W@
|
CYGPATH_W = @CYGPATH_W@
|
||||||
DBILIBS = @DBILIBS@
|
DBILIBS = @DBILIBS@
|
||||||
DEFS = @DEFS@
|
DEFS = @DEFS@
|
||||||
|
@ -572,6 +572,7 @@ ENOLINK_VALUE = @ENOLINK_VALUE@
|
||||||
EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
|
EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
|
||||||
EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
|
EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
|
||||||
ERRNO_H = @ERRNO_H@
|
ERRNO_H = @ERRNO_H@
|
||||||
|
ETAGS = @ETAGS@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
EXTRAS = @EXTRAS@
|
EXTRAS = @EXTRAS@
|
||||||
EXTRAS_ROOT = @EXTRAS_ROOT@
|
EXTRAS_ROOT = @EXTRAS_ROOT@
|
||||||
|
@ -2038,7 +2039,6 @@ recheck: all $(check_PROGRAMS)
|
||||||
@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
|
@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
|
||||||
@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
|
@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
|
||||||
@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
|
@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
|
||||||
|
|
||||||
distdir: $(BUILT_SOURCES)
|
distdir: $(BUILT_SOURCES)
|
||||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "utils_disk.h"
|
#include "utils_disk.h"
|
||||||
|
#include "gl/fsusage.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
np_add_name (struct name_list **list, const char *name)
|
np_add_name (struct name_list **list, const char *name)
|
||||||
|
@ -127,9 +128,12 @@ np_set_best_match(struct parameter_list *desired, struct mount_entry *mount_list
|
||||||
size_t name_len = strlen(d->name);
|
size_t name_len = strlen(d->name);
|
||||||
size_t best_match_len = 0;
|
size_t best_match_len = 0;
|
||||||
struct mount_entry *best_match = NULL;
|
struct mount_entry *best_match = NULL;
|
||||||
|
struct fs_usage fsp;
|
||||||
|
|
||||||
/* set best match if path name exactly matches a mounted device name */
|
/* set best match if path name exactly matches a mounted device name */
|
||||||
for (me = mount_list; me; me = me->me_next) {
|
for (me = mount_list; me; me = me->me_next) {
|
||||||
|
if (get_fs_usage(me->me_mountdir, me->me_devname, &fsp) < 0)
|
||||||
|
continue; /* skip if permissions do not suffice for accessing device */
|
||||||
if (strcmp(me->me_devname, d->name)==0)
|
if (strcmp(me->me_devname, d->name)==0)
|
||||||
best_match = me;
|
best_match = me;
|
||||||
}
|
}
|
||||||
|
@ -137,6 +141,8 @@ np_set_best_match(struct parameter_list *desired, struct mount_entry *mount_list
|
||||||
/* set best match by directory name if no match was found by devname */
|
/* set best match by directory name if no match was found by devname */
|
||||||
if (! best_match) {
|
if (! best_match) {
|
||||||
for (me = mount_list; me; me = me->me_next) {
|
for (me = mount_list; me; me = me->me_next) {
|
||||||
|
if (get_fs_usage(me->me_mountdir, me->me_devname, &fsp) < 0)
|
||||||
|
continue; /* skip if permissions do not suffice for accessing device */
|
||||||
size_t len = strlen (me->me_mountdir);
|
size_t len = strlen (me->me_mountdir);
|
||||||
if ((exact == FALSE && (best_match_len <= len && len <= name_len &&
|
if ((exact == FALSE && (best_match_len <= len && len <= name_len &&
|
||||||
(len == 1 || strncmp (me->me_mountdir, d->name, len) == 0)))
|
(len == 1 || strncmp (me->me_mountdir, d->name, len) == 0)))
|
||||||
|
|
|
@ -2,11 +2,11 @@ PKG="NGOSplugin"
|
||||||
NAME="monitoring-plugins"
|
NAME="monitoring-plugins"
|
||||||
DESC="Network Monitoring Plugins for Nagios and compatible"
|
DESC="Network Monitoring Plugins for Nagios and compatible"
|
||||||
ARCH="unknown"
|
ARCH="unknown"
|
||||||
VERSION="2.3.2,REV=2022.10.19.14.57"
|
VERSION="2.3.3,REV=2023.02.01.13.46"
|
||||||
CATEGORY="application"
|
CATEGORY="application"
|
||||||
VENDOR="Monitoring Plugins Development Team"
|
VENDOR="Monitoring Plugins Development Team"
|
||||||
EMAIL="devel@monitoring-plugins.org"
|
EMAIL="devel@monitoring-plugins.org"
|
||||||
PSTAMP="nag20221019145705"
|
PSTAMP="nag20230201134644"
|
||||||
BASEDIR="/"
|
BASEDIR="/"
|
||||||
CLASSES="none"
|
CLASSES="none"
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Makefile.in generated by automake 1.16.3 from Makefile.am.
|
# Makefile.in generated by automake 1.16.5 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This Makefile.in is free software; the Free Software Foundation
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -276,8 +276,6 @@ am__define_uniq_tagged_files = \
|
||||||
unique=`for i in $$list; do \
|
unique=`for i in $$list; do \
|
||||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
done | $(am__uniquify_input)`
|
done | $(am__uniquify_input)`
|
||||||
ETAGS = etags
|
|
||||||
CTAGS = ctags
|
|
||||||
am__tty_colors_dummy = \
|
am__tty_colors_dummy = \
|
||||||
mgn= red= grn= lgn= blu= brg= std=; \
|
mgn= red= grn= lgn= blu= brg= std=; \
|
||||||
am__color_tests=no
|
am__color_tests=no
|
||||||
|
@ -511,6 +509,8 @@ CCDEPMODE = @CCDEPMODE@
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CSCOPE = @CSCOPE@
|
||||||
|
CTAGS = @CTAGS@
|
||||||
CYGPATH_W = @CYGPATH_W@
|
CYGPATH_W = @CYGPATH_W@
|
||||||
DBILIBS = @DBILIBS@
|
DBILIBS = @DBILIBS@
|
||||||
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
|
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
|
||||||
|
@ -530,6 +530,7 @@ ENOLINK_VALUE = @ENOLINK_VALUE@
|
||||||
EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
|
EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
|
||||||
EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
|
EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
|
||||||
ERRNO_H = @ERRNO_H@
|
ERRNO_H = @ERRNO_H@
|
||||||
|
ETAGS = @ETAGS@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
EXTRAS = @EXTRAS@
|
EXTRAS = @EXTRAS@
|
||||||
EXTRAS_ROOT = @EXTRAS_ROOT@
|
EXTRAS_ROOT = @EXTRAS_ROOT@
|
||||||
|
@ -1985,7 +1986,6 @@ recheck: all
|
||||||
@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
|
@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
|
||||||
@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
|
@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
|
||||||
@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
|
@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
|
||||||
|
|
||||||
distdir: $(BUILT_SOURCES)
|
distdir: $(BUILT_SOURCES)
|
||||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||||
|
|
||||||
|
|
|
@ -451,6 +451,14 @@ main(int argc, char **argv)
|
||||||
packets = 5;
|
packets = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* support "--help" and "--version" */
|
||||||
|
if(argc == 2) {
|
||||||
|
if(!strcmp(argv[1], "--help"))
|
||||||
|
strcpy(argv[1], "-h");
|
||||||
|
if(!strcmp(argv[1], "--version"))
|
||||||
|
strcpy(argv[1], "-V");
|
||||||
|
}
|
||||||
|
|
||||||
/* Parse protocol arguments first */
|
/* Parse protocol arguments first */
|
||||||
for(i = 1; i < argc; i++) {
|
for(i = 1; i < argc; i++) {
|
||||||
while((arg = getopt(argc, argv, opts_str)) != EOF) {
|
while((arg = getopt(argc, argv, opts_str)) != EOF) {
|
||||||
|
@ -555,14 +563,6 @@ main(int argc, char **argv)
|
||||||
/* Parse extra opts if any */
|
/* Parse extra opts if any */
|
||||||
argv=np_extra_opts(&argc, argv, progname);
|
argv=np_extra_opts(&argc, argv, progname);
|
||||||
|
|
||||||
/* support "--help" and "--version" */
|
|
||||||
if(argc == 2) {
|
|
||||||
if(!strcmp(argv[1], "--help"))
|
|
||||||
strcpy(argv[1], "-h");
|
|
||||||
if(!strcmp(argv[1], "--version"))
|
|
||||||
strcpy(argv[1], "-V");
|
|
||||||
}
|
|
||||||
|
|
||||||
argv = &argv[optind];
|
argv = &argv[optind];
|
||||||
while(*argv) {
|
while(*argv) {
|
||||||
add_target(*argv);
|
add_target(*argv);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Makefile.in generated by automake 1.16.3 from Makefile.am.
|
# Makefile.in generated by automake 1.16.5 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This Makefile.in is free software; the Free Software Foundation
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -448,6 +448,8 @@ CCDEPMODE = @CCDEPMODE@
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CSCOPE = @CSCOPE@
|
||||||
|
CTAGS = @CTAGS@
|
||||||
CYGPATH_W = @CYGPATH_W@
|
CYGPATH_W = @CYGPATH_W@
|
||||||
DBILIBS = @DBILIBS@
|
DBILIBS = @DBILIBS@
|
||||||
DEFS = @DEFS@
|
DEFS = @DEFS@
|
||||||
|
@ -467,6 +469,7 @@ ENOLINK_VALUE = @ENOLINK_VALUE@
|
||||||
EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
|
EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
|
||||||
EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
|
EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
|
||||||
ERRNO_H = @ERRNO_H@
|
ERRNO_H = @ERRNO_H@
|
||||||
|
ETAGS = @ETAGS@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
EXTRAS = @EXTRAS@
|
EXTRAS = @EXTRAS@
|
||||||
EXTRAS_ROOT = @EXTRAS_ROOT@
|
EXTRAS_ROOT = @EXTRAS_ROOT@
|
||||||
|
@ -1828,7 +1831,6 @@ recheck: all
|
||||||
@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
|
@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
|
||||||
@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
|
@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
|
||||||
@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
|
@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
|
||||||
|
|
||||||
distdir: $(BUILT_SOURCES)
|
distdir: $(BUILT_SOURCES)
|
||||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||||
|
|
||||||
|
|
|
@ -76,6 +76,7 @@ print_usage() {
|
||||||
echo ""
|
echo ""
|
||||||
echo "Other parameters:"
|
echo "Other parameters:"
|
||||||
echo " -a|--all : Print all matching lines"
|
echo " -a|--all : Print all matching lines"
|
||||||
|
echo " --exclude: Exclude a pattern (-p or -e also applies here when used)"
|
||||||
echo " -p|--perl-regex : Use perl style regular expressions in the query"
|
echo " -p|--perl-regex : Use perl style regular expressions in the query"
|
||||||
echo " -e|--extended-regex : Use extended style regular expressions in the query (not necessary for GNU grep)"
|
echo " -e|--extended-regex : Use extended style regular expressions in the query (not necessary for GNU grep)"
|
||||||
}
|
}
|
||||||
|
@ -99,82 +100,46 @@ if [ $# -lt 1 ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Grab the command line arguments
|
# Grab the command line arguments
|
||||||
|
|
||||||
#logfile=$1
|
|
||||||
#oldlog=$2
|
|
||||||
#query=$3
|
|
||||||
exitstatus=$STATE_WARNING #default
|
exitstatus=$STATE_WARNING #default
|
||||||
while test -n "$1"; do
|
while test -n "$1"; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--help)
|
-h | --help)
|
||||||
print_help
|
print_help
|
||||||
exit "$STATE_OK"
|
exit "$STATE_OK"
|
||||||
;;
|
;;
|
||||||
-h)
|
-V | --version)
|
||||||
print_help
|
|
||||||
exit "$STATE_OK"
|
|
||||||
;;
|
|
||||||
--version)
|
|
||||||
print_revision "$PROGNAME" "$REVISION"
|
print_revision "$PROGNAME" "$REVISION"
|
||||||
exit "$STATE_OK"
|
exit "$STATE_OK"
|
||||||
;;
|
;;
|
||||||
-V)
|
-F | --filename)
|
||||||
print_revision "$PROGNAME" "$REVISION"
|
|
||||||
exit "$STATE_OK"
|
|
||||||
;;
|
|
||||||
--filename)
|
|
||||||
logfile=$2
|
logfile=$2
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
-F)
|
-O | --oldlog)
|
||||||
logfile=$2
|
|
||||||
shift 2
|
|
||||||
;;
|
|
||||||
--oldlog)
|
|
||||||
oldlog=$2
|
oldlog=$2
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
-O)
|
-q | --query)
|
||||||
oldlog=$2
|
|
||||||
shift 2
|
|
||||||
;;
|
|
||||||
--query)
|
|
||||||
query=$2
|
query=$2
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
-q)
|
--exclude)
|
||||||
query=$2
|
exclude=$2
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
-x)
|
-x | --exitstatus)
|
||||||
exitstatus=$2
|
exitstatus=$2
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
--exitstatus)
|
-e | --extended-regex)
|
||||||
exitstatus=$2
|
|
||||||
shift 2
|
|
||||||
;;
|
|
||||||
--extended-regex)
|
|
||||||
ERE=1
|
ERE=1
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-e)
|
-p | --perl-regex)
|
||||||
ERE=1
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
--perl-regex)
|
|
||||||
PRE=1
|
PRE=1
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-p)
|
-a | --all)
|
||||||
PRE=1
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
--all)
|
|
||||||
ALL=1
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-a)
|
|
||||||
ALL=1
|
ALL=1
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
@ -245,18 +210,24 @@ diff "$logfile" "$oldlog" | grep -v "^>" > "$tempdiff"
|
||||||
|
|
||||||
|
|
||||||
if [ $ALL ]; then
|
if [ $ALL ]; then
|
||||||
# Get the last matching entry in the diff file
|
# Get all matching entries in the diff file
|
||||||
|
if [ -n "$exclude" ]; then
|
||||||
|
entry=$($GREP "$query" "$tempdiff" | $GREP -v "$exclude")
|
||||||
|
count=$($GREP "$query" "$tempdiff" | $GREP -vc "$exclude")
|
||||||
|
else
|
||||||
entry=$($GREP "$query" "$tempdiff")
|
entry=$($GREP "$query" "$tempdiff")
|
||||||
|
count=$($GREP -c "$query" "$tempdiff")
|
||||||
# Count the number of matching log entries we have
|
fi
|
||||||
count=$(echo "$entry" | wc -l)
|
|
||||||
|
|
||||||
else
|
else
|
||||||
# Count the number of matching log entries we have
|
|
||||||
count=$($GREP -c "$query" "$tempdiff")
|
|
||||||
|
|
||||||
# Get the last matching entry in the diff file
|
# Get the last matching entry in the diff file
|
||||||
|
if [ -n "$exclude" ]; then
|
||||||
|
entry=$($GREP "$query" "$tempdiff" | $GREP -v "$exclude" | tail -1)
|
||||||
|
count=$($GREP "$query" "$tempdiff" | $GREP -vc "$exclude")
|
||||||
|
else
|
||||||
entry=$($GREP "$query" "$tempdiff" | tail -1)
|
entry=$($GREP "$query" "$tempdiff" | tail -1)
|
||||||
|
count=$($GREP -c "$query" "$tempdiff")
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f "$tempdiff"
|
rm -f "$tempdiff"
|
||||||
|
|
|
@ -537,9 +537,9 @@ elsif ( $mailq eq "nullmailer" ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
while (<MAILQ>) {
|
while (<MAILQ>) {
|
||||||
#2006-06-22 16:00:00 282 bytes
|
#2022-08-25 01:30:40 502 bytes from <user@example.com>
|
||||||
|
|
||||||
if (/^[1-9][0-9]*-[01][0-9]-[0-3][0-9]\s[0-2][0-9]\:[0-5][0-9]\:[0-5][0-9]\s+[0-9]+\sbytes/) {
|
if (/^\d{4}-\d{2}-\d{2}\s+\d{2}\:\d{2}\:\d{2}\s+\d+\sbytes/) {
|
||||||
$msg_q++ ;
|
$msg_q++ ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
82
plugins-scripts/t/check_log.t
Normal file
82
plugins-scripts/t/check_log.t
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
#!/usr/bin/perl -w -I ..
|
||||||
|
#
|
||||||
|
# check_log tests
|
||||||
|
#
|
||||||
|
#
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use Test::More;
|
||||||
|
use NPTest;
|
||||||
|
|
||||||
|
my $tests = 18;
|
||||||
|
plan tests => $tests;
|
||||||
|
|
||||||
|
my $firstTimeOutput ='/^Log check data initialized/';
|
||||||
|
my $okOutput = '/^Log check ok - 0 pattern matches found/';
|
||||||
|
my $criticalOutput = '/^\(\d+\) < /';
|
||||||
|
my $multilineOutput = '/\(3\) <.*\n.*\n.*$/';
|
||||||
|
my $unknownOutput = '/^Usage: /';
|
||||||
|
my $unknownArgOutput = '/^Unknown argument: /';
|
||||||
|
my $bothRegexOutput = '/^Can not use extended and perl regex/';
|
||||||
|
|
||||||
|
my $result;
|
||||||
|
my $temp_file = "/tmp/check_log.tmp";
|
||||||
|
my $oldlog = "/tmp/oldlog.tmp";
|
||||||
|
|
||||||
|
open(FH, '>', $temp_file) or die $!;
|
||||||
|
close(FH);
|
||||||
|
|
||||||
|
$result = NPTest->testCmd("./check_log");
|
||||||
|
cmp_ok( $result->return_code, '==', 3, "Missing parameters" );
|
||||||
|
like ( $result->output, $unknownOutput, "Output for unknown correct" );
|
||||||
|
|
||||||
|
$result = NPTest->testCmd("./check_log -f");
|
||||||
|
cmp_ok( $result->return_code, '==', 3, "Wrong parameters" );
|
||||||
|
like ( $result->output, $unknownArgOutput, "Output for unknown correct" );
|
||||||
|
|
||||||
|
$result = NPTest->testCmd("./check_log -F ".$temp_file." -O ".$oldlog." -q 'Simple match' -e -p");
|
||||||
|
cmp_ok( $result->return_code, '==', 3, "Both regex parameters" );
|
||||||
|
like ( $result->output, $bothRegexOutput, "Output for unknown correct" );
|
||||||
|
|
||||||
|
$result = NPTest->testCmd("./check_log -F ".$temp_file." -O ".$oldlog." -q 'Simple match'");
|
||||||
|
cmp_ok( $result->return_code, '==', 0, "First time executing" );
|
||||||
|
like ( $result->output, $firstTimeOutput, "Output for first time executing correct" );
|
||||||
|
|
||||||
|
open(FH, '>>', $temp_file) or die $!;
|
||||||
|
print FH "This is some text, that should not match\n";
|
||||||
|
close(FH);
|
||||||
|
|
||||||
|
$result = NPTest->testCmd("./check_log -F ".$temp_file." -O ".$oldlog." -q 'No match'");
|
||||||
|
cmp_ok( $result->return_code, '==', 0, "No match" );
|
||||||
|
like ( $result->output, $okOutput, "Output for no match correct" );
|
||||||
|
|
||||||
|
open(FH, '>>', $temp_file) or die $!;
|
||||||
|
print FH "This text should match\n";
|
||||||
|
close(FH);
|
||||||
|
|
||||||
|
$result = NPTest->testCmd("./check_log -F ".$temp_file." -O ".$oldlog." -q 'should match'");
|
||||||
|
cmp_ok( $result->return_code, '==', 2, "Pattern match" );
|
||||||
|
like ( $result->output, $criticalOutput, "Output for match correct" );
|
||||||
|
|
||||||
|
open(FH, '>>', $temp_file) or die $!;
|
||||||
|
print FH "This text should not match, because it is excluded\n";
|
||||||
|
close(FH);
|
||||||
|
|
||||||
|
$result = NPTest->testCmd("./check_log -F ".$temp_file." -O ".$oldlog." -q 'match' --exclude 'because'");
|
||||||
|
cmp_ok( $result->return_code, '==', 0, "Exclude a pattern" );
|
||||||
|
like ( $result->output, $okOutput, "Output for no match correct" );
|
||||||
|
|
||||||
|
open(FH, '>>', $temp_file) or die $!;
|
||||||
|
print FH "Trying\nwith\nmultiline\nignore me\n";
|
||||||
|
close(FH);
|
||||||
|
|
||||||
|
$result = NPTest->testCmd("./check_log -F ".$temp_file." -O ".$oldlog." -q 'Trying\\|with\\|multiline\\|ignore' --exclude 'me' --all");
|
||||||
|
cmp_ok( $result->return_code, '==', 2, "Multiline pattern match with --all" );
|
||||||
|
like ( $result->output, $multilineOutput, "Output for multiline match correct" );
|
||||||
|
|
||||||
|
$result = NPTest->testCmd("./check_log -F ".$temp_file." -O ".$oldlog." -q 'match' -a");
|
||||||
|
cmp_ok( $result->return_code, '==', 0, "Non matching --all" );
|
||||||
|
like ( $result->output, $okOutput, "Output for no match correct" );
|
||||||
|
|
||||||
|
unlink($oldlog);
|
||||||
|
unlink($temp_file);
|
|
@ -1,7 +1,7 @@
|
||||||
# Makefile.in generated by automake 1.16.3 from Makefile.am.
|
# Makefile.in generated by automake 1.16.5 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This Makefile.in is free software; the Free Software Foundation
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -515,8 +515,6 @@ am__define_uniq_tagged_files = \
|
||||||
unique=`for i in $$list; do \
|
unique=`for i in $$list; do \
|
||||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
done | $(am__uniquify_input)`
|
done | $(am__uniquify_input)`
|
||||||
ETAGS = etags
|
|
||||||
CTAGS = ctags
|
|
||||||
am__tty_colors_dummy = \
|
am__tty_colors_dummy = \
|
||||||
mgn= red= grn= lgn= blu= brg= std=; \
|
mgn= red= grn= lgn= blu= brg= std=; \
|
||||||
am__color_tests=no
|
am__color_tests=no
|
||||||
|
@ -775,6 +773,8 @@ CCDEPMODE = @CCDEPMODE@
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CSCOPE = @CSCOPE@
|
||||||
|
CTAGS = @CTAGS@
|
||||||
CYGPATH_W = @CYGPATH_W@
|
CYGPATH_W = @CYGPATH_W@
|
||||||
DBILIBS = @DBILIBS@
|
DBILIBS = @DBILIBS@
|
||||||
# gettext docs say to use AM_CPPFLAGS, but per module_CPPFLAGS override this
|
# gettext docs say to use AM_CPPFLAGS, but per module_CPPFLAGS override this
|
||||||
|
@ -795,6 +795,7 @@ ENOLINK_VALUE = @ENOLINK_VALUE@
|
||||||
EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
|
EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
|
||||||
EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
|
EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
|
||||||
ERRNO_H = @ERRNO_H@
|
ERRNO_H = @ERRNO_H@
|
||||||
|
ETAGS = @ETAGS@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
EXTRAS = @EXTRAS@
|
EXTRAS = @EXTRAS@
|
||||||
EXTRAS_ROOT = @EXTRAS_ROOT@
|
EXTRAS_ROOT = @EXTRAS_ROOT@
|
||||||
|
@ -2608,7 +2609,6 @@ recheck: all
|
||||||
@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
|
@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
|
||||||
@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
|
@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
|
||||||
@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
|
@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
|
||||||
|
|
||||||
distdir: $(BUILT_SOURCES)
|
distdir: $(BUILT_SOURCES)
|
||||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||||
|
|
||||||
|
|
|
@ -76,9 +76,9 @@ int cmpstringp(const void *p1, const void *p2);
|
||||||
|
|
||||||
/* configuration variables */
|
/* configuration variables */
|
||||||
static int verbose = 0; /* -v */
|
static int verbose = 0; /* -v */
|
||||||
static int list = 0; /* list packages available for upgrade */
|
static bool list = false; /* list packages available for upgrade */
|
||||||
static int do_update = 0; /* whether to call apt-get update */
|
static bool do_update = false; /* whether to call apt-get update */
|
||||||
static int only_critical = 0; /* whether to warn about non-critical updates */
|
static bool only_critical = false; /* whether to warn about non-critical updates */
|
||||||
static upgrade_type upgrade = UPGRADE; /* which type of upgrade to do */
|
static upgrade_type upgrade = UPGRADE; /* which type of upgrade to do */
|
||||||
static char *upgrade_opts = NULL; /* options to override defaults for upgrade */
|
static char *upgrade_opts = NULL; /* options to override defaults for upgrade */
|
||||||
static char *update_opts = NULL; /* options to override defaults for update */
|
static char *update_opts = NULL; /* options to override defaults for update */
|
||||||
|
@ -119,7 +119,7 @@ int main (int argc, char **argv) {
|
||||||
|
|
||||||
if(sec_count > 0){
|
if(sec_count > 0){
|
||||||
result = max_state(result, STATE_CRITICAL);
|
result = max_state(result, STATE_CRITICAL);
|
||||||
} else if(packages_available >= packages_warning && only_critical == 0){
|
} else if(packages_available >= packages_warning && only_critical == false){
|
||||||
result = max_state(result, STATE_WARNING);
|
result = max_state(result, STATE_WARNING);
|
||||||
} else if(result > STATE_UNKNOWN){
|
} else if(result > STATE_UNKNOWN){
|
||||||
result = STATE_UNKNOWN;
|
result = STATE_UNKNOWN;
|
||||||
|
@ -144,7 +144,7 @@ int main (int argc, char **argv) {
|
||||||
|
|
||||||
for(i = 0; i < sec_count; i++)
|
for(i = 0; i < sec_count; i++)
|
||||||
printf("%s (security)\n", secpackages_list[i]);
|
printf("%s (security)\n", secpackages_list[i]);
|
||||||
if (only_critical == 0) {
|
if (only_critical == false) {
|
||||||
for(i = 0; i < packages_available - sec_count; i++)
|
for(i = 0; i < packages_available - sec_count; i++)
|
||||||
printf("%s\n", packages_list[i]);
|
printf("%s\n", packages_list[i]);
|
||||||
}
|
}
|
||||||
|
@ -166,7 +166,7 @@ int process_arguments (int argc, char **argv) {
|
||||||
{"upgrade", optional_argument, 0, 'U'},
|
{"upgrade", optional_argument, 0, 'U'},
|
||||||
{"no-upgrade", no_argument, 0, 'n'},
|
{"no-upgrade", no_argument, 0, 'n'},
|
||||||
{"dist-upgrade", optional_argument, 0, 'd'},
|
{"dist-upgrade", optional_argument, 0, 'd'},
|
||||||
{"list", no_argument, 0, 'l'},
|
{"list", no_argument, false, 'l'},
|
||||||
{"include", required_argument, 0, 'i'},
|
{"include", required_argument, 0, 'i'},
|
||||||
{"exclude", required_argument, 0, 'e'},
|
{"exclude", required_argument, 0, 'e'},
|
||||||
{"critical", required_argument, 0, 'c'},
|
{"critical", required_argument, 0, 'c'},
|
||||||
|
@ -212,14 +212,14 @@ int process_arguments (int argc, char **argv) {
|
||||||
upgrade=NO_UPGRADE;
|
upgrade=NO_UPGRADE;
|
||||||
break;
|
break;
|
||||||
case 'u':
|
case 'u':
|
||||||
do_update=1;
|
do_update=true;
|
||||||
if(optarg!=NULL){
|
if(optarg!=NULL){
|
||||||
update_opts=strdup(optarg);
|
update_opts=strdup(optarg);
|
||||||
if(update_opts==NULL) die(STATE_UNKNOWN, "strdup failed");
|
if(update_opts==NULL) die(STATE_UNKNOWN, "strdup failed");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'l':
|
case 'l':
|
||||||
list=1;
|
list=true;
|
||||||
break;
|
break;
|
||||||
case 'i':
|
case 'i':
|
||||||
do_include=add_to_regexp(do_include, optarg);
|
do_include=add_to_regexp(do_include, optarg);
|
||||||
|
@ -231,7 +231,7 @@ int process_arguments (int argc, char **argv) {
|
||||||
do_critical=add_to_regexp(do_critical, optarg);
|
do_critical=add_to_regexp(do_critical, optarg);
|
||||||
break;
|
break;
|
||||||
case 'o':
|
case 'o':
|
||||||
only_critical=1;
|
only_critical=true;
|
||||||
break;
|
break;
|
||||||
case INPUT_FILE_OPT:
|
case INPUT_FILE_OPT:
|
||||||
input_filename = optarg;
|
input_filename = optarg;
|
||||||
|
@ -371,7 +371,7 @@ int run_update(void){
|
||||||
struct output chld_out, chld_err;
|
struct output chld_out, chld_err;
|
||||||
char *cmdline;
|
char *cmdline;
|
||||||
|
|
||||||
/* run the upgrade */
|
/* run the update */
|
||||||
cmdline = construct_cmdline(NO_UPGRADE, update_opts);
|
cmdline = construct_cmdline(NO_UPGRADE, update_opts);
|
||||||
result = np_runcmd(cmdline, &chld_out, &chld_err, 0);
|
result = np_runcmd(cmdline, &chld_out, &chld_err, 0);
|
||||||
/* apt-get update changes exit status if it can't fetch packages.
|
/* apt-get update changes exit status if it can't fetch packages.
|
||||||
|
@ -501,16 +501,6 @@ print_help (void)
|
||||||
|
|
||||||
printf(UT_PLUG_TIMEOUT, timeout_interval);
|
printf(UT_PLUG_TIMEOUT, timeout_interval);
|
||||||
|
|
||||||
printf (" %s\n", "-U, --upgrade=OPTS");
|
|
||||||
printf (" %s\n", _("[Default] Perform an upgrade. If an optional OPTS argument is provided,"));
|
|
||||||
printf (" %s\n", _("apt-get will be run with these command line options instead of the"));
|
|
||||||
printf (" %s", _("default "));
|
|
||||||
printf ("(%s).\n", UPGRADE_DEFAULT_OPTS);
|
|
||||||
printf (" %s\n", _("Note that you may be required to have root privileges if you do not use"));
|
|
||||||
printf (" %s\n", _("the default options."));
|
|
||||||
printf (" %s\n", "-d, --dist-upgrade=OPTS");
|
|
||||||
printf (" %s\n", _("Perform a dist-upgrade instead of normal upgrade. Like with -U OPTS"));
|
|
||||||
printf (" %s\n", _("can be provided to override the default options."));
|
|
||||||
printf (" %s\n", "-n, --no-upgrade");
|
printf (" %s\n", "-n, --no-upgrade");
|
||||||
printf (" %s\n", _("Do not run the upgrade. Probably not useful (without -u at least)."));
|
printf (" %s\n", _("Do not run the upgrade. Probably not useful (without -u at least)."));
|
||||||
printf (" %s\n", "-l, --list");
|
printf (" %s\n", "-l, --list");
|
||||||
|
@ -530,7 +520,7 @@ print_help (void)
|
||||||
printf (" %s\n", _("this REGEXP, the plugin will return CRITICAL status. Can be specified"));
|
printf (" %s\n", _("this REGEXP, the plugin will return CRITICAL status. Can be specified"));
|
||||||
printf (" %s\n", _("multiple times like above. Default is a regexp matching security"));
|
printf (" %s\n", _("multiple times like above. Default is a regexp matching security"));
|
||||||
printf (" %s\n", _("upgrades for Debian and Ubuntu:"));
|
printf (" %s\n", _("upgrades for Debian and Ubuntu:"));
|
||||||
printf (" \t\%s\n", SECURITY_RE);
|
printf (" \t%s\n", SECURITY_RE);
|
||||||
printf (" %s\n", _("Note that the package must first match the include list before its"));
|
printf (" %s\n", _("Note that the package must first match the include list before its"));
|
||||||
printf (" %s\n", _("information is compared against the critical list."));
|
printf (" %s\n", _("information is compared against the critical list."));
|
||||||
printf (" %s\n", "-o, --only-critical");
|
printf (" %s\n", "-o, --only-critical");
|
||||||
|
@ -538,7 +528,7 @@ print_help (void)
|
||||||
printf (" %s\n", _("of upgrades will be printed, but any non-critical upgrades will not cause"));
|
printf (" %s\n", _("of upgrades will be printed, but any non-critical upgrades will not cause"));
|
||||||
printf (" %s\n", _("the plugin to return WARNING status."));
|
printf (" %s\n", _("the plugin to return WARNING status."));
|
||||||
printf (" %s\n", "-w, --packages-warning");
|
printf (" %s\n", "-w, --packages-warning");
|
||||||
printf (" %s\n", _("Minumum number of packages available for upgrade to return WARNING status."));
|
printf (" %s\n", _("Minimum number of packages available for upgrade to return WARNING status."));
|
||||||
printf (" %s\n\n", _("Default is 1 package."));
|
printf (" %s\n\n", _("Default is 1 package."));
|
||||||
|
|
||||||
printf ("%s\n\n", _("The following options require root privileges and should be used with care:"));
|
printf ("%s\n\n", _("The following options require root privileges and should be used with care:"));
|
||||||
|
@ -547,6 +537,16 @@ print_help (void)
|
||||||
printf (" %s\n", _("the default options. Note: you may also need to adjust the global"));
|
printf (" %s\n", _("the default options. Note: you may also need to adjust the global"));
|
||||||
printf (" %s\n", _("timeout (with -t) to prevent the plugin from timing out if apt-get"));
|
printf (" %s\n", _("timeout (with -t) to prevent the plugin from timing out if apt-get"));
|
||||||
printf (" %s\n", _("upgrade is expected to take longer than the default timeout."));
|
printf (" %s\n", _("upgrade is expected to take longer than the default timeout."));
|
||||||
|
printf (" %s\n", "-U, --upgrade=OPTS");
|
||||||
|
printf (" %s\n", _("Perform an upgrade. If an optional OPTS argument is provided,"));
|
||||||
|
printf (" %s\n", _("apt-get will be run with these command line options instead of the"));
|
||||||
|
printf (" %s", _("default "));
|
||||||
|
printf ("(%s).\n", UPGRADE_DEFAULT_OPTS);
|
||||||
|
printf (" %s\n", _("Note that you may be required to have root privileges if you do not use"));
|
||||||
|
printf (" %s\n", _("the default options, which will only run a simulation and NOT perform the upgrade"));
|
||||||
|
printf (" %s\n", "-d, --dist-upgrade=OPTS");
|
||||||
|
printf (" %s\n", _("Perform a dist-upgrade instead of normal upgrade. Like with -U OPTS"));
|
||||||
|
printf (" %s\n", _("can be provided to override the default options."));
|
||||||
|
|
||||||
printf(UT_SUPPORT);
|
printf(UT_SUPPORT);
|
||||||
}
|
}
|
||||||
|
|
|
@ -476,6 +476,18 @@ check_http (void)
|
||||||
printf ("* curl CURLOPT_RESOLVE: %s\n", dnscache);
|
printf ("* curl CURLOPT_RESOLVE: %s\n", dnscache);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If server_address is an IPv6 address it must be surround by square brackets
|
||||||
|
struct in6_addr tmp_in_addr;
|
||||||
|
if (inet_pton(AF_INET6, server_address, &tmp_in_addr) == 1) {
|
||||||
|
char *new_server_address = malloc(strlen(server_address) + 3);
|
||||||
|
if (new_server_address == NULL) {
|
||||||
|
die(STATE_UNKNOWN, "HTTP UNKNOWN - Unable to allocate memory\n");
|
||||||
|
}
|
||||||
|
snprintf(new_server_address, strlen(server_address)+3, "[%s]", server_address);
|
||||||
|
free(server_address);
|
||||||
|
server_address = new_server_address;
|
||||||
|
}
|
||||||
|
|
||||||
/* compose URL: use the address we want to connect to, set Host: header later */
|
/* compose URL: use the address we want to connect to, set Host: header later */
|
||||||
snprintf (url, DEFAULT_BUFFER_SIZE, "%s://%s:%d%s",
|
snprintf (url, DEFAULT_BUFFER_SIZE, "%s://%s:%d%s",
|
||||||
use_ssl ? "https" : "http",
|
use_ssl ? "https" : "http",
|
||||||
|
@ -999,10 +1011,12 @@ GOT_FIRST_CERT:
|
||||||
result = max_state_alt(get_status(total_time, thlds), result);
|
result = max_state_alt(get_status(total_time, thlds), result);
|
||||||
|
|
||||||
/* Cut-off trailing characters */
|
/* Cut-off trailing characters */
|
||||||
|
if (strlen(msg) >= 2) {
|
||||||
if(msg[strlen(msg)-2] == ',')
|
if(msg[strlen(msg)-2] == ',')
|
||||||
msg[strlen(msg)-2] = '\0';
|
msg[strlen(msg)-2] = '\0';
|
||||||
else
|
else
|
||||||
msg[strlen(msg)-3] = '\0';
|
msg[strlen(msg)-3] = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
/* TODO: separate _() msg and status code: die (result, "HTTP %s: %s\n", state_text(result), msg); */
|
/* TODO: separate _() msg and status code: die (result, "HTTP %s: %s\n", state_text(result), msg); */
|
||||||
die (result, "HTTP %s: %s %d %s%s%s - %d bytes in %.3f second response time %s|%s\n%s%s",
|
die (result, "HTTP %s: %s %d %s%s%s - %d bytes in %.3f second response time %s|%s\n%s%s",
|
||||||
|
@ -1666,7 +1680,7 @@ process_arguments (int argc, char **argv)
|
||||||
curl_http_version = CURL_HTTP_VERSION_NONE;
|
curl_http_version = CURL_HTTP_VERSION_NONE;
|
||||||
#endif /* LIBCURL_VERSION_NUM >= MAKE_LIBCURL_VERSION(7, 33, 0) */
|
#endif /* LIBCURL_VERSION_NUM >= MAKE_LIBCURL_VERSION(7, 33, 0) */
|
||||||
} else {
|
} else {
|
||||||
fprintf (stderr, "unkown http-version parameter: %s\n", optarg);
|
fprintf (stderr, "unknown http-version parameter: %s\n", optarg);
|
||||||
exit (STATE_WARNING);
|
exit (STATE_WARNING);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -2010,9 +2024,12 @@ curlhelp_buffer_write_callback (void *buffer, size_t size, size_t nmemb, void *s
|
||||||
curlhelp_write_curlbuf *buf = (curlhelp_write_curlbuf *)stream;
|
curlhelp_write_curlbuf *buf = (curlhelp_write_curlbuf *)stream;
|
||||||
|
|
||||||
while (buf->bufsize < buf->buflen + size * nmemb + 1) {
|
while (buf->bufsize < buf->buflen + size * nmemb + 1) {
|
||||||
buf->bufsize *= buf->bufsize * 2;
|
buf->bufsize = buf->bufsize * 2;
|
||||||
buf->buf = (char *)realloc (buf->buf, buf->bufsize);
|
buf->buf = (char *)realloc (buf->buf, buf->bufsize);
|
||||||
if (buf->buf == NULL) return -1;
|
if (buf->buf == NULL) {
|
||||||
|
fprintf(stderr, "malloc failed (%d) %s\n", errno, strerror(errno));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy (buf->buf + buf->buflen, buffer, size * nmemb);
|
memcpy (buf->buf + buf->buflen, buffer, size * nmemb);
|
||||||
|
|
|
@ -951,7 +951,7 @@ void
|
||||||
print_usage (void)
|
print_usage (void)
|
||||||
{
|
{
|
||||||
printf ("%s\n", _("Usage:"));
|
printf ("%s\n", _("Usage:"));
|
||||||
printf (" %s -w limit -c limit [-W limit] [-K limit] {-p path | -x device}\n", progname);
|
printf (" %s {-w absolute_limit |-w percentage_limit% | -W inode_percentage_limit } {-c absolute_limit|-c percentage_limit% | -K inode_percentage_limit } {-p path | -x device}\n", progname);
|
||||||
printf ("[-C] [-E] [-e] [-f] [-g group ] [-k] [-l] [-M] [-m] [-R path ] [-r path ]\n");
|
printf ("[-C] [-E] [-e] [-f] [-g group ] [-k] [-l] [-M] [-m] [-R path ] [-r path ]\n");
|
||||||
printf ("[-t timeout] [-u unit] [-v] [-X type] [-N type]\n");
|
printf ("[-t timeout] [-u unit] [-v] [-X type] [-N type]\n");
|
||||||
}
|
}
|
||||||
|
|
|
@ -492,7 +492,7 @@ void print_help (void) {
|
||||||
printf (" %s\n", "-c, --critical=THRESHOLD");
|
printf (" %s\n", "-c, --critical=THRESHOLD");
|
||||||
printf (" %s\n", _("critical threshold pair"));
|
printf (" %s\n", _("critical threshold pair"));
|
||||||
printf (" %s\n", "-a, --alive");
|
printf (" %s\n", "-a, --alive");
|
||||||
printf (" %s\n", _("Return OK after first successfull reply"));
|
printf (" %s\n", _("Return OK after first successful reply"));
|
||||||
printf (" %s\n", "-b, --bytes=INTEGER");
|
printf (" %s\n", "-b, --bytes=INTEGER");
|
||||||
printf (" %s (default: %d)\n", _("size of ICMP packet"),PACKET_SIZE);
|
printf (" %s (default: %d)\n", _("size of ICMP packet"),PACKET_SIZE);
|
||||||
printf (" %s\n", "-n, --number=INTEGER");
|
printf (" %s\n", "-n, --number=INTEGER");
|
||||||
|
|
|
@ -31,13 +31,14 @@
|
||||||
*
|
*
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
/* splint -I. -I../../plugins -I../../lib/ -I/usr/kerberos/include/ ../../plugins/check_http.c */
|
|
||||||
|
|
||||||
const char *progname = "check_http";
|
const char *progname = "check_http";
|
||||||
const char *copyright = "1999-2013";
|
const char *copyright = "1999-2022";
|
||||||
const char *email = "devel@monitoring-plugins.org";
|
const char *email = "devel@monitoring-plugins.org";
|
||||||
|
|
||||||
|
// Do NOT sort those headers, it will break the build
|
||||||
|
// TODO: Fix this
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "base64.h"
|
||||||
#include "netutils.h"
|
#include "netutils.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "base64.h"
|
#include "base64.h"
|
||||||
|
@ -57,8 +58,8 @@ enum {
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef HAVE_SSL
|
#ifdef HAVE_SSL
|
||||||
int check_cert = FALSE;
|
bool check_cert = false;
|
||||||
int continue_after_check_cert = FALSE;
|
bool continue_after_check_cert = false;
|
||||||
int ssl_version = 0;
|
int ssl_version = 0;
|
||||||
int days_till_exp_warn, days_till_exp_crit;
|
int days_till_exp_warn, days_till_exp_crit;
|
||||||
char *randbuff;
|
char *randbuff;
|
||||||
|
@ -69,7 +70,7 @@ X509 *server_cert;
|
||||||
# define my_recv(buf, len) read(sd, buf, len)
|
# define my_recv(buf, len) read(sd, buf, len)
|
||||||
# define my_send(buf, len) send(sd, buf, len, 0)
|
# define my_send(buf, len) send(sd, buf, len, 0)
|
||||||
#endif /* HAVE_SSL */
|
#endif /* HAVE_SSL */
|
||||||
int no_body = FALSE;
|
bool no_body = false;
|
||||||
int maximum_age = -1;
|
int maximum_age = -1;
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
@ -91,7 +92,7 @@ struct timeval tv_temp;
|
||||||
#define HTTP_URL "/"
|
#define HTTP_URL "/"
|
||||||
#define CRLF "\r\n"
|
#define CRLF "\r\n"
|
||||||
|
|
||||||
int specify_port = FALSE;
|
bool specify_port = false;
|
||||||
int server_port = HTTP_PORT;
|
int server_port = HTTP_PORT;
|
||||||
int virtual_port = 0;
|
int virtual_port = 0;
|
||||||
char server_port_text[6] = "";
|
char server_port_text[6] = "";
|
||||||
|
@ -106,23 +107,21 @@ int server_expect_yn = 0;
|
||||||
char server_expect[MAX_INPUT_BUFFER] = HTTP_EXPECT;
|
char server_expect[MAX_INPUT_BUFFER] = HTTP_EXPECT;
|
||||||
char header_expect[MAX_INPUT_BUFFER] = "";
|
char header_expect[MAX_INPUT_BUFFER] = "";
|
||||||
char string_expect[MAX_INPUT_BUFFER] = "";
|
char string_expect[MAX_INPUT_BUFFER] = "";
|
||||||
char output_header_search[30] = "";
|
|
||||||
char output_string_search[30] = "";
|
|
||||||
char *warning_thresholds = NULL;
|
char *warning_thresholds = NULL;
|
||||||
char *critical_thresholds = NULL;
|
char *critical_thresholds = NULL;
|
||||||
thresholds *thlds;
|
thresholds *thlds;
|
||||||
char user_auth[MAX_INPUT_BUFFER] = "";
|
char user_auth[MAX_INPUT_BUFFER] = "";
|
||||||
char proxy_auth[MAX_INPUT_BUFFER] = "";
|
char proxy_auth[MAX_INPUT_BUFFER] = "";
|
||||||
int display_html = FALSE;
|
bool display_html = false;
|
||||||
char **http_opt_headers;
|
char **http_opt_headers;
|
||||||
int http_opt_headers_count = 0;
|
int http_opt_headers_count = 0;
|
||||||
int onredirect = STATE_OK;
|
int onredirect = STATE_OK;
|
||||||
int followsticky = STICKY_NONE;
|
int followsticky = STICKY_NONE;
|
||||||
int use_ssl = FALSE;
|
bool use_ssl = false;
|
||||||
int use_sni = FALSE;
|
bool use_sni = false;
|
||||||
int verbose = FALSE;
|
bool verbose = false;
|
||||||
int show_extended_perfdata = FALSE;
|
bool show_extended_perfdata = false;
|
||||||
int show_body = FALSE;
|
bool show_body = false;
|
||||||
int sd;
|
int sd;
|
||||||
int min_page_len = 0;
|
int min_page_len = 0;
|
||||||
int max_page_len = 0;
|
int max_page_len = 0;
|
||||||
|
@ -136,10 +135,11 @@ char buffer[MAX_INPUT_BUFFER];
|
||||||
char *client_cert = NULL;
|
char *client_cert = NULL;
|
||||||
char *client_privkey = NULL;
|
char *client_privkey = NULL;
|
||||||
|
|
||||||
int process_arguments (int, char **);
|
// Forward function declarations
|
||||||
|
bool process_arguments (int, char **);
|
||||||
int check_http (void);
|
int check_http (void);
|
||||||
void redir (char *pos, char *status_line);
|
void redir (char *pos, char *status_line);
|
||||||
int server_type_check(const char *type);
|
bool server_type_check(const char *type);
|
||||||
int server_port_check(int ssl_flag);
|
int server_port_check(int ssl_flag);
|
||||||
char *perfd_time (double microsec);
|
char *perfd_time (double microsec);
|
||||||
char *perfd_time_connect (double microsec);
|
char *perfd_time_connect (double microsec);
|
||||||
|
@ -150,6 +150,7 @@ char *perfd_time_transfer (double microsec);
|
||||||
char *perfd_size (int page_len);
|
char *perfd_size (int page_len);
|
||||||
void print_help (void);
|
void print_help (void);
|
||||||
void print_usage (void);
|
void print_usage (void);
|
||||||
|
char *unchunk_content(const char *content);
|
||||||
|
|
||||||
int
|
int
|
||||||
main (int argc, char **argv)
|
main (int argc, char **argv)
|
||||||
|
@ -169,10 +170,10 @@ main (int argc, char **argv)
|
||||||
/* Parse extra opts if any */
|
/* Parse extra opts if any */
|
||||||
argv=np_extra_opts (&argc, argv, progname);
|
argv=np_extra_opts (&argc, argv, progname);
|
||||||
|
|
||||||
if (process_arguments (argc, argv) == ERROR)
|
if (process_arguments (argc, argv) == false)
|
||||||
usage4 (_("Could not parse arguments"));
|
usage4 (_("Could not parse arguments"));
|
||||||
|
|
||||||
if (display_html == TRUE)
|
if (display_html == true)
|
||||||
printf ("<A HREF=\"%s://%s:%d%s\" target=\"_blank\">",
|
printf ("<A HREF=\"%s://%s:%d%s\" target=\"_blank\">",
|
||||||
use_ssl ? "https" : "http", host_name ? host_name : server_address,
|
use_ssl ? "https" : "http", host_name ? host_name : server_address,
|
||||||
server_port, server_url);
|
server_port, server_url);
|
||||||
|
@ -195,9 +196,11 @@ test_file (char *path)
|
||||||
usage2 (_("file does not exist or is not readable"), path);
|
usage2 (_("file does not exist or is not readable"), path);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* process command-line arguments */
|
/*
|
||||||
int
|
* process command-line arguments
|
||||||
process_arguments (int argc, char **argv)
|
* returns true on succes, false otherwise
|
||||||
|
*/
|
||||||
|
bool process_arguments (int argc, char **argv)
|
||||||
{
|
{
|
||||||
int c = 1;
|
int c = 1;
|
||||||
char *p;
|
char *p;
|
||||||
|
@ -252,7 +255,7 @@ process_arguments (int argc, char **argv)
|
||||||
};
|
};
|
||||||
|
|
||||||
if (argc < 2)
|
if (argc < 2)
|
||||||
return ERROR;
|
return false;
|
||||||
|
|
||||||
for (c = 1; c < argc; c++) {
|
for (c = 1; c < argc; c++) {
|
||||||
if (strcmp ("-to", argv[c]) == 0)
|
if (strcmp ("-to", argv[c]) == 0)
|
||||||
|
@ -308,10 +311,10 @@ process_arguments (int argc, char **argv)
|
||||||
/* xasprintf (&http_opt_headers, "%s", optarg); */
|
/* xasprintf (&http_opt_headers, "%s", optarg); */
|
||||||
break;
|
break;
|
||||||
case 'L': /* show html link */
|
case 'L': /* show html link */
|
||||||
display_html = TRUE;
|
display_html = true;
|
||||||
break;
|
break;
|
||||||
case 'n': /* do not show html link */
|
case 'n': /* do not show html link */
|
||||||
display_html = FALSE;
|
display_html = false;
|
||||||
break;
|
break;
|
||||||
case 'C': /* Check SSL cert validity */
|
case 'C': /* Check SSL cert validity */
|
||||||
#ifdef HAVE_SSL
|
#ifdef HAVE_SSL
|
||||||
|
@ -332,12 +335,12 @@ process_arguments (int argc, char **argv)
|
||||||
usage2 (_("Invalid certificate expiration period"), optarg);
|
usage2 (_("Invalid certificate expiration period"), optarg);
|
||||||
days_till_exp_warn = atoi (optarg);
|
days_till_exp_warn = atoi (optarg);
|
||||||
}
|
}
|
||||||
check_cert = TRUE;
|
check_cert = true;
|
||||||
goto enable_ssl;
|
goto enable_ssl;
|
||||||
#endif
|
#endif
|
||||||
case CONTINUE_AFTER_CHECK_CERT: /* don't stop after the certificate is checked */
|
case CONTINUE_AFTER_CHECK_CERT: /* don't stop after the certificate is checked */
|
||||||
#ifdef HAVE_SSL
|
#ifdef HAVE_SSL
|
||||||
continue_after_check_cert = TRUE;
|
continue_after_check_cert = true;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case 'J': /* use client certificate */
|
case 'J': /* use client certificate */
|
||||||
|
@ -357,7 +360,7 @@ process_arguments (int argc, char **argv)
|
||||||
enable_ssl:
|
enable_ssl:
|
||||||
/* ssl_version initialized to 0 as a default. Only set if it's non-zero. This helps when we include multiple
|
/* ssl_version initialized to 0 as a default. Only set if it's non-zero. This helps when we include multiple
|
||||||
parameters, like -S and -C combinations */
|
parameters, like -S and -C combinations */
|
||||||
use_ssl = TRUE;
|
use_ssl = true;
|
||||||
if (c=='S' && optarg != NULL) {
|
if (c=='S' && optarg != NULL) {
|
||||||
int got_plus = strchr(optarg, '+') != NULL;
|
int got_plus = strchr(optarg, '+') != NULL;
|
||||||
|
|
||||||
|
@ -374,7 +377,7 @@ process_arguments (int argc, char **argv)
|
||||||
else
|
else
|
||||||
usage4 (_("Invalid option - Valid SSL/TLS versions: 2, 3, 1, 1.1, 1.2 (with optional '+' suffix)"));
|
usage4 (_("Invalid option - Valid SSL/TLS versions: 2, 3, 1, 1.1, 1.2 (with optional '+' suffix)"));
|
||||||
}
|
}
|
||||||
if (specify_port == FALSE)
|
if (specify_port == false)
|
||||||
server_port = HTTPS_PORT;
|
server_port = HTTPS_PORT;
|
||||||
#else
|
#else
|
||||||
/* -C -J and -K fall through to here without SSL */
|
/* -C -J and -K fall through to here without SSL */
|
||||||
|
@ -382,7 +385,7 @@ process_arguments (int argc, char **argv)
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case SNI_OPTION:
|
case SNI_OPTION:
|
||||||
use_sni = TRUE;
|
use_sni = true;
|
||||||
break;
|
break;
|
||||||
case MAX_REDIRS_OPTION:
|
case MAX_REDIRS_OPTION:
|
||||||
if (!is_intnonneg (optarg))
|
if (!is_intnonneg (optarg))
|
||||||
|
@ -420,7 +423,7 @@ process_arguments (int argc, char **argv)
|
||||||
host_name_length = strlen (host_name) - strlen (p) - 1;
|
host_name_length = strlen (host_name) - strlen (p) - 1;
|
||||||
free (host_name);
|
free (host_name);
|
||||||
host_name = strndup (optarg, host_name_length);
|
host_name = strndup (optarg, host_name_length);
|
||||||
if (specify_port == FALSE)
|
if (specify_port == false)
|
||||||
server_port = virtual_port;
|
server_port = virtual_port;
|
||||||
}
|
}
|
||||||
} else if ((p = strchr (host_name, ':')) != NULL
|
} else if ((p = strchr (host_name, ':')) != NULL
|
||||||
|
@ -430,7 +433,7 @@ process_arguments (int argc, char **argv)
|
||||||
host_name_length = strlen (host_name) - strlen (p) - 1;
|
host_name_length = strlen (host_name) - strlen (p) - 1;
|
||||||
free (host_name);
|
free (host_name);
|
||||||
host_name = strndup (optarg, host_name_length);
|
host_name = strndup (optarg, host_name_length);
|
||||||
if (specify_port == FALSE)
|
if (specify_port == false)
|
||||||
server_port = virtual_port;
|
server_port = virtual_port;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -446,7 +449,7 @@ process_arguments (int argc, char **argv)
|
||||||
usage2 (_("Invalid port number"), optarg);
|
usage2 (_("Invalid port number"), optarg);
|
||||||
else {
|
else {
|
||||||
server_port = atoi (optarg);
|
server_port = atoi (optarg);
|
||||||
specify_port = TRUE;
|
specify_port = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'a': /* authorization info */
|
case 'a': /* authorization info */
|
||||||
|
@ -502,7 +505,7 @@ process_arguments (int argc, char **argv)
|
||||||
if (errcode != 0) {
|
if (errcode != 0) {
|
||||||
(void) regerror (errcode, &preg, errbuf, MAX_INPUT_BUFFER);
|
(void) regerror (errcode, &preg, errbuf, MAX_INPUT_BUFFER);
|
||||||
printf (_("Could Not Compile Regular Expression: %s"), errbuf);
|
printf (_("Could Not Compile Regular Expression: %s"), errbuf);
|
||||||
return ERROR;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case INVERT_REGEX:
|
case INVERT_REGEX:
|
||||||
|
@ -519,7 +522,7 @@ process_arguments (int argc, char **argv)
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case 'v': /* verbose */
|
case 'v': /* verbose */
|
||||||
verbose = TRUE;
|
verbose = true;
|
||||||
break;
|
break;
|
||||||
case 'm': /* min_page_length */
|
case 'm': /* min_page_length */
|
||||||
{
|
{
|
||||||
|
@ -544,7 +547,7 @@ process_arguments (int argc, char **argv)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'N': /* no-body */
|
case 'N': /* no-body */
|
||||||
no_body = TRUE;
|
no_body = true;
|
||||||
break;
|
break;
|
||||||
case 'M': /* max-age */
|
case 'M': /* max-age */
|
||||||
{
|
{
|
||||||
|
@ -565,10 +568,10 @@ process_arguments (int argc, char **argv)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'E': /* show extended perfdata */
|
case 'E': /* show extended perfdata */
|
||||||
show_extended_perfdata = TRUE;
|
show_extended_perfdata = true;
|
||||||
break;
|
break;
|
||||||
case 'B': /* print body content after status line */
|
case 'B': /* print body content after status line */
|
||||||
show_body = TRUE;
|
show_body = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -605,7 +608,7 @@ process_arguments (int argc, char **argv)
|
||||||
if (virtual_port == 0)
|
if (virtual_port == 0)
|
||||||
virtual_port = server_port;
|
virtual_port = server_port;
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -945,7 +948,7 @@ check_http (void)
|
||||||
/* @20100414, public[at]frank4dd.com, http://www.frank4dd.com/howto */
|
/* @20100414, public[at]frank4dd.com, http://www.frank4dd.com/howto */
|
||||||
|
|
||||||
if ( server_address != NULL && strcmp(http_method, "CONNECT") == 0
|
if ( server_address != NULL && strcmp(http_method, "CONNECT") == 0
|
||||||
&& host_name != NULL && use_ssl == TRUE) {
|
&& host_name != NULL && use_ssl == true) {
|
||||||
|
|
||||||
if (verbose) printf ("Entering CONNECT tunnel mode with proxy %s:%d to dst %s:%d\n", server_address, server_port, host_name, HTTPS_PORT);
|
if (verbose) printf ("Entering CONNECT tunnel mode with proxy %s:%d to dst %s:%d\n", server_address, server_port, host_name, HTTPS_PORT);
|
||||||
asprintf (&buf, "%s %s:%d HTTP/1.1\r\n%s\r\n", http_method, host_name, HTTPS_PORT, user_agent);
|
asprintf (&buf, "%s %s:%d HTTP/1.1\r\n%s\r\n", http_method, host_name, HTTPS_PORT, user_agent);
|
||||||
|
@ -979,7 +982,7 @@ check_http (void)
|
||||||
}
|
}
|
||||||
#ifdef HAVE_SSL
|
#ifdef HAVE_SSL
|
||||||
elapsed_time_connect = (double)microsec_connect / 1.0e6;
|
elapsed_time_connect = (double)microsec_connect / 1.0e6;
|
||||||
if (use_ssl == TRUE) {
|
if (use_ssl == true) {
|
||||||
gettimeofday (&tv_temp, NULL);
|
gettimeofday (&tv_temp, NULL);
|
||||||
result = np_net_ssl_init_with_hostname_version_and_cert(sd, (use_sni ? host_name : NULL), ssl_version, client_cert, client_privkey);
|
result = np_net_ssl_init_with_hostname_version_and_cert(sd, (use_sni ? host_name : NULL), ssl_version, client_cert, client_privkey);
|
||||||
if (verbose) printf ("SSL initialized\n");
|
if (verbose) printf ("SSL initialized\n");
|
||||||
|
@ -987,9 +990,9 @@ check_http (void)
|
||||||
die (STATE_CRITICAL, NULL);
|
die (STATE_CRITICAL, NULL);
|
||||||
microsec_ssl = deltime (tv_temp);
|
microsec_ssl = deltime (tv_temp);
|
||||||
elapsed_time_ssl = (double)microsec_ssl / 1.0e6;
|
elapsed_time_ssl = (double)microsec_ssl / 1.0e6;
|
||||||
if (check_cert == TRUE) {
|
if (check_cert == true) {
|
||||||
result = np_net_ssl_check_cert(days_till_exp_warn, days_till_exp_crit);
|
result = np_net_ssl_check_cert(days_till_exp_warn, days_till_exp_crit);
|
||||||
if (continue_after_check_cert == FALSE) {
|
if (continue_after_check_cert == false) {
|
||||||
if (sd) close(sd);
|
if (sd) close(sd);
|
||||||
np_net_ssl_cleanup();
|
np_net_ssl_cleanup();
|
||||||
return result;
|
return result;
|
||||||
|
@ -999,7 +1002,7 @@ check_http (void)
|
||||||
#endif /* HAVE_SSL */
|
#endif /* HAVE_SSL */
|
||||||
|
|
||||||
if ( server_address != NULL && strcmp(http_method, "CONNECT") == 0
|
if ( server_address != NULL && strcmp(http_method, "CONNECT") == 0
|
||||||
&& host_name != NULL && use_ssl == TRUE)
|
&& host_name != NULL && use_ssl == true)
|
||||||
asprintf (&buf, "%s %s %s\r\n%s\r\n", http_method_proxy, server_url, host_name ? "HTTP/1.1" : "HTTP/1.0", user_agent);
|
asprintf (&buf, "%s %s %s\r\n%s\r\n", http_method_proxy, server_url, host_name ? "HTTP/1.1" : "HTTP/1.0", user_agent);
|
||||||
else
|
else
|
||||||
asprintf (&buf, "%s %s %s\r\n%s\r\n", http_method, server_url, host_name ? "HTTP/1.1" : "HTTP/1.0", user_agent);
|
asprintf (&buf, "%s %s %s\r\n%s\r\n", http_method, server_url, host_name ? "HTTP/1.1" : "HTTP/1.0", user_agent);
|
||||||
|
@ -1027,10 +1030,10 @@ check_http (void)
|
||||||
* 14.23). Some server applications/configurations cause trouble if the
|
* 14.23). Some server applications/configurations cause trouble if the
|
||||||
* (default) port is explicitly specified in the "Host:" header line.
|
* (default) port is explicitly specified in the "Host:" header line.
|
||||||
*/
|
*/
|
||||||
if ((use_ssl == FALSE && virtual_port == HTTP_PORT) ||
|
if ((use_ssl == false && virtual_port == HTTP_PORT) ||
|
||||||
(use_ssl == TRUE && virtual_port == HTTPS_PORT) ||
|
(use_ssl == true && virtual_port == HTTPS_PORT) ||
|
||||||
(server_address != NULL && strcmp(http_method, "CONNECT") == 0
|
(server_address != NULL && strcmp(http_method, "CONNECT") == 0
|
||||||
&& host_name != NULL && use_ssl == TRUE))
|
&& host_name != NULL && use_ssl == true))
|
||||||
xasprintf (&buf, "%sHost: %s\r\n", buf, host_name);
|
xasprintf (&buf, "%sHost: %s\r\n", buf, host_name);
|
||||||
else
|
else
|
||||||
xasprintf (&buf, "%sHost: %s:%d\r\n", buf, host_name, virtual_port);
|
xasprintf (&buf, "%sHost: %s:%d\r\n", buf, host_name, virtual_port);
|
||||||
|
@ -1070,9 +1073,8 @@ check_http (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
xasprintf (&buf, "%sContent-Length: %i\r\n\r\n", buf, (int)strlen (http_post_data));
|
xasprintf (&buf, "%sContent-Length: %i\r\n\r\n", buf, (int)strlen (http_post_data));
|
||||||
xasprintf (&buf, "%s%s%s", buf, http_post_data, CRLF);
|
xasprintf (&buf, "%s%s", buf, http_post_data);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
/* or just a newline so the server knows we're done with the request */
|
/* or just a newline so the server knows we're done with the request */
|
||||||
xasprintf (&buf, "%s%s", buf, CRLF);
|
xasprintf (&buf, "%s%s", buf, CRLF);
|
||||||
}
|
}
|
||||||
|
@ -1096,9 +1098,14 @@ check_http (void)
|
||||||
*pos = ' ';
|
*pos = ' ';
|
||||||
}
|
}
|
||||||
buffer[i] = '\0';
|
buffer[i] = '\0';
|
||||||
xasprintf (&full_page_new, "%s%s", full_page, buffer);
|
|
||||||
free (full_page);
|
if ((full_page_new = realloc(full_page, pagesize + i + 1)) == NULL)
|
||||||
|
die (STATE_UNKNOWN, _("HTTP UNKNOWN - Could not allocate memory for full_page\n"));
|
||||||
|
|
||||||
|
memmove(&full_page_new[pagesize], buffer, i + 1);
|
||||||
|
|
||||||
full_page = full_page_new;
|
full_page = full_page_new;
|
||||||
|
|
||||||
pagesize += i;
|
pagesize += i;
|
||||||
|
|
||||||
if (no_body && document_headers_done (full_page)) {
|
if (no_body && document_headers_done (full_page)) {
|
||||||
|
@ -1110,25 +1117,7 @@ check_http (void)
|
||||||
elapsed_time_transfer = (double)microsec_transfer / 1.0e6;
|
elapsed_time_transfer = (double)microsec_transfer / 1.0e6;
|
||||||
|
|
||||||
if (i < 0 && errno != ECONNRESET) {
|
if (i < 0 && errno != ECONNRESET) {
|
||||||
#ifdef HAVE_SSL
|
die(STATE_CRITICAL, _("HTTP CRITICAL - Error on receive\n"));
|
||||||
/*
|
|
||||||
if (use_ssl) {
|
|
||||||
sslerr=SSL_get_error(ssl, i);
|
|
||||||
if ( sslerr == SSL_ERROR_SSL ) {
|
|
||||||
die (STATE_WARNING, _("HTTP WARNING - Client Certificate Required\n"));
|
|
||||||
} else {
|
|
||||||
die (STATE_CRITICAL, _("HTTP CRITICAL - Error on receive\n"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
*/
|
|
||||||
#endif
|
|
||||||
die (STATE_CRITICAL, _("HTTP CRITICAL - Error on receive\n"));
|
|
||||||
#ifdef HAVE_SSL
|
|
||||||
/* XXX
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* return a CRITICAL status if we couldn't read any data */
|
/* return a CRITICAL status if we couldn't read any data */
|
||||||
|
@ -1253,32 +1242,73 @@ check_http (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Page and Header content checks go here */
|
/* Page and Header content checks go here */
|
||||||
if (strlen (header_expect)) {
|
if (strlen(header_expect) > 0) {
|
||||||
if (!strstr (header, header_expect)) {
|
if (strstr(header, header_expect) == NULL) {
|
||||||
strncpy(&output_header_search[0],header_expect,sizeof(output_header_search));
|
// We did not find the header, the rest is for building the output and setting the state
|
||||||
if(output_header_search[sizeof(output_header_search)-1]!='\0') {
|
char output_header_search[30] = "";
|
||||||
bcopy("...",&output_header_search[sizeof(output_header_search)-4],4);
|
|
||||||
|
strncpy(&output_header_search[0], header_expect,
|
||||||
|
sizeof(output_header_search));
|
||||||
|
|
||||||
|
if (output_header_search[sizeof(output_header_search) - 1] != '\0') {
|
||||||
|
bcopy("...",
|
||||||
|
&output_header_search[sizeof(output_header_search) - 4],
|
||||||
|
4);
|
||||||
}
|
}
|
||||||
xasprintf (&msg, _("%sheader '%s' not found on '%s://%s:%d%s', "), msg, output_header_search, use_ssl ? "https" : "http", host_name ? host_name : server_address, server_port, server_url);
|
|
||||||
|
xasprintf (&msg,
|
||||||
|
_("%sheader '%s' not found on '%s://%s:%d%s', "),
|
||||||
|
msg,
|
||||||
|
output_header_search, use_ssl ? "https" : "http",
|
||||||
|
host_name ? host_name : server_address, server_port,
|
||||||
|
server_url);
|
||||||
|
|
||||||
result = STATE_CRITICAL;
|
result = STATE_CRITICAL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// At this point we should test if the content is chunked and unchunk it, so
|
||||||
|
// it can be searched (and possibly printed)
|
||||||
|
const char *chunked_header_regex_string = "Transfer-Encoding: *chunked *";
|
||||||
|
regex_t chunked_header_regex;
|
||||||
|
|
||||||
if (strlen (string_expect)) {
|
if (regcomp(&chunked_header_regex, chunked_header_regex_string, REG_ICASE)) {
|
||||||
if (!strstr (page, string_expect)) {
|
die(STATE_UNKNOWN, "HTTP %s: %s\n", state_text(STATE_UNKNOWN), "Failed to compile chunked_header_regex regex");
|
||||||
strncpy(&output_string_search[0],string_expect,sizeof(output_string_search));
|
}
|
||||||
if(output_string_search[sizeof(output_string_search)-1]!='\0') {
|
|
||||||
bcopy("...",&output_string_search[sizeof(output_string_search)-4],4);
|
regmatch_t chre_pmatch[1]; // We actually do not care about this, since we only want to know IF it was found
|
||||||
|
|
||||||
|
if (regexec(&chunked_header_regex, header, 1, chre_pmatch, 0) == 0) {
|
||||||
|
if (verbose) {
|
||||||
|
printf("Found chunked content\n");
|
||||||
|
}
|
||||||
|
// We actually found the chunked header
|
||||||
|
char *tmp = unchunk_content(page);
|
||||||
|
if (tmp == NULL) {
|
||||||
|
die(STATE_UNKNOWN, "HTTP %s: %s\n", state_text(STATE_UNKNOWN), "Failed to unchunk message body");
|
||||||
|
}
|
||||||
|
page = tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strlen(string_expect) > 0) {
|
||||||
|
if (!strstr(page, string_expect)) {
|
||||||
|
// We found the string the body, the rest is for building the output
|
||||||
|
char output_string_search[30] = "";
|
||||||
|
strncpy(&output_string_search[0], string_expect,
|
||||||
|
sizeof(output_string_search));
|
||||||
|
if (output_string_search[sizeof(output_string_search) - 1] != '\0') {
|
||||||
|
bcopy("...", &output_string_search[sizeof(output_string_search) - 4],
|
||||||
|
4);
|
||||||
}
|
}
|
||||||
xasprintf (&msg, _("%sstring '%s' not found on '%s://%s:%d%s', "), msg, output_string_search, use_ssl ? "https" : "http", host_name ? host_name : server_address, server_port, server_url);
|
xasprintf (&msg, _("%sstring '%s' not found on '%s://%s:%d%s', "), msg, output_string_search, use_ssl ? "https" : "http", host_name ? host_name : server_address, server_port, server_url);
|
||||||
result = STATE_CRITICAL;
|
result = STATE_CRITICAL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strlen (regexp)) {
|
if (strlen(regexp) > 0) {
|
||||||
errcode = regexec (&preg, page, REGS, pmatch, 0);
|
errcode = regexec(&preg, page, REGS, pmatch, 0);
|
||||||
if ((errcode == 0 && invert_regex == 0) || (errcode == REG_NOMATCH && invert_regex == 1)) {
|
if ((errcode == 0 && invert_regex == 0) ||
|
||||||
|
(errcode == REG_NOMATCH && invert_regex == 1)) {
|
||||||
/* OK - No-op to avoid changing the logic around it */
|
/* OK - No-op to avoid changing the logic around it */
|
||||||
result = max_state_alt(STATE_OK, result);
|
result = max_state_alt(STATE_OK, result);
|
||||||
}
|
}
|
||||||
|
@ -1330,7 +1360,7 @@ check_http (void)
|
||||||
perfd_time (elapsed_time),
|
perfd_time (elapsed_time),
|
||||||
perfd_size (page_len),
|
perfd_size (page_len),
|
||||||
perfd_time_connect (elapsed_time_connect),
|
perfd_time_connect (elapsed_time_connect),
|
||||||
use_ssl == TRUE ? perfd_time_ssl (elapsed_time_ssl) : "",
|
use_ssl == true ? perfd_time_ssl (elapsed_time_ssl) : "",
|
||||||
perfd_time_headers (elapsed_time_headers),
|
perfd_time_headers (elapsed_time_headers),
|
||||||
perfd_time_firstbyte (elapsed_time_firstbyte),
|
perfd_time_firstbyte (elapsed_time_firstbyte),
|
||||||
perfd_time_transfer (elapsed_time_transfer));
|
perfd_time_transfer (elapsed_time_transfer));
|
||||||
|
@ -1352,7 +1382,89 @@ check_http (void)
|
||||||
return STATE_UNKNOWN;
|
return STATE_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Receivces a pointer to the beginning of the body of a HTTP message
|
||||||
|
* which is chunked and returns a pointer to a freshly allocated memory
|
||||||
|
* region containing the unchunked body or NULL if something failed.
|
||||||
|
* The result must be freed by the caller.
|
||||||
|
*/
|
||||||
|
char *unchunk_content(const char *content) {
|
||||||
|
// https://en.wikipedia.org/wiki/Chunked_transfer_encoding
|
||||||
|
// https://www.rfc-editor.org/rfc/rfc7230#section-4.1
|
||||||
|
char *result = NULL;
|
||||||
|
size_t content_length = strlen(content);
|
||||||
|
char *start_of_chunk;
|
||||||
|
char* end_of_chunk;
|
||||||
|
long size_of_chunk;
|
||||||
|
const char *pointer = content;
|
||||||
|
char *endptr;
|
||||||
|
long length_of_chunk = 0;
|
||||||
|
size_t overall_size = 0;
|
||||||
|
|
||||||
|
while (true) {
|
||||||
|
size_of_chunk = strtol(pointer, &endptr, 16);
|
||||||
|
if (size_of_chunk == LONG_MIN || size_of_chunk == LONG_MAX) {
|
||||||
|
// Apparently underflow or overflow, should not happen
|
||||||
|
if (verbose) {
|
||||||
|
printf("Got an underflow or overflow from strtol at: %u\n", __LINE__);
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
if (endptr == pointer) {
|
||||||
|
// Apparently this was not a number
|
||||||
|
if (verbose) {
|
||||||
|
printf("Chunked content did not start with a number at all (Line: %u)\n", __LINE__);
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
// So, we got the length of the chunk
|
||||||
|
if (*endptr == ';') {
|
||||||
|
// Chunk extension starts here
|
||||||
|
while (*endptr != '\r') {
|
||||||
|
endptr++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
start_of_chunk = endptr + 2;
|
||||||
|
end_of_chunk = start_of_chunk + size_of_chunk;
|
||||||
|
length_of_chunk = (long)(end_of_chunk - start_of_chunk);
|
||||||
|
pointer = end_of_chunk + 2; //Next number should be here
|
||||||
|
|
||||||
|
if (length_of_chunk == 0) {
|
||||||
|
// Chunk length is 0, so this is the last one
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
overall_size += length_of_chunk;
|
||||||
|
|
||||||
|
if (result == NULL) {
|
||||||
|
// Size of the chunk plus the ending NULL byte
|
||||||
|
result = (char *)malloc(length_of_chunk +1);
|
||||||
|
if (result == NULL) {
|
||||||
|
if (verbose) {
|
||||||
|
printf("Failed to allocate memory for unchunked body\n");
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Enlarge memory to the new size plus the ending NULL byte
|
||||||
|
void *tmp = realloc(result, overall_size +1);
|
||||||
|
if (tmp == NULL) {
|
||||||
|
if (verbose) {
|
||||||
|
printf("Failed to allocate memory for unchunked body\n");
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
} else {
|
||||||
|
result = tmp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
memcpy(result + (overall_size - size_of_chunk), start_of_chunk, size_of_chunk);
|
||||||
|
}
|
||||||
|
|
||||||
|
result[overall_size] = '\0';
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/* per RFC 2396 */
|
/* per RFC 2396 */
|
||||||
#define URI_HTTP "%5[HTPShtps]"
|
#define URI_HTTP "%5[HTPShtps]"
|
||||||
|
@ -1525,13 +1637,13 @@ redir (char *pos, char *status_line)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
bool
|
||||||
server_type_check (const char *type)
|
server_type_check (const char *type)
|
||||||
{
|
{
|
||||||
if (strcmp (type, "https"))
|
if (strcmp (type, "https"))
|
||||||
return FALSE;
|
return false;
|
||||||
else
|
else
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -1546,42 +1658,42 @@ server_port_check (int ssl_flag)
|
||||||
char *perfd_time (double elapsed_time)
|
char *perfd_time (double elapsed_time)
|
||||||
{
|
{
|
||||||
return fperfdata ("time", elapsed_time, "s",
|
return fperfdata ("time", elapsed_time, "s",
|
||||||
thlds->warning?TRUE:FALSE, thlds->warning?thlds->warning->end:0,
|
thlds->warning?true:false, thlds->warning?thlds->warning->end:0,
|
||||||
thlds->critical?TRUE:FALSE, thlds->critical?thlds->critical->end:0,
|
thlds->critical?true:false, thlds->critical?thlds->critical->end:0,
|
||||||
TRUE, 0, TRUE, socket_timeout);
|
true, 0, true, socket_timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *perfd_time_connect (double elapsed_time_connect)
|
char *perfd_time_connect (double elapsed_time_connect)
|
||||||
{
|
{
|
||||||
return fperfdata ("time_connect", elapsed_time_connect, "s", FALSE, 0, FALSE, 0, FALSE, 0, TRUE, socket_timeout);
|
return fperfdata ("time_connect", elapsed_time_connect, "s", false, 0, false, 0, false, 0, true, socket_timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *perfd_time_ssl (double elapsed_time_ssl)
|
char *perfd_time_ssl (double elapsed_time_ssl)
|
||||||
{
|
{
|
||||||
return fperfdata ("time_ssl", elapsed_time_ssl, "s", FALSE, 0, FALSE, 0, FALSE, 0, TRUE, socket_timeout);
|
return fperfdata ("time_ssl", elapsed_time_ssl, "s", false, 0, false, 0, false, 0, true, socket_timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *perfd_time_headers (double elapsed_time_headers)
|
char *perfd_time_headers (double elapsed_time_headers)
|
||||||
{
|
{
|
||||||
return fperfdata ("time_headers", elapsed_time_headers, "s", FALSE, 0, FALSE, 0, FALSE, 0, TRUE, socket_timeout);
|
return fperfdata ("time_headers", elapsed_time_headers, "s", false, 0, false, 0, false, 0, true, socket_timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *perfd_time_firstbyte (double elapsed_time_firstbyte)
|
char *perfd_time_firstbyte (double elapsed_time_firstbyte)
|
||||||
{
|
{
|
||||||
return fperfdata ("time_firstbyte", elapsed_time_firstbyte, "s", FALSE, 0, FALSE, 0, FALSE, 0, TRUE, socket_timeout);
|
return fperfdata ("time_firstbyte", elapsed_time_firstbyte, "s", false, 0, false, 0, false, 0, true, socket_timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *perfd_time_transfer (double elapsed_time_transfer)
|
char *perfd_time_transfer (double elapsed_time_transfer)
|
||||||
{
|
{
|
||||||
return fperfdata ("time_transfer", elapsed_time_transfer, "s", FALSE, 0, FALSE, 0, FALSE, 0, TRUE, socket_timeout);
|
return fperfdata ("time_transfer", elapsed_time_transfer, "s", false, 0, false, 0, false, 0, true, socket_timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *perfd_size (int page_len)
|
char *perfd_size (int page_len)
|
||||||
{
|
{
|
||||||
return perfdata ("size", page_len, "B",
|
return perfdata ("size", page_len, "B",
|
||||||
(min_page_len>0?TRUE:FALSE), min_page_len,
|
(min_page_len>0?true:false), min_page_len,
|
||||||
(min_page_len>0?TRUE:FALSE), 0,
|
(min_page_len>0?true:false), 0,
|
||||||
TRUE, 0, FALSE, 0);
|
true, 0, false, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -69,7 +69,6 @@ int process_arguments (int, char **);
|
||||||
int validate_arguments (void);
|
int validate_arguments (void);
|
||||||
void print_usage (void);
|
void print_usage (void);
|
||||||
void print_help (void);
|
void print_help (void);
|
||||||
int is_pg_dbname (char *);
|
|
||||||
int is_pg_logname (char *);
|
int is_pg_logname (char *);
|
||||||
int do_query (PGconn *, char *);
|
int do_query (PGconn *, char *);
|
||||||
|
|
||||||
|
@ -347,9 +346,9 @@ process_arguments (int argc, char **argv)
|
||||||
pgport = optarg;
|
pgport = optarg;
|
||||||
break;
|
break;
|
||||||
case 'd': /* database name */
|
case 'd': /* database name */
|
||||||
if (!is_pg_dbname (optarg)) /* checks length and valid chars */
|
if (strlen(optarg) >= NAMEDATALEN) {
|
||||||
usage2 (_("Database name is not valid"), optarg);
|
usage2 (_("Database name exceeds the maximum length"), optarg);
|
||||||
else /* we know length, and know optarg is terminated, so us strcpy */
|
}
|
||||||
snprintf(dbName, NAMEDATALEN, "%s", optarg);
|
snprintf(dbName, NAMEDATALEN, "%s", optarg);
|
||||||
break;
|
break;
|
||||||
case 'l': /* login name */
|
case 'l': /* login name */
|
||||||
|
@ -414,45 +413,6 @@ validate_arguments ()
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
|
|
||||||
@@-
|
|
||||||
<sect3>
|
|
||||||
<title>is_pg_dbname</title>
|
|
||||||
|
|
||||||
<para>&PROTO_is_pg_dbname;</para>
|
|
||||||
|
|
||||||
<para>Given a database name, this function returns TRUE if the string
|
|
||||||
is a valid PostgreSQL database name, and returns false if it is
|
|
||||||
not.</para>
|
|
||||||
|
|
||||||
<para>Valid PostgreSQL database names are less than &NAMEDATALEN;
|
|
||||||
characters long and consist of letters, numbers, and underscores. The
|
|
||||||
first character cannot be a number, however.</para>
|
|
||||||
|
|
||||||
</sect3>
|
|
||||||
-@@
|
|
||||||
******************************************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int
|
|
||||||
is_pg_dbname (char *dbname)
|
|
||||||
{
|
|
||||||
char txt[NAMEDATALEN];
|
|
||||||
char tmp[NAMEDATALEN];
|
|
||||||
if (strlen (dbname) > NAMEDATALEN - 1)
|
|
||||||
return (FALSE);
|
|
||||||
strncpy (txt, dbname, NAMEDATALEN - 1);
|
|
||||||
txt[NAMEDATALEN - 1] = 0;
|
|
||||||
if (sscanf (txt, "%[_a-zA-Z]%[^_a-zA-Z0-9-]", tmp, tmp) == 1)
|
|
||||||
return (TRUE);
|
|
||||||
if (sscanf (txt, "%[_a-zA-Z]%[_a-zA-Z0-9-]%[^_a-zA-Z0-9-]", tmp, tmp, tmp) ==
|
|
||||||
2) return (TRUE);
|
|
||||||
return (FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
the tango program should eventually create an entity here based on the
|
the tango program should eventually create an entity here based on the
|
||||||
|
|
|
@ -90,6 +90,7 @@ char *thisarg (char *str);
|
||||||
char *nextarg (char *str);
|
char *nextarg (char *str);
|
||||||
void print_usage (void);
|
void print_usage (void);
|
||||||
void print_help (void);
|
void print_help (void);
|
||||||
|
char *multiply (char *str);
|
||||||
|
|
||||||
#include "regex.h"
|
#include "regex.h"
|
||||||
char regex_expect[MAX_INPUT_BUFFER] = "";
|
char regex_expect[MAX_INPUT_BUFFER] = "";
|
||||||
|
@ -154,6 +155,8 @@ double *previous_value;
|
||||||
size_t previous_size = OID_COUNT_STEP;
|
size_t previous_size = OID_COUNT_STEP;
|
||||||
int perf_labels = 1;
|
int perf_labels = 1;
|
||||||
char* ip_version = "";
|
char* ip_version = "";
|
||||||
|
double multiplier = 1.0;
|
||||||
|
char *fmtstr = "";
|
||||||
|
|
||||||
static char *fix_snmp_range(char *th)
|
static char *fix_snmp_range(char *th)
|
||||||
{
|
{
|
||||||
|
@ -398,10 +401,10 @@ main (int argc, char **argv)
|
||||||
is_counter=0;
|
is_counter=0;
|
||||||
/* We strip out the datatype indicator for PHBs */
|
/* We strip out the datatype indicator for PHBs */
|
||||||
if (strstr (response, "Gauge: ")) {
|
if (strstr (response, "Gauge: ")) {
|
||||||
show = strstr (response, "Gauge: ") + 7;
|
show = multiply (strstr (response, "Gauge: ") + 7);
|
||||||
}
|
}
|
||||||
else if (strstr (response, "Gauge32: ")) {
|
else if (strstr (response, "Gauge32: ")) {
|
||||||
show = strstr (response, "Gauge32: ") + 9;
|
show = multiply (strstr (response, "Gauge32: ") + 9);
|
||||||
}
|
}
|
||||||
else if (strstr (response, "Counter32: ")) {
|
else if (strstr (response, "Counter32: ")) {
|
||||||
show = strstr (response, "Counter32: ") + 11;
|
show = strstr (response, "Counter32: ") + 11;
|
||||||
|
@ -416,7 +419,10 @@ main (int argc, char **argv)
|
||||||
strcpy(type, "c");
|
strcpy(type, "c");
|
||||||
}
|
}
|
||||||
else if (strstr (response, "INTEGER: ")) {
|
else if (strstr (response, "INTEGER: ")) {
|
||||||
show = strstr (response, "INTEGER: ") + 9;
|
show = multiply (strstr (response, "INTEGER: ") + 9);
|
||||||
|
if (fmtstr != "") {
|
||||||
|
conv = fmtstr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (strstr (response, "OID: ")) {
|
else if (strstr (response, "OID: ")) {
|
||||||
show = strstr (response, "OID: ") + 5;
|
show = strstr (response, "OID: ") + 5;
|
||||||
|
@ -698,6 +704,8 @@ process_arguments (int argc, char **argv)
|
||||||
{"perf-oids", no_argument, 0, 'O'},
|
{"perf-oids", no_argument, 0, 'O'},
|
||||||
{"ipv4", no_argument, 0, '4'},
|
{"ipv4", no_argument, 0, '4'},
|
||||||
{"ipv6", no_argument, 0, '6'},
|
{"ipv6", no_argument, 0, '6'},
|
||||||
|
{"multiplier", required_argument, 0, 'M'},
|
||||||
|
{"fmtstr", required_argument, 0, 'f'},
|
||||||
{0, 0, 0, 0}
|
{0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -715,7 +723,7 @@ process_arguments (int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
c = getopt_long (argc, argv, "nhvVO46t:c:w:H:C:o:e:E:d:D:s:t:R:r:l:u:p:m:P:N:L:U:a:x:A:X:z:",
|
c = getopt_long (argc, argv, "nhvVO46t:c:w:H:C:o:e:E:d:D:s:t:R:r:l:u:p:m:P:N:L:U:a:x:A:X:M:f:z:",
|
||||||
longopts, &option);
|
longopts, &option);
|
||||||
|
|
||||||
if (c == -1 || c == EOF)
|
if (c == -1 || c == EOF)
|
||||||
|
@ -953,6 +961,16 @@ process_arguments (int argc, char **argv)
|
||||||
if(verbose>2)
|
if(verbose>2)
|
||||||
printf("IPv6 detected! Will pass \"udp6:\" to snmpget.\n");
|
printf("IPv6 detected! Will pass \"udp6:\" to snmpget.\n");
|
||||||
break;
|
break;
|
||||||
|
case 'M':
|
||||||
|
if ( strspn( optarg, "0123456789.," ) == strlen( optarg ) ) {
|
||||||
|
multiplier=strtod(optarg,NULL);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'f':
|
||||||
|
if (multiplier != 1.0) {
|
||||||
|
fmtstr=optarg;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1143,6 +1161,44 @@ nextarg (char *str)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* multiply result (values 0 < n < 1 work as divider) */
|
||||||
|
char *
|
||||||
|
multiply (char *str)
|
||||||
|
{
|
||||||
|
char *endptr;
|
||||||
|
double val;
|
||||||
|
char *conv = "%f";
|
||||||
|
|
||||||
|
if(verbose>2)
|
||||||
|
printf(" multiply input: %s\n", str);
|
||||||
|
|
||||||
|
val = strtod (str, &endptr);
|
||||||
|
if ((val == 0.0) && (endptr == str)) {
|
||||||
|
if(multiplier != 1) {
|
||||||
|
die(STATE_UNKNOWN, _("multiplier set (%.1f), but input is not a number: %s"), multiplier, str);
|
||||||
|
}
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(verbose>2)
|
||||||
|
printf(" multiply extracted double: %f\n", val);
|
||||||
|
val *= multiplier;
|
||||||
|
if (fmtstr != "") {
|
||||||
|
conv = fmtstr;
|
||||||
|
}
|
||||||
|
if (val == (int)val) {
|
||||||
|
sprintf(str, "%.0f", val);
|
||||||
|
} else {
|
||||||
|
if(verbose>2)
|
||||||
|
printf(" multiply using format: %s\n", conv);
|
||||||
|
sprintf(str, conv, val);
|
||||||
|
}
|
||||||
|
if(verbose>2)
|
||||||
|
printf(" multiply result: %s\n", str);
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
print_help (void)
|
print_help (void)
|
||||||
{
|
{
|
||||||
|
@ -1235,6 +1291,10 @@ print_help (void)
|
||||||
printf (" %s\n", _("Units label(s) for output data (e.g., 'sec.')."));
|
printf (" %s\n", _("Units label(s) for output data (e.g., 'sec.')."));
|
||||||
printf (" %s\n", "-D, --output-delimiter=STRING");
|
printf (" %s\n", "-D, --output-delimiter=STRING");
|
||||||
printf (" %s\n", _("Separates output on multiple OID requests"));
|
printf (" %s\n", _("Separates output on multiple OID requests"));
|
||||||
|
printf (" %s\n", "-M, --multiplier=FLOAT");
|
||||||
|
printf (" %s\n", _("Multiplies current value, 0 < n < 1 works as divider, defaults to 1"));
|
||||||
|
printf (" %s\n", "-f, --fmtstr=STRING");
|
||||||
|
printf (" %s\n", _("C-style format string for float values (see option -M)"));
|
||||||
|
|
||||||
printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
|
printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT);
|
||||||
printf (" %s\n", _("NOTE the final timeout value is calculated using this formula: timeout_interval * retries + 5"));
|
printf (" %s\n", _("NOTE the final timeout value is calculated using this formula: timeout_interval * retries + 5"));
|
||||||
|
@ -1287,4 +1347,5 @@ print_usage (void)
|
||||||
printf ("[-l label] [-u units] [-p port-number] [-d delimiter] [-D output-delimiter]\n");
|
printf ("[-l label] [-u units] [-p port-number] [-d delimiter] [-D output-delimiter]\n");
|
||||||
printf ("[-m miblist] [-P snmp version] [-N context] [-L seclevel] [-U secname]\n");
|
printf ("[-m miblist] [-P snmp version] [-N context] [-L seclevel] [-U secname]\n");
|
||||||
printf ("[-a authproto] [-A authpasswd] [-x privproto] [-X privpasswd] [-4|6]\n");
|
printf ("[-a authproto] [-A authpasswd] [-x privproto] [-X privpasswd] [-4|6]\n");
|
||||||
|
printf ("[-M multiplier [-f format]]\n");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Makefile.in generated by automake 1.16.3 from Makefile.am.
|
# Makefile.in generated by automake 1.16.5 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This Makefile.in is free software; the Free Software Foundation
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -267,8 +267,6 @@ am__define_uniq_tagged_files = \
|
||||||
unique=`for i in $$list; do \
|
unique=`for i in $$list; do \
|
||||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
done | $(am__uniquify_input)`
|
done | $(am__uniquify_input)`
|
||||||
ETAGS = etags
|
|
||||||
CTAGS = ctags
|
|
||||||
am__DIST_COMMON = $(srcdir)/Makefile.in \
|
am__DIST_COMMON = $(srcdir)/Makefile.in \
|
||||||
$(top_srcdir)/build-aux/depcomp \
|
$(top_srcdir)/build-aux/depcomp \
|
||||||
$(top_srcdir)/build-aux/mkinstalldirs
|
$(top_srcdir)/build-aux/mkinstalldirs
|
||||||
|
@ -297,6 +295,8 @@ CCDEPMODE = @CCDEPMODE@
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CSCOPE = @CSCOPE@
|
||||||
|
CTAGS = @CTAGS@
|
||||||
CYGPATH_W = @CYGPATH_W@
|
CYGPATH_W = @CYGPATH_W@
|
||||||
DBILIBS = @DBILIBS@
|
DBILIBS = @DBILIBS@
|
||||||
DEFS = @DEFS@
|
DEFS = @DEFS@
|
||||||
|
@ -316,6 +316,7 @@ ENOLINK_VALUE = @ENOLINK_VALUE@
|
||||||
EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
|
EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
|
||||||
EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
|
EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
|
||||||
ERRNO_H = @ERRNO_H@
|
ERRNO_H = @ERRNO_H@
|
||||||
|
ETAGS = @ETAGS@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
EXTRAS = @EXTRAS@
|
EXTRAS = @EXTRAS@
|
||||||
EXTRAS_ROOT = @EXTRAS_ROOT@
|
EXTRAS_ROOT = @EXTRAS_ROOT@
|
||||||
|
@ -1550,7 +1551,6 @@ cscopelist-am: $(am__tagged_files)
|
||||||
|
|
||||||
distclean-tags:
|
distclean-tags:
|
||||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||||
|
|
||||||
distdir: $(BUILT_SOURCES)
|
distdir: $(BUILT_SOURCES)
|
||||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,22 @@
|
||||||
#! /usr/bin/perl -w -I ..
|
#! /usr/bin/perl -w -I ..
|
||||||
#
|
#
|
||||||
# HyperText Transfer Protocol (HTTP) Test via check_http
|
# HyperText Transfer Protocol (HTTP) Test via check_curl
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use Test::More;
|
use Test::More;
|
||||||
use POSIX qw/mktime strftime/;
|
use POSIX qw/mktime strftime/;
|
||||||
use NPTest;
|
|
||||||
|
|
||||||
plan tests => 57;
|
use vars qw($tests $has_ipv6);
|
||||||
|
|
||||||
|
BEGIN {
|
||||||
|
use NPTest;
|
||||||
|
$has_ipv6 = NPTest::has_ipv6();
|
||||||
|
$tests = $has_ipv6 ? 59 : 57;
|
||||||
|
plan tests => $tests;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
my $successOutput = '/OK.*HTTP.*second/';
|
my $successOutput = '/OK.*HTTP.*second/';
|
||||||
|
|
||||||
|
@ -18,6 +25,7 @@ my $plugin = 'check_http';
|
||||||
$plugin = 'check_curl' if $0 =~ m/check_curl/mx;
|
$plugin = 'check_curl' if $0 =~ m/check_curl/mx;
|
||||||
|
|
||||||
my $host_tcp_http = getTestParameter("NP_HOST_TCP_HTTP", "A host providing the HTTP Service (a web server)", "localhost");
|
my $host_tcp_http = getTestParameter("NP_HOST_TCP_HTTP", "A host providing the HTTP Service (a web server)", "localhost");
|
||||||
|
my $host_tcp_http_ipv6 = getTestParameter("NP_HOST_TCP_HTTP_IPV6", "An IPv6 address providing a HTTP Service (a web server)", "::1");
|
||||||
my $host_tls_http = getTestParameter("NP_HOST_TLS_HTTP", "A host providing the HTTPS Service (a tls web server)", "localhost");
|
my $host_tls_http = getTestParameter("NP_HOST_TLS_HTTP", "A host providing the HTTPS Service (a tls web server)", "localhost");
|
||||||
my $host_tls_cert = getTestParameter("NP_HOST_TLS_CERT", "the common name of the certificate.", "localhost");
|
my $host_tls_cert = getTestParameter("NP_HOST_TLS_CERT", "the common name of the certificate.", "localhost");
|
||||||
my $host_nonresponsive = getTestParameter("NP_HOST_NONRESPONSIVE", "The hostname of system not responsive to network requests", "10.0.0.1");
|
my $host_nonresponsive = getTestParameter("NP_HOST_NONRESPONSIVE", "The hostname of system not responsive to network requests", "10.0.0.1");
|
||||||
|
@ -36,6 +44,15 @@ $res = NPTest->testCmd(
|
||||||
cmp_ok( $res->return_code, '==', 0, "Webserver $host_tcp_http responded" );
|
cmp_ok( $res->return_code, '==', 0, "Webserver $host_tcp_http responded" );
|
||||||
like( $res->output, $successOutput, "Output OK" );
|
like( $res->output, $successOutput, "Output OK" );
|
||||||
|
|
||||||
|
if ($has_ipv6) {
|
||||||
|
# Test for IPv6 formatting
|
||||||
|
$res = NPTest->testCmd(
|
||||||
|
"./$plugin -I $host_tcp_http_ipv6 -wt 300 -ct 600"
|
||||||
|
);
|
||||||
|
cmp_ok( $res->return_code, '==', 0, "IPv6 URL formatting is working" );
|
||||||
|
like( $res->output, $successOutput, "Output OK" );
|
||||||
|
}
|
||||||
|
|
||||||
$res = NPTest->testCmd(
|
$res = NPTest->testCmd(
|
||||||
"./$plugin $host_tcp_http -wt 300 -ct 600 -v -v -v -k 'bob:there' -k 'carl:frown'"
|
"./$plugin $host_tcp_http -wt 300 -ct 600 -v -v -v -k 'bob:there' -k 'carl:frown'"
|
||||||
);
|
);
|
||||||
|
|
|
@ -103,7 +103,7 @@ SKIP: {
|
||||||
cmp_ok( $res->return_code, "==", 0, "And also when not found");
|
cmp_ok( $res->return_code, "==", 0, "And also when not found");
|
||||||
}
|
}
|
||||||
SKIP: {
|
SKIP: {
|
||||||
skip "No internet access", 23 if $internet_access eq "no";
|
skip "No internet access", 22 if $internet_access eq "no";
|
||||||
|
|
||||||
$res = NPTest->testCmd(
|
$res = NPTest->testCmd(
|
||||||
"./$plugin --ssl $host_tls_http"
|
"./$plugin --ssl $host_tls_http"
|
||||||
|
|
|
@ -21,7 +21,7 @@ use FindBin qw($Bin);
|
||||||
|
|
||||||
$ENV{'LC_TIME'} = "C";
|
$ENV{'LC_TIME'} = "C";
|
||||||
|
|
||||||
my $common_tests = 72;
|
my $common_tests = 73;
|
||||||
my $ssl_only_tests = 8;
|
my $ssl_only_tests = 8;
|
||||||
# Check that all dependent modules are available
|
# Check that all dependent modules are available
|
||||||
eval "use HTTP::Daemon 6.01;";
|
eval "use HTTP::Daemon 6.01;";
|
||||||
|
@ -200,6 +200,14 @@ sub run_server {
|
||||||
$c->send_basic_header;
|
$c->send_basic_header;
|
||||||
$c->send_crlf;
|
$c->send_crlf;
|
||||||
$c->send_response(HTTP::Response->new( 200, 'OK', undef, $r->header ('Host')));
|
$c->send_response(HTTP::Response->new( 200, 'OK', undef, $r->header ('Host')));
|
||||||
|
} elsif ($r->url->path eq "/chunked") {
|
||||||
|
my $chunks = ["chunked", "encoding", "test\n"];
|
||||||
|
$c->send_response(HTTP::Response->new( 200, 'OK', undef, sub {
|
||||||
|
my $chunk = shift @{$chunks};
|
||||||
|
return unless $chunk;
|
||||||
|
sleep(1);
|
||||||
|
return($chunk);
|
||||||
|
}));
|
||||||
} else {
|
} else {
|
||||||
$c->send_error(HTTP::Status->RC_FORBIDDEN);
|
$c->send_error(HTTP::Status->RC_FORBIDDEN);
|
||||||
}
|
}
|
||||||
|
@ -472,7 +480,8 @@ sub run_common_tests {
|
||||||
local $SIG{ALRM} = sub { die "alarm\n" };
|
local $SIG{ALRM} = sub { die "alarm\n" };
|
||||||
alarm(2);
|
alarm(2);
|
||||||
$result = NPTest->testCmd( $cmd );
|
$result = NPTest->testCmd( $cmd );
|
||||||
alarm(0); };
|
};
|
||||||
|
alarm(0);
|
||||||
isnt( $@, "alarm\n", $cmd );
|
isnt( $@, "alarm\n", $cmd );
|
||||||
is( $result->return_code, 0, $cmd );
|
is( $result->return_code, 0, $cmd );
|
||||||
|
|
||||||
|
@ -482,7 +491,8 @@ sub run_common_tests {
|
||||||
local $SIG{ALRM} = sub { die "alarm\n" };
|
local $SIG{ALRM} = sub { die "alarm\n" };
|
||||||
alarm(2);
|
alarm(2);
|
||||||
$result = NPTest->testCmd( $cmd );
|
$result = NPTest->testCmd( $cmd );
|
||||||
alarm(0); };
|
};
|
||||||
|
alarm(0);
|
||||||
isnt( $@, "alarm\n", $cmd );
|
isnt( $@, "alarm\n", $cmd );
|
||||||
isnt( $result->return_code, 0, $cmd );
|
isnt( $result->return_code, 0, $cmd );
|
||||||
|
|
||||||
|
@ -508,4 +518,9 @@ sub run_common_tests {
|
||||||
};
|
};
|
||||||
is( $@, "", $cmd );
|
is( $@, "", $cmd );
|
||||||
|
|
||||||
|
$cmd = "$command -u /chunked -s 'chunkedencodingtest' -d 'Transfer-Encoding: chunked'";
|
||||||
|
eval {
|
||||||
|
$result = NPTest->testCmd( $cmd, 5 );
|
||||||
|
};
|
||||||
|
is( $@, "", $cmd );
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ use FindBin qw($Bin);
|
||||||
|
|
||||||
$ENV{'LC_TIME'} = "C";
|
$ENV{'LC_TIME'} = "C";
|
||||||
|
|
||||||
my $common_tests = 70;
|
my $common_tests = 71;
|
||||||
my $virtual_port_tests = 8;
|
my $virtual_port_tests = 8;
|
||||||
my $ssl_only_tests = 12;
|
my $ssl_only_tests = 12;
|
||||||
# Check that all dependent modules are available
|
# Check that all dependent modules are available
|
||||||
|
@ -190,6 +190,14 @@ sub run_server {
|
||||||
$c->send_basic_header;
|
$c->send_basic_header;
|
||||||
$c->send_crlf;
|
$c->send_crlf;
|
||||||
$c->send_response(HTTP::Response->new( 200, 'OK', undef, $r->header ('Host')));
|
$c->send_response(HTTP::Response->new( 200, 'OK', undef, $r->header ('Host')));
|
||||||
|
} elsif ($r->url->path eq "/chunked") {
|
||||||
|
my $chunks = ["chunked", "encoding", "test\n"];
|
||||||
|
$c->send_response(HTTP::Response->new( 200, 'OK', undef, sub {
|
||||||
|
my $chunk = shift @{$chunks};
|
||||||
|
return unless $chunk;
|
||||||
|
sleep(1);
|
||||||
|
return($chunk);
|
||||||
|
}));
|
||||||
} else {
|
} else {
|
||||||
$c->send_error(HTTP::Status->RC_FORBIDDEN);
|
$c->send_error(HTTP::Status->RC_FORBIDDEN);
|
||||||
}
|
}
|
||||||
|
@ -497,4 +505,9 @@ sub run_common_tests {
|
||||||
};
|
};
|
||||||
is( $@, "", $cmd );
|
is( $@, "", $cmd );
|
||||||
|
|
||||||
|
$cmd = "$command -u /chunked -s 'chunkedencodingtest' -d 'Transfer-Encoding: chunked'";
|
||||||
|
eval {
|
||||||
|
$result = NPTest->testCmd( $cmd, 5 );
|
||||||
|
};
|
||||||
|
is( $@, "", $cmd );
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ use NPTest;
|
||||||
use FindBin qw($Bin);
|
use FindBin qw($Bin);
|
||||||
use POSIX qw/strftime/;
|
use POSIX qw/strftime/;
|
||||||
|
|
||||||
my $tests = 73;
|
my $tests = 81;
|
||||||
# Check that all dependent modules are available
|
# Check that all dependent modules are available
|
||||||
eval {
|
eval {
|
||||||
require NetSNMP::OID;
|
require NetSNMP::OID;
|
||||||
|
@ -268,3 +268,19 @@ like($res->output, '/SNMP WARNING - \d+ \*-4\* | iso.3.6.1.4.1.8072.3.2.67.10=\d
|
||||||
$res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.10,.1.3.6.1.4.1.8072.3.2.67.17 -w 1,2 -c 1" );
|
$res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.10,.1.3.6.1.4.1.8072.3.2.67.17 -w 1,2 -c 1" );
|
||||||
is($res->return_code, 2, "Multiple OIDs with some thresholds" );
|
is($res->return_code, 2, "Multiple OIDs with some thresholds" );
|
||||||
like($res->output, '/SNMP CRITICAL - \*\d+\* \*-4\* | iso.3.6.1.4.1.8072.3.2.67.10=\d+c;1;2 iso.3.6.1.4.1.8072.3.2.67.17=-4;;/', "Multiple OIDs with thresholds output" );
|
like($res->output, '/SNMP CRITICAL - \*\d+\* \*-4\* | iso.3.6.1.4.1.8072.3.2.67.10=\d+c;1;2 iso.3.6.1.4.1.8072.3.2.67.17=-4;;/', "Multiple OIDs with thresholds output" );
|
||||||
|
|
||||||
|
$res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.19");
|
||||||
|
is($res->return_code, 0, "Test plain .1.3.6.1.4.1.8072.3.2.67.6 RC" );
|
||||||
|
is($res->output,'SNMP OK - 42 | iso.3.6.1.4.1.8072.3.2.67.19=42 ', "Test plain value of .1.3.6.1.4.1.8072.3.2.67.1" );
|
||||||
|
|
||||||
|
$res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.19 -M .1");
|
||||||
|
is($res->return_code, 0, "Test multiply RC" );
|
||||||
|
is($res->output,'SNMP OK - 4.200000 | iso.3.6.1.4.1.8072.3.2.67.19=4.200000 ' , "Test multiply .1 output" );
|
||||||
|
|
||||||
|
$res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.19 --multiplier=.1 -f '%.2f' ");
|
||||||
|
is($res->return_code, 0, "Test multiply RC + format" );
|
||||||
|
is($res->output, 'SNMP OK - 4.20 | iso.3.6.1.4.1.8072.3.2.67.19=4.20 ', "Test multiply .1 output + format" );
|
||||||
|
|
||||||
|
$res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.19 --multiplier=.1 -f '%.2f' -w 1");
|
||||||
|
is($res->return_code, 1, "Test multiply RC + format + thresholds" );
|
||||||
|
is($res->output, 'SNMP WARNING - *4.20* | iso.3.6.1.4.1.8072.3.2.67.19=4.20;1 ', "Test multiply .1 output + format + thresholds" );
|
||||||
|
|
|
@ -32,11 +32,11 @@ my $multilin5 = 'And now have fun with with this: "C:\\"
|
||||||
because we\'re not done yet!';
|
because we\'re not done yet!';
|
||||||
|
|
||||||
# Next are arrays of indexes (Type, initial value and increments)
|
# Next are arrays of indexes (Type, initial value and increments)
|
||||||
# 0..16 <---- please update comment when adding/removing fields
|
# 0..19 <---- please update comment when adding/removing fields
|
||||||
my @fields = (ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_UNSIGNED, ASN_UNSIGNED, ASN_COUNTER, ASN_COUNTER64, ASN_UNSIGNED, ASN_COUNTER, ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_INTEGER, ASN_OCTET_STR, ASN_OCTET_STR );
|
my @fields = (ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_UNSIGNED, ASN_UNSIGNED, ASN_COUNTER, ASN_COUNTER64, ASN_UNSIGNED, ASN_COUNTER, ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_INTEGER, ASN_OCTET_STR, ASN_OCTET_STR, ASN_INTEGER );
|
||||||
my @values = ($multiline, $multilin2, $multilin3, $multilin4, $multilin5, 4294965296, 1000, 4294965296, uint64("18446744073709351616"), int(rand(2**32)), 64000, "stringtests", "3.5", "87.4startswithnumberbutshouldbestring", '555"I said"', 'CUSTOM CHECK OK: foo is 12345', -2, '-4', '-6.6' );
|
my @values = ($multiline, $multilin2, $multilin3, $multilin4, $multilin5, 4294965296, 1000, 4294965296, uint64("18446744073709351616"), int(rand(2**32)), 64000, "stringtests", "3.5", "87.4startswithnumberbutshouldbestring", '555"I said"', 'CUSTOM CHECK OK: foo is 12345', -2, '-4', '-6.6', 42 );
|
||||||
# undef increments are randomized
|
# undef increments are randomized
|
||||||
my @incrts = (undef, undef, undef, undef, undef, 1000, -500, 1000, 100000, undef, 666, undef, undef, undef, undef, undef, -1, undef, undef );
|
my @incrts = (undef, undef, undef, undef, undef, 1000, -500, 1000, 100000, undef, 666, undef, undef, undef, undef, undef, -1, undef, undef, 0 );
|
||||||
|
|
||||||
# Number of elements in our OID
|
# Number of elements in our OID
|
||||||
my $oidelts;
|
my $oidelts;
|
||||||
|
|
|
@ -615,27 +615,27 @@ char *perfdata_uint64 (const char *label,
|
||||||
char *data = NULL;
|
char *data = NULL;
|
||||||
|
|
||||||
if (strpbrk (label, "'= "))
|
if (strpbrk (label, "'= "))
|
||||||
xasprintf (&data, "'%s'=%ld%s;", label, val, uom);
|
xasprintf (&data, "'%s'=%" PRIu64 "%s;", label, val, uom);
|
||||||
else
|
else
|
||||||
xasprintf (&data, "%s=%ld%s;", label, val, uom);
|
xasprintf (&data, "%s=%" PRIu64 "%s;", label, val, uom);
|
||||||
|
|
||||||
if (warnp)
|
if (warnp)
|
||||||
xasprintf (&data, "%s%lu;", data, warn);
|
xasprintf (&data, "%s%" PRIu64 ";", data, warn);
|
||||||
else
|
else
|
||||||
xasprintf (&data, "%s;", data);
|
xasprintf (&data, "%s;", data);
|
||||||
|
|
||||||
if (critp)
|
if (critp)
|
||||||
xasprintf (&data, "%s%lu;", data, crit);
|
xasprintf (&data, "%s%" PRIu64 ";", data, crit);
|
||||||
else
|
else
|
||||||
xasprintf (&data, "%s;", data);
|
xasprintf (&data, "%s;", data);
|
||||||
|
|
||||||
if (minp)
|
if (minp)
|
||||||
xasprintf (&data, "%s%lu;", data, minv);
|
xasprintf (&data, "%s%" PRIu64 ";", data, minv);
|
||||||
else
|
else
|
||||||
xasprintf (&data, "%s;", data);
|
xasprintf (&data, "%s;", data);
|
||||||
|
|
||||||
if (maxp)
|
if (maxp)
|
||||||
xasprintf (&data, "%s%lu", data, maxv);
|
xasprintf (&data, "%s%" PRIu64, data, maxv);
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
@ -656,27 +656,27 @@ char *perfdata_int64 (const char *label,
|
||||||
char *data = NULL;
|
char *data = NULL;
|
||||||
|
|
||||||
if (strpbrk (label, "'= "))
|
if (strpbrk (label, "'= "))
|
||||||
xasprintf (&data, "'%s'=%ld%s;", label, val, uom);
|
xasprintf (&data, "'%s'=%" PRId64 "%s;", label, val, uom);
|
||||||
else
|
else
|
||||||
xasprintf (&data, "%s=%ld%s;", label, val, uom);
|
xasprintf (&data, "%s=%" PRId64 "%s;", label, val, uom);
|
||||||
|
|
||||||
if (warnp)
|
if (warnp)
|
||||||
xasprintf (&data, "%s%ld;", data, warn);
|
xasprintf (&data, "%s%" PRId64 ";", data, warn);
|
||||||
else
|
else
|
||||||
xasprintf (&data, "%s;", data);
|
xasprintf (&data, "%s;", data);
|
||||||
|
|
||||||
if (critp)
|
if (critp)
|
||||||
xasprintf (&data, "%s%ld;", data, crit);
|
xasprintf (&data, "%s%" PRId64 ";", data, crit);
|
||||||
else
|
else
|
||||||
xasprintf (&data, "%s;", data);
|
xasprintf (&data, "%s;", data);
|
||||||
|
|
||||||
if (minp)
|
if (minp)
|
||||||
xasprintf (&data, "%s%ld;", data, minv);
|
xasprintf (&data, "%s%" PRId64 ";", data, minv);
|
||||||
else
|
else
|
||||||
xasprintf (&data, "%s;", data);
|
xasprintf (&data, "%s;", data);
|
||||||
|
|
||||||
if (maxp)
|
if (maxp)
|
||||||
xasprintf (&data, "%s%ld", data, maxv);
|
xasprintf (&data, "%s%" PRId64, data, maxv);
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,7 +1,7 @@
|
||||||
# Makefile.in generated by automake 1.16.3 from Makefile.am.
|
# Makefile.in generated by automake 1.16.5 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1994-2020 Free Software Foundation, Inc.
|
# Copyright (C) 1994-2021 Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This Makefile.in is free software; the Free Software Foundation
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
@ -299,8 +299,6 @@ am__define_uniq_tagged_files = \
|
||||||
unique=`for i in $$list; do \
|
unique=`for i in $$list; do \
|
||||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
done | $(am__uniquify_input)`
|
done | $(am__uniquify_input)`
|
||||||
ETAGS = etags
|
|
||||||
CTAGS = ctags
|
|
||||||
am__DIST_COMMON = $(srcdir)/Makefile.in \
|
am__DIST_COMMON = $(srcdir)/Makefile.in \
|
||||||
$(top_srcdir)/build-aux/depcomp \
|
$(top_srcdir)/build-aux/depcomp \
|
||||||
$(top_srcdir)/build-aux/mkinstalldirs README
|
$(top_srcdir)/build-aux/mkinstalldirs README
|
||||||
|
@ -329,6 +327,8 @@ CCDEPMODE = @CCDEPMODE@
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CSCOPE = @CSCOPE@
|
||||||
|
CTAGS = @CTAGS@
|
||||||
CYGPATH_W = @CYGPATH_W@
|
CYGPATH_W = @CYGPATH_W@
|
||||||
DBILIBS = @DBILIBS@
|
DBILIBS = @DBILIBS@
|
||||||
DEFS = @DEFS@
|
DEFS = @DEFS@
|
||||||
|
@ -348,6 +348,7 @@ ENOLINK_VALUE = @ENOLINK_VALUE@
|
||||||
EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
|
EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
|
||||||
EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
|
EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
|
||||||
ERRNO_H = @ERRNO_H@
|
ERRNO_H = @ERRNO_H@
|
||||||
|
ETAGS = @ETAGS@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
EXTRAS = @EXTRAS@
|
EXTRAS = @EXTRAS@
|
||||||
EXTRAS_ROOT = @EXTRAS_ROOT@
|
EXTRAS_ROOT = @EXTRAS_ROOT@
|
||||||
|
@ -1610,7 +1611,6 @@ cscopelist-am: $(am__tagged_files)
|
||||||
|
|
||||||
distclean-tags:
|
distclean-tags:
|
||||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||||
|
|
||||||
distdir: $(BUILT_SOURCES)
|
distdir: $(BUILT_SOURCES)
|
||||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue