[From nobody Wed Nov  4 15:59:04 2026
Received: (at submit) by bugs.debian.org; 9 Oct 2014 14:22:06 +0000
X-Spam-Checker-Version: SpamAssassin 3.3.2-bugs.debian.org_2005_01_02
 (2011-06-06) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-9.3 required=4.0 tests=BAYES_00,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,FOURLA,FREEMAIL_FROM,HAS_PACKAGE,HTML_MESSAGE,
 MURPHY_DRUGS_REL8,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham
 version=3.3.2-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 22; hammy, 151; neutral, 97; spammy,
 0. spammytokens: hammytokens:0.000-+--libssl100, 0.000-+--libssl1.0.0,
 0.000-+--sizeof, 0.000-+--nagios, 0.000-+--UD:orig
Return-path: &lt;leoweppelman@gmail.com&gt;
Received: from mail-qg0-f52.google.com ([209.85.192.52])
 by buxtehude.debian.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:128)
 (Exim 4.80) (envelope-from &lt;leoweppelman@gmail.com&gt;)
 id 1XcEbW-0002fT-5Y
 for submit@bugs.debian.org; Thu, 09 Oct 2014 14:22:06 +0000
Received: by mail-qg0-f52.google.com with SMTP id q108so2187492qgd.25
 for &lt;submit@bugs.debian.org&gt;; Thu, 09 Oct 2014 07:21:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:date:message-id:subject:from:to:content-type;
 bh=DZ/SzrRSa7z+xOypGTSdGukdjJKEOOUhIv7Exj1ap+s=;
 b=E5FirZ+RFbfkDA6licMYyCYrcYRjVih99BczgR+eBnBvOx4yiRl3OpzSIuDtfbbsCk
 gAI1S+N6wheyFN8Tl+ITYZE8niQ3iic2IJSPH61tODUfaqNNP/soZBbzxuDicXPNCg7A
 KlfW9Tt2iYYd+sqM9bMM/Fa9CVKm0GAP8MV5RxpFZSnUP1coebE8tO4r1wn5RymkVZjU
 uid86aZSSWjcih+CTMF+qE1S4qaLwPDZgo1dahIUFvFXLBpoRXmoBhwVK1UijTV8FX/z
 vjT2U7MdqVPtmBeXG8ewYmhyQ3d87sdQpRUS83jQ/4UEaMQwN9LVDA+MjR1JZN8C1qE9
 knaA==
MIME-Version: 1.0
X-Received: by 10.229.245.130 with SMTP id lu2mr13931888qcb.31.1412864518751; 
 Thu, 09 Oct 2014 07:21:58 -0700 (PDT)
Received: by 10.140.92.71 with HTTP; Thu, 9 Oct 2014 07:21:58 -0700 (PDT)
Date: Thu, 9 Oct 2014 16:21:58 +0200
Message-ID: &lt;CANGsaKDQRWHsua5C6EgdGLN6y5Ltbsnpe=+1sA25BQOH-NavSQ@mail.gmail.com&gt;
Subject: nagios-plugins-basic: The nagios plugin check_ntp_time does not
 recognize KoD packages from the ntpserver
From: leo weppelman &lt;leoweppelman@gmail.com&gt;
To: Debian Bug Tracking System &lt;submit@bugs.debian.org&gt;
Content-Type: multipart/mixed; boundary=001a1134becac1a88f0504fe27eb
Delivered-To: submit@bugs.debian.org

--001a1134becac1a88f0504fe27eb
Content-Type: multipart/alternative; boundary=001a1134becac1a88a0504fe27e9

--001a1134becac1a88a0504fe27e9
Content-Type: text/plain; charset=UTF-8

Package: nagios-plugins-basic
Version: 1.4.16-1
Severity: important
Tags: upstream patch

Dear Maintainer,

After hardening the ntp configuration, I noticed that the nagios check was
no longer functioning. The line I added to ntp.conf was:
   restrict default limited kod nomodify notrap nopeer noquery

The culprit turned out to be the 'kod' option in the restrict line.

The nagios check does not understand the contents of the 'KoD' package and
only reports that the server stratum is 0. Which is part of the KoD packet.

I created a patch to deal with this situation. The patch is in the
attachment.

-- System Information:
Debian Release: 7.5
  APT prefers stable
  APT policy: (990, 'stable')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-4-686-pae (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages nagios-plugins-basic depends on:
ii  iputils-ping           3:20101006-1+b1
ii  libc6                  2.13-38+deb7u1
ii  libssl1.0.0            1.0.1e-2+deb7u11
ii  nagios-plugins-common  1.4.16-1
ii  procps                 1:3.3.3-3
ii  ucf                    3.0025+nmu3

nagios-plugins-basic recommends no packages.

Versions of packages nagios-plugins-basic suggests:
pn  nagios3 | icinga  &lt;none&gt;

-- no debconf information

--001a1134becac1a88a0504fe27e9
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

&lt;div dir=3D&quot;ltr&quot;&gt;&lt;div&gt;Package: nagios-plugins-basic&lt;br&gt;Version: 1.4.16-1&lt;br=
&gt;Severity: important&lt;br&gt;Tags: upstream patch&lt;br&gt;&lt;br&gt;Dear Maintainer,&lt;br&gt;&lt;br=
&gt;After hardening the ntp configuration, I noticed that the nagios check was=
&lt;br&gt;no longer functioning. The line I added to ntp.conf was:&lt;br&gt;=C2=A0=C2=
=A0 restrict default limited kod nomodify notrap nopeer noquery&lt;br&gt;&lt;br&gt;The =
culprit turned out to be the &#39;kod&#39; option in the restrict line.&lt;br&gt;=
&lt;br&gt;The nagios check does not understand the contents of the &#39;KoD&#39; =
package and&lt;br&gt;only reports that the server stratum is 0. Which is part of =
the KoD packet.&lt;br&gt;&lt;br&gt;&lt;/div&gt;I created a patch to deal with this situation.=
 The patch is in the attachment.&lt;br&gt;&lt;br&gt;-- System Information:&lt;br&gt;Debian Re=
lease: 7.5&lt;br&gt;=C2=A0 APT prefers stable&lt;br&gt;=C2=A0 APT policy: (990, &#39;st=
able&#39;)&lt;br&gt;Architecture: i386 (i686)&lt;br&gt;&lt;br&gt;Kernel: Linux 3.2.0-4-686-pa=
e (SMP w/2 CPU cores)&lt;br&gt;Locale: LANG=3DC, LC_CTYPE=3DC (charmap=3DANSI_X3.=
4-1968)&lt;br&gt;Shell: /bin/sh linked to /bin/dash&lt;br&gt;&lt;br&gt;Versions of packages n=
agios-plugins-basic depends on:&lt;br&gt;ii=C2=A0 iputils-ping=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 3:20101006-1+b1&lt;br&gt;ii=C2=A0 libc=
6=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 2.13-38+deb7u1&lt;br&gt;ii=C2=A0 libssl1.0.0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 1.0.1e-2+deb7u=
11&lt;br&gt;ii=C2=A0 nagios-plugins-common=C2=A0 1.4.16-1&lt;br&gt;ii=C2=A0 procps=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0 1:3.3.3-3&lt;br&gt;ii=C2=A0 ucf=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0 3.0025+nmu3&lt;br&gt;&lt;br&gt;nagios-plugins-basic recommends no packages.&lt;b=
r&gt;&lt;br&gt;Versions of packages nagios-plugins-basic suggests:&lt;br&gt;pn=C2=A0 nagio=
s3 | icinga=C2=A0 &lt;none&gt;&lt;br&gt;&lt;br&gt;-- no debconf information&lt;br&gt;&lt;/div&gt;

--001a1134becac1a88a0504fe27e9--

--001a1134becac1a88f0504fe27eb
Content-Type: text/x-diff; charset=US-ASCII; name=&quot;check_ntp_time.c.patch&quot;
Content-Disposition: attachment; filename=&quot;check_ntp_time.c.patch&quot;
Content-Transfer-Encoding: base64
X-Attachment-Id: f_i1270ybk0

LS0tIGNoZWNrX250cF90aW1lLmMub3JpZwkyMDE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