From henrich at moszumanska.debian.org Sun Aug 28 02:19:43 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:43 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] branch master updated (01f5d53 -> 6398c9d) Message-ID: <20160828021940.7775.51519@moszumanska.debian.org> This is an automated email from the git hooks/post-receive script. henrich pushed a change to branch master in repository pkg-net-snmp. from 01f5d53 fix #455707 new 524d59c fix #774775 new c67750a fix #801991 new c7fc289 just adjust line new 1609817 fix #778539 new c5a72ae really fix #781257 new 8a7f759 enable parallel build new 3d5e6fe use https for Vcs-* new d1adb42 fix #586722, #587183 new e7bf6ec fix #746397 new 6f0c2a2 Import Debian patch 5.7.3+dfsg-1.1 new d0da2fd Import Debian patch 5.7.3+dfsg-1.2 new 321a936 Import Debian patch 5.7.3+dfsg-1.3 new 740e4db Import Debian patch 5.7.3+dfsg-1.4 new 4ce67a5 use https for Vcs-* new 3f1db16 Standards-Version: 3.9.8 new 6398c9d drop myself (henrich at debian.org) from uploaders. The 16 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: debian/changelog | 70 ++++++++++- debian/control | 12 +- debian/patches/26_kfreebsd.patch | 22 +--- debian/patches/27_kfreebsd.patch | 25 ++++ ...ix-kfreebsd-builds-with-kernel-headers-10.patch | 41 ------- debian/patches/callback_print.diff | 13 +++ .../do_not_callback_for_failed_reports.diff | 129 +++++++++++++++++++++ debian/patches/fix_engineid_reprobe.diff | 16 +++ debian/patches/fix_perl_bulk_gets.diff | 88 ++++++++++++++ debian/patches/let_perl_access_engineid.diff | 94 +++++++++++++++ debian/patches/series | 7 +- debian/rules | 41 ++++--- debian/snmpd.default | 8 +- debian/snmpd.postinst | 2 +- debian/snmpd.service | 15 +++ debian/snmptrapd.default | 6 +- debian/snmptrapd.service | 13 +++ 17 files changed, 519 insertions(+), 83 deletions(-) create mode 100644 debian/patches/27_kfreebsd.patch delete mode 100644 debian/patches/Fix-kfreebsd-builds-with-kernel-headers-10.patch create mode 100644 debian/patches/callback_print.diff create mode 100644 debian/patches/do_not_callback_for_failed_reports.diff create mode 100644 debian/patches/fix_engineid_reprobe.diff create mode 100644 debian/patches/fix_perl_bulk_gets.diff create mode 100644 debian/patches/let_perl_access_engineid.diff create mode 100644 debian/snmpd.service create mode 100644 debian/snmptrapd.service -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:43 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:43 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 01/16: fix #774775 In-Reply-To: <20160828021940.7775.51519@moszumanska.debian.org> References: <20160828021940.7775.51519@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch master in repository pkg-net-snmp. commit 524d59c9f42f399e1e9bc7f70a55b94076770b20 Author: Hideki Yamane Date: Mon Feb 1 22:14:04 2016 +0900 fix #774775 --- debian/changelog | 3 +++ debian/control | 1 + 2 files changed, 4 insertions(+) diff --git a/debian/changelog b/debian/changelog index cd8a1bd..cf2d89a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,9 @@ net-snmp (5.7.3+dfsg-2) UNRELEASED; urgency=medium (Closes: #794641, #794647) * debian/snmp.preinst - revert "killall", it is unnecessary anymore (Closes: #781257) + * debian/control + - fix lintian error "old-style-config-script-multiarch-path" by adding + "Multi-Arch: no" to libsnmp-dev. It also fix multi-arch install (Closes: #774775) -- Hideki Yamane Thu, 18 Jun 2015 06:43:28 +0900 diff --git a/debian/control b/debian/control index 0aa5574..15d5c7d 100644 --- a/debian/control +++ b/debian/control @@ -114,6 +114,7 @@ Description: SNMP (Simple Network Management Protocol) library debug Package: libsnmp-dev Section: libdevel Architecture: any +Multi-Arch: no Replaces: libsnmp9-dev, libsnmp15-dev, snmp (<< 5.4~dfsg), libsnmp-base (<< 5.7.2~dfsg-8.1~) Provides: libsnmp9-dev Conflicts: libsnmp9-dev, libsnmp15-dev, snmp (<< 5.4~dfsg) -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:43 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:43 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 02/16: fix #801991 In-Reply-To: <20160828021940.7775.51519@moszumanska.debian.org> References: <20160828021940.7775.51519@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch master in repository pkg-net-snmp. commit c67750af316b482a95da0f7d299804c26f90d196 Author: Hideki Yamane Date: Mon Feb 1 22:15:33 2016 +0900 fix #801991 --- debian/changelog | 2 ++ debian/control | 11 +++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index cf2d89a..0dd3dcb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,6 +16,8 @@ net-snmp (5.7.3+dfsg-2) UNRELEASED; urgency=medium * debian/control - fix lintian error "old-style-config-script-multiarch-path" by adding "Multi-Arch: no" to libsnmp-dev. It also fix multi-arch install (Closes: #774775) + - note net-snmp-config script moved to libsnmp-dev (Closes: #801991) + Thanks to Vanush Misha Paturyan -- Hideki Yamane Thu, 18 Jun 2015 06:43:28 +0900 diff --git a/debian/control b/debian/control index 15d5c7d..c0d8c15 100644 --- a/debian/control +++ b/debian/control @@ -73,10 +73,9 @@ Description: SNMP configuration script, MIBs and documentation for the exchange of management information between agents (servers) and clients. . - This package includes net-snmp-config scripts, documentation and MIBs - (Management Information Bases) for the SNMP libraries, agents and - applications. MIBs contain a formal description of the data that can be - managed using SNMP and applications. + This package includes documentation and MIBs (Management Information Bases) + for the SNMP libraries, agents and applications. MIBs contain a formal + description of the data that can be managed using SNMP and applications. . NOTE: If you want the OIDs (Object Identifiers) to resolve to their text description, you need to activate the non-free repository and install the @@ -128,8 +127,8 @@ Description: SNMP (Simple Network Management Protocol) development files and clients. . The Net-SNMP development files include the library headers, static - libraries, and documentation needed for development of custom SNMP - applications. + libraries, net-snmp-config scripts and documentation needed for development + of custom SNMP applications. Package: libsnmp-perl Section: perl -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:43 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:43 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 03/16: just adjust line In-Reply-To: <20160828021940.7775.51519@moszumanska.debian.org> References: <20160828021940.7775.51519@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch master in repository pkg-net-snmp. commit c7fc2897d60cf88f4d465f19b1f3251cdbf2f1eb Author: Hideki Yamane Date: Mon Feb 1 22:16:21 2016 +0900 just adjust line --- debian/changelog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 0dd3dcb..a7d50ef 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,7 +15,8 @@ net-snmp (5.7.3+dfsg-2) UNRELEASED; urgency=medium - revert "killall", it is unnecessary anymore (Closes: #781257) * debian/control - fix lintian error "old-style-config-script-multiarch-path" by adding - "Multi-Arch: no" to libsnmp-dev. It also fix multi-arch install (Closes: #774775) + "Multi-Arch: no" to libsnmp-dev. It also fix multi-arch install + (Closes: #774775) - note net-snmp-config script moved to libsnmp-dev (Closes: #801991) Thanks to Vanush Misha Paturyan -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:43 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:43 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 04/16: fix #778539 In-Reply-To: <20160828021940.7775.51519@moszumanska.debian.org> References: <20160828021940.7775.51519@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch master in repository pkg-net-snmp. commit 160981795021f7cd7f1d1007d672a2e00a3ebeb4 Author: Hideki Yamane Date: Mon Feb 1 22:18:34 2016 +0900 fix #778539 --- debian/changelog | 3 +++ debian/libsnmp-perl.manpages | 1 + 2 files changed, 4 insertions(+) diff --git a/debian/changelog b/debian/changelog index a7d50ef..d6019ca 100644 --- a/debian/changelog +++ b/debian/changelog @@ -19,6 +19,9 @@ net-snmp (5.7.3+dfsg-2) UNRELEASED; urgency=medium (Closes: #774775) - note net-snmp-config script moved to libsnmp-dev (Closes: #801991) Thanks to Vanush Misha Paturyan + * debian/libsnmp-perl.manpages + - fix to install perl modules man pages (Closes: #778539) + Thanks to Guillem Jover for the patch -- Hideki Yamane Thu, 18 Jun 2015 06:43:28 +0900 diff --git a/debian/libsnmp-perl.manpages b/debian/libsnmp-perl.manpages new file mode 100644 index 0000000..832c276 --- /dev/null +++ b/debian/libsnmp-perl.manpages @@ -0,0 +1 @@ +perl/blib/man3/* -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:43 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:43 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 05/16: really fix #781257 In-Reply-To: <20160828021940.7775.51519@moszumanska.debian.org> References: <20160828021940.7775.51519@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch master in repository pkg-net-snmp. commit c5a72ae98741c2a14c6e78d76fdb14ee24721021 Author: Hideki Yamane Date: Mon Feb 1 22:21:49 2016 +0900 really fix #781257 --- debian/snmp.prerm | 1 - 1 file changed, 1 deletion(-) diff --git a/debian/snmp.prerm b/debian/snmp.prerm index a02114d..6788f5f 100644 --- a/debian/snmp.prerm +++ b/debian/snmp.prerm @@ -4,7 +4,6 @@ set -e case "$1" in remove|upgrade|deconfigure) - killall -u snmp 2>/dev/null || true ;; failed-upgrade) -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:44 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:44 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 06/16: enable parallel build In-Reply-To: <20160828021940.7775.51519@moszumanska.debian.org> References: <20160828021940.7775.51519@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch master in repository pkg-net-snmp. commit 8a7f759b693843c7725a854e2ef0bd04e7f3853a Author: Hideki Yamane Date: Mon Feb 1 22:54:14 2016 +0900 enable parallel build --- debian/changelog | 2 ++ debian/rules | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index d6019ca..6616d7b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -22,6 +22,8 @@ net-snmp (5.7.3+dfsg-2) UNRELEASED; urgency=medium * debian/libsnmp-perl.manpages - fix to install perl modules man pages (Closes: #778539) Thanks to Guillem Jover for the patch + * debian/rules + - make it parallel build -- Hideki Yamane Thu, 18 Jun 2015 06:43:28 +0900 diff --git a/debian/rules b/debian/rules index d1da11e..ef7d9ec 100755 --- a/debian/rules +++ b/debian/rules @@ -35,7 +35,7 @@ MIB_MODULES += host endif %: - dh $@ --with autotools-dev,autoreconf,python2 + dh $@ --with autotools-dev,autoreconf,python2 --parallel override_dh_auto_configure: dh_auto_configure -- --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man \ -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:44 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:44 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 07/16: use https for Vcs-* In-Reply-To: <20160828021940.7775.51519@moszumanska.debian.org> References: <20160828021940.7775.51519@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch master in repository pkg-net-snmp. commit 3d5e6fefe0f3c8e862d7a64679d18039c4fb043d Author: Hideki Yamane Date: Mon Feb 1 23:00:01 2016 +0900 use https for Vcs-* --- debian/changelog | 1 + debian/control | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 6616d7b..715407c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -19,6 +19,7 @@ net-snmp (5.7.3+dfsg-2) UNRELEASED; urgency=medium (Closes: #774775) - note net-snmp-config script moved to libsnmp-dev (Closes: #801991) Thanks to Vanush Misha Paturyan + - use https for Vcs-* * debian/libsnmp-perl.manpages - fix to install perl modules man pages (Closes: #778539) Thanks to Guillem Jover for the patch diff --git a/debian/control b/debian/control index c0d8c15..3a117fa 100644 --- a/debian/control +++ b/debian/control @@ -14,8 +14,8 @@ Build-Depends: debhelper (>= 9), libtool, libwrap0-dev, libssl-dev (>> 0.9.8), p libmysqld-dev, libpci-dev Build-Conflicts: libsnmp-dev Standards-Version: 3.9.6 -Vcs-Git: git://anonscm.debian.org/pkg-net-snmp/pkg-net-snmp.git -Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-net-snmp/pkg-net-snmp.git +Vcs-Git: https://anonscm.debian.org/git/pkg-net-snmp/pkg-net-snmp.git +Vcs-Browser: https://anonscm.debian.org/cgit/pkg-net-snmp/pkg-net-snmp.git XS-Python-Version: 2.7 Homepage: http://net-snmp.sourceforge.net/ -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:44 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:44 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 08/16: fix #586722, #587183 In-Reply-To: <20160828021940.7775.51519@moszumanska.debian.org> References: <20160828021940.7775.51519@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch master in repository pkg-net-snmp. commit d1adb42cd91f134c7a0345af8bfa9e451a4cfeda Author: Hideki Yamane Date: Thu Feb 4 22:24:07 2016 +0900 fix #586722, #587183 --- debian/changelog | 1 + debian/{NEWS => snmpd.NEWS} | 0 2 files changed, 1 insertion(+) diff --git a/debian/changelog b/debian/changelog index 715407c..e04a9f3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -25,6 +25,7 @@ net-snmp (5.7.3+dfsg-2) UNRELEASED; urgency=medium Thanks to Guillem Jover for the patch * debian/rules - make it parallel build + * move debian/NEWS to debian/snmpd.NEWS (Closes: #586722, #587183) -- Hideki Yamane Thu, 18 Jun 2015 06:43:28 +0900 diff --git a/debian/NEWS b/debian/snmpd.NEWS similarity index 100% rename from debian/NEWS rename to debian/snmpd.NEWS -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:44 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:44 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 09/16: fix #746397 In-Reply-To: <20160828021940.7775.51519@moszumanska.debian.org> References: <20160828021940.7775.51519@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch master in repository pkg-net-snmp. commit e7bf6ec23e2c104c8880b751ee7592c47102c063 Author: Hideki Yamane Date: Thu Feb 4 22:26:37 2016 +0900 fix #746397 --- debian/changelog | 2 ++ debian/snmpd.init | 38 ++++++++++++++++++++++---------------- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/debian/changelog b/debian/changelog index e04a9f3..1756eee 100644 --- a/debian/changelog +++ b/debian/changelog @@ -26,6 +26,8 @@ net-snmp (5.7.3+dfsg-2) UNRELEASED; urgency=medium * debian/rules - make it parallel build * move debian/NEWS to debian/snmpd.NEWS (Closes: #586722, #587183) + * make init script sane (add Missing log_end_msg, etc) (Closes: #746397) + Thanks to Uwe Storbeck for the patch. -- Hideki Yamane Thu, 18 Jun 2015 06:43:28 +0900 diff --git a/debian/snmpd.init b/debian/snmpd.init index 3e6dc03..fac8a32 100644 --- a/debian/snmpd.init +++ b/debian/snmpd.init @@ -1,4 +1,4 @@ -#! /bin/sh +#!/bin/sh ### BEGIN INIT INFO # Provides: snmpd # Required-Start: $network $remote_fs $syslog @@ -34,9 +34,11 @@ SNMPDOPTS="-Lsd -Lf /dev/null -p $SNMP_PID" # Cd to / before starting any daemons. cd / +status=0 + case "$1" in start) - log_daemon_msg "Starting SNMP services:" + log_daemon_msg "Starting SNMP services" # remove old symlink with previous version if [ -L /var/run/agentx ]; then rm -f /var/run/agentx @@ -45,36 +47,40 @@ case "$1" in mkdir -p /var/run/agentx fi if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then + log_progress_msg "snmpd" start-stop-daemon --quiet --start --oknodo --exec /usr/sbin/snmpd \ - -- $SNMPDOPTS - log_progress_msg " snmpd" + -- $SNMPDOPTS || status=$? fi + log_end_msg $status ;; stop) - log_daemon_msg "Stopping SNMP services:" - start-stop-daemon --quiet --stop --oknodo --retry 3 --exec /usr/sbin/snmpd && [ ! -f $SNMP_PID ] || rm $SNMP_PID - log_progress_msg " snmpd" + log_daemon_msg "Stopping SNMP services" "snmpd" + start-stop-daemon --quiet --stop --oknodo --retry 3 --exec /usr/sbin/snmpd || status=$? + [ $status -eq 0 -a -f $SNMP_PID ] && rm $SNMP_PID + log_end_msg $status ;; restart) - log_daemon_msg "Restarting SNMP services:" - start-stop-daemon --quiet --stop --oknodo --retry 3 --exec /usr/sbin/snmpd && [ ! -f $SNMP_PID ] || rm $SNMP_PID + log_daemon_msg "Restarting SNMP services" + start-stop-daemon --quiet --stop --oknodo --retry 3 --exec /usr/sbin/snmpd || status=$? + [ $status -eq 0 -a -f $SNMP_PID ] && rm $SNMP_PID if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then - start-stop-daemon --quiet --start --exec /usr/sbin/snmpd -- $SNMPDOPTS - log_progress_msg " snmpd" + log_progress_msg "snmpd" + start-stop-daemon --quiet --start --exec /usr/sbin/snmpd -- $SNMPDOPTS || status=$? fi + log_end_msg $status ;; reload|force-reload) - log_daemon_msg "Reloading SNMP services:" + log_daemon_msg "Reloading SNMP services" if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then + log_progress_msg "snmpd" start-stop-daemon --quiet --stop --signal 1 \ - --pidfile "$SNMP_PID" --exec /usr/sbin/snmpd - log_progress_msg " snmpd" + --pidfile "$SNMP_PID" --exec /usr/sbin/snmpd || status=$? fi + log_end_msg $status ;; status) - status=0 if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then - status_of_proc /usr/sbin/snmpd snmpd || status=$? + status_of_proc /usr/sbin/snmpd snmpd || status=$? fi exit $status ;; -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:44 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:44 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 10/16: Import Debian patch 5.7.3+dfsg-1.1 In-Reply-To: <20160828021940.7775.51519@moszumanska.debian.org> References: <20160828021940.7775.51519@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch master in repository pkg-net-snmp. commit 6f0c2a20312c7ed21190c504a85d1f20cc21513b Author: Steinar H. Gunderson Date: Tue Mar 29 10:30:24 2016 +0200 Import Debian patch 5.7.3+dfsg-1.1 --- debian/{snmpd.NEWS => NEWS} | 0 debian/changelog | 46 +++++--- debian/control | 16 +-- debian/libsnmp-perl.manpages | 1 - debian/patches/26_kfreebsd.patch | 22 +--- debian/patches/27_kfreebsd.patch | 25 ++++ ...ix-kfreebsd-builds-with-kernel-headers-10.patch | 41 ------- debian/patches/callback_print.diff | 13 +++ .../do_not_callback_for_failed_reports.diff | 129 +++++++++++++++++++++ debian/patches/fix_engineid_reprobe.diff | 16 +++ debian/patches/fix_perl_bulk_gets.diff | 88 ++++++++++++++ debian/patches/let_perl_access_engineid.diff | 94 +++++++++++++++ debian/patches/series | 7 +- debian/rules | 12 +- debian/snmp.prerm | 1 + debian/snmpd.default | 2 +- debian/snmpd.init | 38 +++--- 17 files changed, 441 insertions(+), 110 deletions(-) diff --git a/debian/snmpd.NEWS b/debian/NEWS similarity index 100% rename from debian/snmpd.NEWS rename to debian/NEWS diff --git a/debian/changelog b/debian/changelog index 1756eee..e4622d2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,10 @@ -net-snmp (5.7.3+dfsg-2) UNRELEASED; urgency=medium +net-snmp (5.7.3+dfsg-1.1) unstable; urgency=medium + * Non-maintainer upload, done on top of the latest version in pkg-net-snmp + git, as well as adding Steven Chamberlain's kFreeBSD patches from + bug #810892. + + [ Hideki Yamane ] * debian/patches - add Bug-788964-net-snmp-snmp_pdu_parse-DoS.patch (Closes: #788964) - add 0026-fix-Bug-785380-incorrect-date-format.patch (Closes: #785380) @@ -13,23 +18,30 @@ net-snmp (5.7.3+dfsg-2) UNRELEASED; urgency=medium (Closes: #794641, #794647) * debian/snmp.preinst - revert "killall", it is unnecessary anymore (Closes: #781257) - * debian/control - - fix lintian error "old-style-config-script-multiarch-path" by adding - "Multi-Arch: no" to libsnmp-dev. It also fix multi-arch install - (Closes: #774775) - - note net-snmp-config script moved to libsnmp-dev (Closes: #801991) - Thanks to Vanush Misha Paturyan - - use https for Vcs-* - * debian/libsnmp-perl.manpages - - fix to install perl modules man pages (Closes: #778539) - Thanks to Guillem Jover for the patch - * debian/rules - - make it parallel build - * move debian/NEWS to debian/snmpd.NEWS (Closes: #586722, #587183) - * make init script sane (add Missing log_end_msg, etc) (Closes: #746397) - Thanks to Uwe Storbeck for the patch. - -- Hideki Yamane Thu, 18 Jun 2015 06:43:28 +0900 + [ Steven Chamberlain ] + * Fix a typo in 26_kfreebsd.patch + * Add 27_kfreebsd.patch: (Closes: #810982) + - Add missing dependency of mibII/icmp on kfreebsd + - Add kfreebsd definitions not in GNU libc's icmp6.h + * Remove obsolete Fix-kfreebsd-builds-with-kernel-headers-10.patch + * Re-enable IPv6 on kfreebsd (Closes: #765846) + * Build with the libbsd overlay on kfreebsd, for nlist + + [ Steinar H. Gunderson ] + * New patches, mostly for various bug fixes (some of them for crash bugs): + * fix_engineid_reprobe.diff: Do not probe engineID for USM + if it is already given. (Closes: #765873) + * callback_print.diff: Fix enum formatting when doing asynchronous queries + from Perl. (Closes: #765289) + * do_not_callback_for_failed_reports.diff: Fix access of freed data due to + callbacks for reports occasionally coming twice. + * fix_perl_bulk_gets.diff: Fix handling of truncated bulk get responses + in the Perl module. (Patch 1278 in upstream patch tracker.) + * let_perl_access_engineid.diff: Add a new functions to let Perl code + access the security engine ID. + + -- Steinar H. Gunderson Tue, 29 Mar 2016 10:30:24 +0200 net-snmp (5.7.3+dfsg-1) unstable; urgency=medium diff --git a/debian/control b/debian/control index 3a117fa..0aa5574 100644 --- a/debian/control +++ b/debian/control @@ -14,8 +14,8 @@ Build-Depends: debhelper (>= 9), libtool, libwrap0-dev, libssl-dev (>> 0.9.8), p libmysqld-dev, libpci-dev Build-Conflicts: libsnmp-dev Standards-Version: 3.9.6 -Vcs-Git: https://anonscm.debian.org/git/pkg-net-snmp/pkg-net-snmp.git -Vcs-Browser: https://anonscm.debian.org/cgit/pkg-net-snmp/pkg-net-snmp.git +Vcs-Git: git://anonscm.debian.org/pkg-net-snmp/pkg-net-snmp.git +Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-net-snmp/pkg-net-snmp.git XS-Python-Version: 2.7 Homepage: http://net-snmp.sourceforge.net/ @@ -73,9 +73,10 @@ Description: SNMP configuration script, MIBs and documentation for the exchange of management information between agents (servers) and clients. . - This package includes documentation and MIBs (Management Information Bases) - for the SNMP libraries, agents and applications. MIBs contain a formal - description of the data that can be managed using SNMP and applications. + This package includes net-snmp-config scripts, documentation and MIBs + (Management Information Bases) for the SNMP libraries, agents and + applications. MIBs contain a formal description of the data that can be + managed using SNMP and applications. . NOTE: If you want the OIDs (Object Identifiers) to resolve to their text description, you need to activate the non-free repository and install the @@ -113,7 +114,6 @@ Description: SNMP (Simple Network Management Protocol) library debug Package: libsnmp-dev Section: libdevel Architecture: any -Multi-Arch: no Replaces: libsnmp9-dev, libsnmp15-dev, snmp (<< 5.4~dfsg), libsnmp-base (<< 5.7.2~dfsg-8.1~) Provides: libsnmp9-dev Conflicts: libsnmp9-dev, libsnmp15-dev, snmp (<< 5.4~dfsg) @@ -127,8 +127,8 @@ Description: SNMP (Simple Network Management Protocol) development files and clients. . The Net-SNMP development files include the library headers, static - libraries, net-snmp-config scripts and documentation needed for development - of custom SNMP applications. + libraries, and documentation needed for development of custom SNMP + applications. Package: libsnmp-perl Section: perl diff --git a/debian/libsnmp-perl.manpages b/debian/libsnmp-perl.manpages deleted file mode 100644 index 832c276..0000000 --- a/debian/libsnmp-perl.manpages +++ /dev/null @@ -1 +0,0 @@ -perl/blib/man3/* diff --git a/debian/patches/26_kfreebsd.patch b/debian/patches/26_kfreebsd.patch index d758e17..60fa7a0 100644 --- a/debian/patches/26_kfreebsd.patch +++ b/debian/patches/26_kfreebsd.patch @@ -1,14 +1,4 @@ -From: Net-SNMP Packaging Team -Date: Thu, 18 Jun 2015 06:12:05 +0900 -Subject: _kfreebsd - Preliminary support for kfreebsd. ---- - agent/mibgroup/hardware/cpu/cpu_sysctl.c | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) - -diff --git a/agent/mibgroup/hardware/cpu/cpu_sysctl.c b/agent/mibgroup/hardware/cpu/cpu_sysctl.c -index 5ecb68e..f0899c2 100644 --- a/agent/mibgroup/hardware/cpu/cpu_sysctl.c +++ b/agent/mibgroup/hardware/cpu/cpu_sysctl.c @@ -12,7 +12,7 @@ @@ -20,7 +10,7 @@ index 5ecb68e..f0899c2 100644 #include #if !defined(CPUSTATES) #include -@@ -89,7 +89,7 @@ void init_cpu_sysctl( void ) { +@@ -89,7 +89,7 @@ #elif defined(KERN_CPTIME) /* OpenBSD */ #define NETSNMP_KERN_CPU KERN_CPTIME @@ -29,7 +19,7 @@ index 5ecb68e..f0899c2 100644 #define NETSNMP_KERN_MCPU 1 /* Enable support for multi-cpu stats. Valid for FreeBSD >=6.4, >=7.1, >=8.0 and beyond */ #define NETSNMP_KERN_MCPU_TYPE NETSNMP_CPU_STATS -@@ -129,7 +129,7 @@ void init_cpu_sysctl( void ) { +@@ -129,7 +129,7 @@ #define NETSNMP_VM_STATS_TYPE struct uvmexp #endif /* VM_UVMEXP2 || VM_UVMEXP */ @@ -38,12 +28,12 @@ index 5ecb68e..f0899c2 100644 #define NETSNMP_VM_STATS VM_METER #define NETSNMP_VM_STATS_TYPE struct vmmeter #define NS_VM_INTR v_intr -@@ -169,10 +169,10 @@ int netsnmp_cpu_arch_load( netsnmp_cache *cache, void *magic ) { +@@ -169,10 +169,10 @@ */ NETSNMP_CPU_STATS cpu_stats[CPUSTATES]; size_t cpu_size = sizeof(cpu_stats); -#if !defined(__FreeBSD__) && !defined(__NetBSD__) -+#if !defined(__FreeBSD__) || defined(__FreeBSD_kernel__) && !defined(__NetBSD__) ++#if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) && !defined(__NetBSD__) int cpu_mib[] = { CTL_KERN, NETSNMP_KERN_CPU }; #endif -#ifdef __FreeBSD__ @@ -51,7 +41,7 @@ index 5ecb68e..f0899c2 100644 static int cp_times = -1; #endif #ifdef KERN_CPTIME2 -@@ -189,7 +189,7 @@ int netsnmp_cpu_arch_load( netsnmp_cache *cache, void *magic ) { +@@ -189,7 +189,7 @@ size_t mem_size = sizeof(NETSNMP_VM_STATS_TYPE); netsnmp_cpu_info *cpu = netsnmp_cpu_get_byIdx( -1, 0 ); @@ -60,7 +50,7 @@ index 5ecb68e..f0899c2 100644 sysctlbyname("kern.cp_time", cpu_stats, &cpu_size, NULL, 0); #else sysctl(cpu_mib, 2, cpu_stats, &cpu_size, NULL, 0); -@@ -226,7 +226,7 @@ int netsnmp_cpu_arch_load( netsnmp_cache *cache, void *magic ) { +@@ -226,7 +226,7 @@ mcpu_size = cpu_num*sizeof(cpu_stats); mcpu_stats = malloc(mcpu_size); sysctlbyname("kern.cp_time", mcpu_stats, &mcpu_size, NULL, 0); diff --git a/debian/patches/27_kfreebsd.patch b/debian/patches/27_kfreebsd.patch new file mode 100644 index 0000000..4620da4 --- /dev/null +++ b/debian/patches/27_kfreebsd.patch @@ -0,0 +1,25 @@ +--- a/agent/mibgroup/mibII/icmp.h ++++ b/agent/mibgroup/mibII/icmp.h +@@ -14,6 +14,7 @@ + config_arch_require(freebsd8, mibII/kernel_sysctl) + config_arch_require(freebsd9, mibII/kernel_sysctl) + config_arch_require(freebsd10, mibII/kernel_sysctl) ++config_arch_require(kfreebsd, mibII/kernel_sysctl) + config_arch_require(netbsd, mibII/kernel_netbsd) + config_arch_require(netbsdelf, mibII/kernel_netbsd) + config_arch_require(openbsd4, mibII/kernel_sysctl) +--- a/agent/mibgroup/mibII/kernel_sysctl.c ++++ b/agent/mibgroup/mibII/kernel_sysctl.c +@@ -14,6 +14,12 @@ + #include + #include + ++#if defined(__FreeBSD_kernel__) && defined(__GLIBC__) ++/* definitions unavailable in GNU libc's icmp6.h */ ++#define ICMP6_MAXTYPE 201 ++#define ICMPV6CTL_STATS 1 ++#endif ++ + #include + #include + #include diff --git a/debian/patches/Fix-kfreebsd-builds-with-kernel-headers-10.patch b/debian/patches/Fix-kfreebsd-builds-with-kernel-headers-10.patch deleted file mode 100644 index c878ee3..0000000 --- a/debian/patches/Fix-kfreebsd-builds-with-kernel-headers-10.patch +++ /dev/null @@ -1,41 +0,0 @@ -From: Niko Tyni -Date: Wed, 16 Jul 2014 21:42:30 +0000 -Subject: Fix kfreebsd builds with kernel headers >= 10 - -This fixes warnings like - -In file included from ../../include/net-snmp/net-snmp-config.h:2085:0, - from host/data_access/swinst_apt.c:5: -../../include/net-snmp/system/kfreebsd.h:5:0: warning: "__FreeBSD_version" redefined [enabled by default] - #define __FreeBSD_version __FreeBSD_kernel_version - ^ -In file included from /usr/include/sys/kern/param.h:1:0, - from /usr/include/osreldate.h:1, - from ../../include/net-snmp/system/kfreebsd.h:4, - from ../../include/net-snmp/net-snmp-config.h:2085, - from host/data_access/swinst_apt.c:5: -/usr/include/sys/kglue/sys/param.h:67:0: note: this is the location of the previous definition - #define __FreeBSD_version 1000510 /* Master, propagated to newvers */ - -and makes agent/mibgroup/host/data_access/swrun_kinfo.c use the modern -kinfo_proc field names. - -Bug-Debian: http://bugs.debian.org/753144 ---- - include/net-snmp/system/kfreebsd.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/include/net-snmp/system/kfreebsd.h b/include/net-snmp/system/kfreebsd.h -index dbf7024..cb32758 100644 ---- a/include/net-snmp/system/kfreebsd.h -+++ b/include/net-snmp/system/kfreebsd.h -@@ -2,7 +2,9 @@ - #define freebsd6 freebsd6 - - #include -+#if defined(__FreeBSD_kernel_version) && !defined(__FreeBSD_version) - #define __FreeBSD_version __FreeBSD_kernel_version -+#endif - - #include - #include diff --git a/debian/patches/callback_print.diff b/debian/patches/callback_print.diff new file mode 100644 index 0000000..f4b6df6 --- /dev/null +++ b/debian/patches/callback_print.diff @@ -0,0 +1,13 @@ +--- net-snmp-5.7.2.1~dfsg.orig/perl/SNMP/SNMP.xs ++++ net-snmp-5.7.2.1~dfsg/perl/SNMP/SNMP.xs +@@ -1300,6 +1300,10 @@ void *cb_data; + netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_PRINT_NUMERIC_OIDS, 1); + netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_OID_OUTPUT_FORMAT, NETSNMP_OID_OUTPUT_NUMERIC); + } ++ if (SvIV(*hv_fetch((HV*)SvRV(sess_ref),"UseEnums", 8, 1))) ++ sprintval_flag = USE_ENUMS; ++ if (SvIV(*hv_fetch((HV*)SvRV(sess_ref),"UseSprintValue", 14, 1))) ++ sprintval_flag = USE_SPRINT_VALUE; + + sv_bless(varlist_ref, gv_stashpv("SNMP::VarList",0)); + for(vars = (pdu?pdu->variables:NULL); vars; vars = vars->next_variable) { diff --git a/debian/patches/do_not_callback_for_failed_reports.diff b/debian/patches/do_not_callback_for_failed_reports.diff new file mode 100644 index 0000000..96db193 --- /dev/null +++ b/debian/patches/do_not_callback_for_failed_reports.diff @@ -0,0 +1,129 @@ +Index: net-snmp-5.7.3/snmplib/snmp_api.c +=================================================================== +--- net-snmp-5.7.3.orig/snmplib/snmp_api.c ++++ net-snmp-5.7.3/snmplib/snmp_api.c +@@ -5346,71 +5346,71 @@ _sess_process_packet(void *sessp, netsnm + * should be per session ! + */ + +- if (callback == NULL +- || callback(NETSNMP_CALLBACK_OP_RECEIVED_MESSAGE, sp, +- pdu->reqid, pdu, magic) == 1) { +- if (pdu->command == SNMP_MSG_REPORT) { +- if (sp->s_snmp_errno == SNMPERR_NOT_IN_TIME_WINDOW || +- snmpv3_get_report_type(pdu) == +- SNMPERR_NOT_IN_TIME_WINDOW) { +- /* +- * trigger immediate retry on recoverable Reports +- * * (notInTimeWindow), incr_retries == TRUE to prevent +- * * inifinite resend +- */ +- if (rp->retries <= sp->retries) { +- snmp_resend_request(slp, rp, TRUE); +- break; +- } else { +- /* We're done with retries, so no longer waiting for a response */ +- if (magic) { +- ((struct synch_state*)magic)->waiting = 0; +- } +- } ++ if (pdu->command == SNMP_MSG_REPORT) { ++ if (sp->s_snmp_errno == SNMPERR_NOT_IN_TIME_WINDOW || ++ snmpv3_get_report_type(pdu) == ++ SNMPERR_NOT_IN_TIME_WINDOW) { ++ /* ++ * trigger immediate retry on recoverable Reports ++ * * (notInTimeWindow), incr_retries == TRUE to prevent ++ * * inifinite resend ++ */ ++ if (rp->retries <= sp->retries) { ++ snmp_resend_request(slp, rp, TRUE); ++ break; + } else { +- if (SNMPV3_IGNORE_UNAUTH_REPORTS) { +- break; +- } else { /* Set the state to no longer be waiting, since we're done with retries */ +- if (magic) { +- ((struct synch_state*)magic)->waiting = 0; +- } ++ /* We're done with retries, so no longer waiting for a response */ ++ if (magic) { ++ ((struct synch_state*)magic)->waiting = 0; ++ } ++ } ++ } else { ++ if (SNMPV3_IGNORE_UNAUTH_REPORTS) { ++ break; ++ } else { /* Set the state to no longer be waiting, since we're done with retries */ ++ if (magic) { ++ ((struct synch_state*)magic)->waiting = 0; + } + } ++ } + +- /* +- * Handle engineID discovery. +- */ +- if (!sp->securityEngineIDLen && pdu->securityEngineIDLen) { +- sp->securityEngineID = +- (u_char *) malloc(pdu->securityEngineIDLen); +- if (sp->securityEngineID == NULL) { ++ /* ++ * Handle engineID discovery. ++ */ ++ if (!sp->securityEngineIDLen && pdu->securityEngineIDLen) { ++ sp->securityEngineID = ++ (u_char *) malloc(pdu->securityEngineIDLen); ++ if (sp->securityEngineID == NULL) { ++ /* ++ * TODO FIX: recover after message callback *? ++ */ ++ return -1; ++ } ++ memcpy(sp->securityEngineID, pdu->securityEngineID, ++ pdu->securityEngineIDLen); ++ sp->securityEngineIDLen = pdu->securityEngineIDLen; ++ if (!sp->contextEngineIDLen) { ++ sp->contextEngineID = ++ (u_char *) malloc(pdu-> ++ securityEngineIDLen); ++ if (sp->contextEngineID == NULL) { + /* + * TODO FIX: recover after message callback *? +- */ ++ */ + return -1; + } +- memcpy(sp->securityEngineID, pdu->securityEngineID, ++ memcpy(sp->contextEngineID, ++ pdu->securityEngineID, + pdu->securityEngineIDLen); +- sp->securityEngineIDLen = pdu->securityEngineIDLen; +- if (!sp->contextEngineIDLen) { +- sp->contextEngineID = +- (u_char *) malloc(pdu-> +- securityEngineIDLen); +- if (sp->contextEngineID == NULL) { +- /* +- * TODO FIX: recover after message callback *? +- */ +- return -1; +- } +- memcpy(sp->contextEngineID, +- pdu->securityEngineID, +- pdu->securityEngineIDLen); +- sp->contextEngineIDLen = +- pdu->securityEngineIDLen; +- } ++ sp->contextEngineIDLen = ++ pdu->securityEngineIDLen; + } + } ++ } + ++ if (callback == NULL || ++ callback(NETSNMP_CALLBACK_OP_RECEIVED_MESSAGE, sp, ++ pdu->reqid, pdu, magic) == 1) { + /* + * Successful, so delete request. + */ diff --git a/debian/patches/fix_engineid_reprobe.diff b/debian/patches/fix_engineid_reprobe.diff new file mode 100644 index 0000000..c9d4778 --- /dev/null +++ b/debian/patches/fix_engineid_reprobe.diff @@ -0,0 +1,16 @@ +Index: net-snmp-5.7.3/snmplib/snmpusm.c +=================================================================== +--- net-snmp-5.7.3.orig/snmplib/snmpusm.c ++++ net-snmp-5.7.3/snmplib/snmpusm.c +@@ -3129,6 +3129,11 @@ int usm_discover_engineid(void *slpv, ne + int status, i; + struct session_list *slp = (struct session_list *) slpv; + ++ if (slp->session->securityEngineIDLen != 0) { ++ DEBUGMSGTL(("snmp_api", "engineID already known, skipping probe\n")); ++ return SNMPERR_SUCCESS; ++ } ++ + if (usm_build_probe_pdu(&pdu) != 0) { + DEBUGMSGTL(("snmp_api", "unable to create probe PDU\n")); + return SNMP_ERR_GENERR; diff --git a/debian/patches/fix_perl_bulk_gets.diff b/debian/patches/fix_perl_bulk_gets.diff new file mode 100644 index 0000000..88d1fe4 --- /dev/null +++ b/debian/patches/fix_perl_bulk_gets.diff @@ -0,0 +1,88 @@ +Index: net-snmp-5.7.2.1+dfsg/perl/SNMP/SNMP.pm +=================================================================== +--- net-snmp-5.7.2.1+dfsg.orig/perl/SNMP/SNMP.pm ++++ net-snmp-5.7.2.1+dfsg/perl/SNMP/SNMP.pm +@@ -866,22 +866,11 @@ sub _gettable_do_it() { + + $vbl = $_[$#_] if ($state->{'options'}{'callback'}); + +- while ($#$vbl > -1 && !$this->{ErrorNum}) { +- if (($#$vbl + 1) % ($#{$state->{'stopconds'}} + 1) != 0) { +- if ($vbl->[$#$vbl][2] ne 'ENDOFMIBVIEW') { +- # unless it's an end of mib view we didn't get the +- # proper number of results back. +- print STDERR "ack: gettable results not appropriate\n"; +- } +- my @k = keys(%{$state->{'result_hash'}}); +- last if ($#k > -1); # bail with what we have +- return; +- } +- +- $state->{'varbinds'} = []; +- my $newstopconds; ++ my $num_vbls = defined($vbl) ? scalar @$vbl : 0; ++ my $num_stopconds = scalar @{$state->{'stopconds'}}; + +- my $lastsetstart = ($state->{'repeatcount'}-1) * ($#{$state->{'stopconds'}}+1); ++ while ($num_vbls > 0 && !$this->{ErrorNum}) { ++ my @found_eof = (0) x $num_stopconds; + + for (my $i = 0; $i <= $#$vbl; $i++) { + my $row_oid = SNMP::translateObj($vbl->[$i][0]); +@@ -890,9 +879,11 @@ sub _gettable_do_it() { + my $row_value = $vbl->[$i][2]; + my $row_type = $vbl->[$i][3]; + +- if ($row_oid =~ +- /^$state->{'stopconds'}[$i % ($#{$state->{'stopconds'}}+1)]/ && +- $row_value ne 'ENDOFMIBVIEW' ){ ++ my $stopcond_num = $i % $num_stopconds; ++ my $stopcond = $state->{'stopconds'}[$stopcond_num]; ++ if ($row_oid !~ /^\Q$stopcond\E/ || $row_value eq 'ENDOFMIBVIEW') { ++ $found_eof[$stopcond_num] = 1; ++ } else { + + if ($row_type eq "OBJECTID") { + +@@ -903,26 +894,30 @@ sub _gettable_do_it() { + + } + ++ # continue past this next time ++ ++ $state->{'varbinds'}[$stopcond_num] = [ $row_text, $row_index ]; ++ + # Place the results in a hash + + $state->{'result_hash'}{$row_index}{$row_text} = $row_value; ++ } ++ } + +- # continue past this next time +- if ($i >= $lastsetstart) { +- push @$newstopconds, +- $state->{'stopconds'}->[$i%($#{$state->{'stopconds'}}+1)]; +- push @{$state->{'varbinds'}},[$vbl->[$i][0],$vbl->[$i][1]]; +- } ++ my @newstopconds = (); ++ my @newvarbinds = (); ++ for (my $i = 0; $i < $num_stopconds; ++$i) { ++ unless ($found_eof[$i]) { ++ push @newstopconds, $state->{'stopconds'}[$i]; ++ push @newvarbinds, $state->{'varbinds'}[$i]; + } + } +- if ($#$newstopconds == -1) { ++ if ($#newstopconds == -1) { + last; + } +- if ($#{$state->{'varbinds'}} == -1) { +- print "gettable ack. shouldn't get here\n"; +- } ++ $state->{'varbinds'} = \@newvarbinds; ++ $state->{'stopconds'} = \@newstopconds; + $vbl = $state->{'varbinds'}; +- $state->{'stopconds'} = $newstopconds; + + # + # if we've been configured with a callback, then call the diff --git a/debian/patches/let_perl_access_engineid.diff b/debian/patches/let_perl_access_engineid.diff new file mode 100644 index 0000000..b65135f --- /dev/null +++ b/debian/patches/let_perl_access_engineid.diff @@ -0,0 +1,94 @@ +Index: net-snmp-5.7.2.1+dfsg/perl/SNMP/SNMP.pm +=================================================================== +--- net-snmp-5.7.2.1+dfsg.orig/perl/SNMP/SNMP.pm ++++ net-snmp-5.7.2.1+dfsg/perl/SNMP/SNMP.pm +@@ -1238,6 +1238,16 @@ sub inform { + return(wantarray() ? @res : $res[0]); + } + ++sub get_sec_engine_id { ++ my $this = shift; ++ return SNMP::_get_sec_engine_id($this); ++} ++ ++sub get_context_engine_id { ++ my $this = shift; ++ return SNMP::_get_context_engine_id($this); ++} ++ + package SNMP::TrapSession; + @SNMP::TrapSession::ISA = ('SNMP::Session'); + +@@ -2034,6 +2044,17 @@ as well. + + =back + ++=item $sess->get_sec_engine_id ++ ++Returns the security engine ID for the current session, whether probed ++or provided by the client, in hex format suitable for the SecEngineId ++parameter when creating a session in the future. Returns undef if we have not ++had not had any contact with the remote agent yet. ++ ++=item $sess->get_context_engine_id ++ ++Like get_sec_engine_id, but for the context engine ID (ContextEngineId). ++ + =back + + =head1 SNMP::TrapSession +Index: net-snmp-5.7.2.1+dfsg/perl/SNMP/SNMP.xs +=================================================================== +--- net-snmp-5.7.2.1+dfsg.orig/perl/SNMP/SNMP.xs ++++ net-snmp-5.7.2.1+dfsg/perl/SNMP/SNMP.xs +@@ -4741,6 +4741,50 @@ done: + + + char * ++snmp_get_sec_engine_id(sess_ref) ++ SV * sess_ref ++ CODE: ++ { ++ RETVAL = NULL; ++ if (SvROK(sess_ref)) { ++ SV **sess_ptr_sv = hv_fetch((HV*)SvRV(sess_ref), "SessPtr", 7, 1); ++ SnmpSession *ss = (SnmpSession *)SvIV((SV*)SvRV(*sess_ptr_sv)); ++ if (ss->securityEngineIDLen > 0) { ++ binary_to_hex(ss->securityEngineID, ++ ss->securityEngineIDLen, ++ &RETVAL); ++ } ++ } ++ } ++ OUTPUT: ++ RETVAL ++ CLEANUP: ++ netsnmp_free(RETVAL); ++ ++ ++char * ++snmp_get_context_engine_id(sess_ref) ++ SV * sess_ref ++ CODE: ++ { ++ RETVAL = NULL; ++ if (SvROK(sess_ref)) { ++ SV **sess_ptr_sv = hv_fetch((HV*)SvRV(sess_ref), "SessPtr", 7, 1); ++ SnmpSession *ss = (SnmpSession *)SvIV((SV*)SvRV(*sess_ptr_sv)); ++ if (ss->contextEngineIDLen > 0) { ++ binary_to_hex(ss->contextEngineID, ++ ss->contextEngineIDLen, ++ &RETVAL); ++ } ++ } ++ } ++ OUTPUT: ++ RETVAL ++ CLEANUP: ++ netsnmp_free(RETVAL); ++ ++ ++char * + snmp_get_type(tag, best_guess) + char * tag + int best_guess diff --git a/debian/patches/series b/debian/patches/series index d51c163..a93def2 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,6 +4,7 @@ 06_extramibs.patch 07_docfiles.patch 26_kfreebsd.patch +27_kfreebsd.patch 60_libsensors_api.patch 61_vacm_missing_dependency_check.patch 62_add_lib_cflags.patch @@ -20,8 +21,12 @@ fix_manpage-has-errors_break_line.patch add_rocommunity6.patch fix_manpage-has-errors-from-man.patch agentx-crash.patch -Fix-kfreebsd-builds-with-kernel-headers-10.patch fix-request-id-0.patch 0025-Bug-788964-net-snmp-snmp_pdu_parse-DoS.patch 0026-fix-Bug-785380-incorrect-date-format.patch 0027-fix-455707-traptoemail-use-FQDN.patch +let_perl_access_engineid.diff +fix_perl_bulk_gets.diff +do_not_callback_for_failed_reports.diff +callback_print.diff +fix_engineid_reprobe.diff diff --git a/debian/rules b/debian/rules index ef7d9ec..d2e7ece 100755 --- a/debian/rules +++ b/debian/rules @@ -23,8 +23,10 @@ IPV6 = --enable-ipv6 DEB_DH_GENCONTROL_ARGS=-- -Vos-specific-dev="libsensors4-dev" else ifeq (kfreebsd,$(DEB_BUILD_ARCH_OS)) -IPV6 = --disable-ipv6 +IPV6 = --enable-ipv6 DEB_DH_GENCONTROL_ARGS=-- -Vos-specific-dev="libkvm-dev" +CFLAGS += $(shell pkg-config --cflags libbsd-overlay) +LDFLAGS += $(shell pkg-config --libs libbsd-overlay) endif endif ifeq (hurd,$(DEB_BUILD_ARCH_OS)) @@ -35,7 +37,7 @@ MIB_MODULES += host endif %: - dh $@ --with autotools-dev,autoreconf,python2 --parallel + dh $@ --with autotools-dev,autoreconf,python2 override_dh_auto_configure: dh_auto_configure -- --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man \ @@ -62,7 +64,11 @@ override_dh_clean: dh_clean rm -rf `find . -name .libs` \ python/build \ - python/netsnmp_python.egg-info + python/netsnmp_python.egg-info \ + dist/generation-scripts/gen-variables \ + perl/SNMP/t/snmptest.cmd \ + perl/TrapReceiver/const-c.inc \ + perl/TrapReceiver/const-xs.inc override_dh_strip: dh_strip -plibsnmp$(LIB_VERSION) --dbg-package=libsnmp$(LIB_VERSION)-dbg diff --git a/debian/snmp.prerm b/debian/snmp.prerm index 6788f5f..a02114d 100644 --- a/debian/snmp.prerm +++ b/debian/snmp.prerm @@ -4,6 +4,7 @@ set -e case "$1" in remove|upgrade|deconfigure) + killall -u snmp 2>/dev/null || true ;; failed-upgrade) diff --git a/debian/snmpd.default b/debian/snmpd.default index e47dec8..f4ee7a7 100644 --- a/debian/snmpd.default +++ b/debian/snmpd.default @@ -8,4 +8,4 @@ export MIBS= SNMPDRUN=yes # snmpd options (use syslog, close stdin/out/err). -SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -g snmp -I -smux,mteTrigger,mteTriggerConf -p /run/snmpd.pid' +SNMPDOPTS='-Lsd -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux,mteTrigger,mteTriggerConf -p /run/snmpd.pid' diff --git a/debian/snmpd.init b/debian/snmpd.init index fac8a32..3e6dc03 100644 --- a/debian/snmpd.init +++ b/debian/snmpd.init @@ -1,4 +1,4 @@ -#!/bin/sh +#! /bin/sh ### BEGIN INIT INFO # Provides: snmpd # Required-Start: $network $remote_fs $syslog @@ -34,11 +34,9 @@ SNMPDOPTS="-Lsd -Lf /dev/null -p $SNMP_PID" # Cd to / before starting any daemons. cd / -status=0 - case "$1" in start) - log_daemon_msg "Starting SNMP services" + log_daemon_msg "Starting SNMP services:" # remove old symlink with previous version if [ -L /var/run/agentx ]; then rm -f /var/run/agentx @@ -47,40 +45,36 @@ case "$1" in mkdir -p /var/run/agentx fi if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then - log_progress_msg "snmpd" start-stop-daemon --quiet --start --oknodo --exec /usr/sbin/snmpd \ - -- $SNMPDOPTS || status=$? + -- $SNMPDOPTS + log_progress_msg " snmpd" fi - log_end_msg $status ;; stop) - log_daemon_msg "Stopping SNMP services" "snmpd" - start-stop-daemon --quiet --stop --oknodo --retry 3 --exec /usr/sbin/snmpd || status=$? - [ $status -eq 0 -a -f $SNMP_PID ] && rm $SNMP_PID - log_end_msg $status + log_daemon_msg "Stopping SNMP services:" + start-stop-daemon --quiet --stop --oknodo --retry 3 --exec /usr/sbin/snmpd && [ ! -f $SNMP_PID ] || rm $SNMP_PID + log_progress_msg " snmpd" ;; restart) - log_daemon_msg "Restarting SNMP services" - start-stop-daemon --quiet --stop --oknodo --retry 3 --exec /usr/sbin/snmpd || status=$? - [ $status -eq 0 -a -f $SNMP_PID ] && rm $SNMP_PID + log_daemon_msg "Restarting SNMP services:" + start-stop-daemon --quiet --stop --oknodo --retry 3 --exec /usr/sbin/snmpd && [ ! -f $SNMP_PID ] || rm $SNMP_PID if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then - log_progress_msg "snmpd" - start-stop-daemon --quiet --start --exec /usr/sbin/snmpd -- $SNMPDOPTS || status=$? + start-stop-daemon --quiet --start --exec /usr/sbin/snmpd -- $SNMPDOPTS + log_progress_msg " snmpd" fi - log_end_msg $status ;; reload|force-reload) - log_daemon_msg "Reloading SNMP services" + log_daemon_msg "Reloading SNMP services:" if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then - log_progress_msg "snmpd" start-stop-daemon --quiet --stop --signal 1 \ - --pidfile "$SNMP_PID" --exec /usr/sbin/snmpd || status=$? + --pidfile "$SNMP_PID" --exec /usr/sbin/snmpd + log_progress_msg " snmpd" fi - log_end_msg $status ;; status) + status=0 if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then - status_of_proc /usr/sbin/snmpd snmpd || status=$? + status_of_proc /usr/sbin/snmpd snmpd || status=$? fi exit $status ;; -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:44 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:44 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 11/16: Import Debian patch 5.7.3+dfsg-1.2 In-Reply-To: <20160828021940.7775.51519@moszumanska.debian.org> References: <20160828021940.7775.51519@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch master in repository pkg-net-snmp. commit d0da2fd494efd83b612f218af909d6ff21485373 Author: Steinar H. Gunderson Date: Wed Mar 30 21:46:44 2016 +0200 Import Debian patch 5.7.3+dfsg-1.2 --- debian/changelog | 13 +++++++++++++ debian/snmpd.postinst | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index e4622d2..e4afae0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,16 @@ +net-snmp (5.7.3+dfsg-1.2) unstable; urgency=medium + + * Non-maintainer upload. + + [ Steven Chamberlain ] + * Add missing Build-Depends: pkg-config on kfreebsd (Closes: #810982) + + [ Steinar H. Gunderson ] + * Add --force-badname when creating the Debian-snmp user, as the name would + otherwise be rejected. (Closes: #819531) + + -- Steinar H. Gunderson Wed, 30 Mar 2016 21:46:44 +0200 + net-snmp (5.7.3+dfsg-1.1) unstable; urgency=medium * Non-maintainer upload, done on top of the latest version in pkg-net-snmp diff --git a/debian/snmpd.postinst b/debian/snmpd.postinst index 67f4712..13d9baa 100644 --- a/debian/snmpd.postinst +++ b/debian/snmpd.postinst @@ -15,7 +15,7 @@ case "$1" in adduser --quiet --system --group --home "$SNMP_DIR" \ --disabled-password --disabled-login \ - --shell "$SNMP_SHELL" "$SNMP_USER" + --shell "$SNMP_SHELL" --force-badname "$SNMP_USER" # care if SNMP_DIR is used by previous "snmp" user chown -R "$SNMP_USER"."$SNMP_GROUP" "$SNMP_DIR" -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:44 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:44 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 12/16: Import Debian patch 5.7.3+dfsg-1.3 In-Reply-To: <20160828021940.7775.51519@moszumanska.debian.org> References: <20160828021940.7775.51519@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch master in repository pkg-net-snmp. commit 321a93676351b961d0e43a8d42a5929503e59b74 Author: Steinar H. Gunderson Date: Thu Mar 31 01:05:01 2016 +0200 Import Debian patch 5.7.3+dfsg-1.3 --- debian/changelog | 7 +++++++ debian/control | 1 + 2 files changed, 8 insertions(+) diff --git a/debian/changelog b/debian/changelog index e4afae0..a0df929 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +net-snmp (5.7.3+dfsg-1.3) unstable; urgency=medium + + * _Really_ add missing Build-Depends: pkg-config on kfreebsd + (Closes: #810982). + + -- Steinar H. Gunderson Thu, 31 Mar 2016 01:05:01 +0200 + net-snmp (5.7.3+dfsg-1.2) unstable; urgency=medium * Non-maintainer upload. diff --git a/debian/control b/debian/control index 0aa5574..a78685b 100644 --- a/debian/control +++ b/debian/control @@ -8,6 +8,7 @@ Build-Depends: debhelper (>= 9), libtool, libwrap0-dev, libssl-dev (>> 0.9.8), p python-all (>= 2.6.6-3~), python-setuptools (>=0.6b3), python2.7-dev, autoconf, automake, autotools-dev, debianutils (>=1.13.1), dh-autoreconf, bash (>=2.05), findutils (>=4.1.20), procps, + pkg-config [kfreebsd-i386 kfreebsd-amd64], libbsd-dev [kfreebsd-i386 kfreebsd-amd64], libkvm-dev [kfreebsd-i386 kfreebsd-amd64], libsensors4-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64], -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:45 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:45 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 13/16: Import Debian patch 5.7.3+dfsg-1.4 In-Reply-To: <20160828021940.7775.51519@moszumanska.debian.org> References: <20160828021940.7775.51519@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch master in repository pkg-net-snmp. commit 740e4dbd701f8006026f2f3e1f13ea145392aebd Author: Rapha?l Hertzog Date: Mon Jun 20 10:24:35 2016 +0200 Import Debian patch 5.7.3+dfsg-1.4 --- debian/changelog | 12 ++++++++++++ debian/control | 3 ++- debian/rules | 31 +++++++++++++++++++------------ debian/snmpd.default | 6 +++++- debian/snmpd.service | 15 +++++++++++++++ debian/snmptrapd.default | 6 +++++- debian/snmptrapd.service | 13 +++++++++++++ 7 files changed, 71 insertions(+), 15 deletions(-) diff --git a/debian/changelog b/debian/changelog index a0df929..5d9389c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,15 @@ +net-snmp (5.7.3+dfsg-1.4) unstable; urgency=medium + + [ Sophie Brun ] + * Non-maintainer upload. + * Add a snmpd.service and a snmptrapd.service (Closes: #782243) + + [ Rapha?l Hertzog ] + * Fix the package so that it can build "Arch: all" without "Arch: any" (and + thus letting us make source only uploads). + + -- Rapha?l Hertzog Mon, 20 Jun 2016 10:24:35 +0200 + net-snmp (5.7.3+dfsg-1.3) unstable; urgency=medium * _Really_ add missing Build-Depends: pkg-config on kfreebsd diff --git a/debian/control b/debian/control index a78685b..d3af344 100644 --- a/debian/control +++ b/debian/control @@ -6,7 +6,8 @@ Uploaders: Jochen Friedrich , Thomas Anders Build-Depends: debhelper (>= 9), libtool, libwrap0-dev, libssl-dev (>> 0.9.8), perl (>=5.8), libperl-dev, python-all (>= 2.6.6-3~), python-setuptools (>=0.6b3), python2.7-dev, - autoconf, automake, autotools-dev, debianutils (>=1.13.1), dh-autoreconf, + autoconf, automake, autotools-dev, debianutils (>=1.13.1), + dh-autoreconf, dh-systemd, bash (>=2.05), findutils (>=4.1.20), procps, pkg-config [kfreebsd-i386 kfreebsd-amd64], libbsd-dev [kfreebsd-i386 kfreebsd-amd64], diff --git a/debian/rules b/debian/rules index d2e7ece..9eb8d2d 100755 --- a/debian/rules +++ b/debian/rules @@ -37,7 +37,7 @@ MIB_MODULES += host endif %: - dh $@ --with autotools-dev,autoreconf,python2 + dh $@ --with autotools-dev,autoreconf,python2,systemd override_dh_auto_configure: dh_auto_configure -- --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man \ @@ -60,6 +60,16 @@ override_dh_auto_configure: # --with-python-modules="" # don't specify it, since dh_python2 cannot handle it. # --with-dnssec-local-validation # not enabled since libval doesn't exist in Debian yet +override_dh_auto_build: + dh_auto_build + cd python; python setup.py build --basedir=$(CURDIR) + +override_dh_auto_install: + dh_auto_install + cd python; python setup.py install --root=$(CURDIR)/debian/tmp \ + --install-layout=deb --basedir=$(CURDIR) ; \ + find $(CURDIR) -name *.pyc -delete + override_dh_clean: dh_clean rm -rf `find . -name .libs` \ @@ -77,14 +87,12 @@ override_dh_strip: override_dh_makeshlibs: dh_makeshlibs -plibsnmp$(LIB_VERSION) -V"libsnmp$(LIB_VERSION) (>= $(COMPAT_VERSION))" -override_dh_install: - cd python; python setup.py build --basedir=$(CURDIR) ; \ - python setup.py install --root=$(CURDIR)/debian/tmp --install-layout=deb --basedir=$(CURDIR) ; \ - find $(CURDIR) -name *.pyc -delete - install $(CURDIR)/EXAMPLE.conf $(CURDIR)/debian/snmpd/etc/snmp/snmpd.conf +override_dh_install-arch: dh_install + install $(CURDIR)/EXAMPLE.conf $(CURDIR)/debian/snmpd/etc/snmp/snmpd.conf override_dh_installdocs: + dh_installdocs -plibsnmp-perl -ptkmib -plibsnmp-base -plibsnmp$(LIB_VERSION) dh_installdocs --link-doc=libsnmp$(LIB_VERSION) \ -plibsnmp-dev \ -plibsnmp$(LIB_VERSION)-dbg \ @@ -92,13 +100,8 @@ override_dh_installdocs: -psnmpd \ -psnmptrapd \ -psnmp - dh_installdocs -plibsnmp-perl -ptkmib -plibsnmp-base - # dh_installdocs has a bug when --link-doc is called it don't install copyright file to referenced package - # so specify to copy it - install -d $(CURDIR)/debian/libsnmp$(LIB_VERSION)/usr/share/doc/libsnmp$(LIB_VERSION)/ - install -m644 debian/copyright $(CURDIR)/debian/libsnmp$(LIB_VERSION)/usr/share/doc/libsnmp$(LIB_VERSION)/ -override_dh_fixperms: +override_dh_fixperms-arch: dh_fixperms chmod -x debian/libsnmp-dev/etc/snmp/*.conf chmod 600 debian/snmpd/etc/snmp/snmp*d.conf @@ -107,6 +110,10 @@ override_dh_auto_test: # prevent test since it fails with network configuration under pbuilder/etc. true +override_dh_systemd_enable: + dh_systemd_enable --package=snmptrapd --no-enable + dh_systemd_enable --remaining-packages + get-orig-source: @uscan --download-version $(UPSTREAM_VERSION) --destdir /tmp --force-download --no-symlink @tar xf /tmp/net-snmp-$(UPSTREAM_VERSION).tar.gz -C /tmp diff --git a/debian/snmpd.default b/debian/snmpd.default index f4ee7a7..f779013 100644 --- a/debian/snmpd.default +++ b/debian/snmpd.default @@ -1,4 +1,8 @@ -# This file controls the activity of snmpd +# This file controls the behaviour of /etc/init.d/snmpd +# but not of the corresponding systemd service file. +# If needed, create an override file in +# /etc/systemd/system/snmpd.service.d/local.conf +# see man 5 systemd.unit and man 5 systemd.service # Don't load any MIBs by default. # You might comment this lines once you have the MIBs downloaded. diff --git a/debian/snmpd.service b/debian/snmpd.service new file mode 100644 index 0000000..64ccb3a --- /dev/null +++ b/debian/snmpd.service @@ -0,0 +1,15 @@ +[Unit] +Description=Simple Network Management Protocol (SNMP) Daemon. +After=network.target +ConditionPathExists=/etc/snmp/snmpd.conf + +[Service] +Environment="MIBSDIR=/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp" +Environment="MIBS=" +Type=simple +ExecStartPre=/bin/mkdir -p /var/run/agentx +ExecStart=/usr/sbin/snmpd -Lsd -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux,mteTrigger,mteTriggerConf -f +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target diff --git a/debian/snmptrapd.default b/debian/snmptrapd.default index 3649c48..0b8d9d1 100644 --- a/debian/snmptrapd.default +++ b/debian/snmptrapd.default @@ -1,4 +1,8 @@ -# This file controls the activity of snmptrapd +# This file controls the behaviour of /etc/init.d/snmptrapd +# but not of the corresponding systemd service file. +# If needed, create an override file in +# /etc/systemd/system/snmptrapd.service.d/local.conf +# see man 5 systemd.unit and man 5 systemd.service # snmptrapd control (yes means start daemon). As of net-snmp version # 5.0, master agentx support must be enabled in snmpd before snmptrapd diff --git a/debian/snmptrapd.service b/debian/snmptrapd.service new file mode 100644 index 0000000..052331b --- /dev/null +++ b/debian/snmptrapd.service @@ -0,0 +1,13 @@ +[Unit] +Description=Simple Network Management Protocol (SNMP) Trap Daemon. +After=network.target +ConditionPathExists=/etc/snmp/snmptrapd.conf + +[Service] +Environment="MIBSDIR=/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp" +Type=simple +ExecStart=/usr/sbin/snmptrapd -Lsd -f +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:45 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:45 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 14/16: use https for Vcs-* In-Reply-To: <20160828021940.7775.51519@moszumanska.debian.org> References: <20160828021940.7775.51519@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch master in repository pkg-net-snmp. commit 4ce67a56061c955573f183c92dedd1204c9409f5 Author: Hideki Yamane Date: Sun Aug 28 11:17:15 2016 +0900 use https for Vcs-* --- debian/changelog | 7 +++++++ debian/control | 5 ++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 5d9389c..26965d5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +net-snmp (5.7.3+dfsg-2) UNRELEASED; urgency=medium + + * debian/control + - use https for Vcs-* + + -- Hideki Yamane Sun, 28 Aug 2016 11:17:04 +0900 + net-snmp (5.7.3+dfsg-1.4) unstable; urgency=medium [ Sophie Brun ] diff --git a/debian/control b/debian/control index d3af344..14a43f2 100644 --- a/debian/control +++ b/debian/control @@ -16,8 +16,8 @@ Build-Depends: debhelper (>= 9), libtool, libwrap0-dev, libssl-dev (>> 0.9.8), p libmysqld-dev, libpci-dev Build-Conflicts: libsnmp-dev Standards-Version: 3.9.6 -Vcs-Git: git://anonscm.debian.org/pkg-net-snmp/pkg-net-snmp.git -Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-net-snmp/pkg-net-snmp.git +Vcs-Git: https://anonscm.debian.org/git/pkg-net-snmp/pkg-net-snmp.git +Vcs-Browser: https://anonscm.debian.org/cgit/pkg-net-snmp/pkg-net-snmp.git XS-Python-Version: 2.7 Homepage: http://net-snmp.sourceforge.net/ @@ -171,4 +171,3 @@ Description: SNMP (Simple Network Management Protocol) MIB browser The Net-SNMP MIB (Management Information Base) Browser provides a graphical frontend for the Net-SNMP tools. It can be used to browse the MIB tree and interactively send requests to SNMP agents. - -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:45 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:45 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 15/16: Standards-Version: 3.9.8 In-Reply-To: <20160828021940.7775.51519@moszumanska.debian.org> References: <20160828021940.7775.51519@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch master in repository pkg-net-snmp. commit 3f1db16879039bea1e3ddb1398b90b5d0cab318e Author: Hideki Yamane Date: Sun Aug 28 11:18:06 2016 +0900 Standards-Version: 3.9.8 --- debian/changelog | 1 + debian/control | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 26965d5..e82e39e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ net-snmp (5.7.3+dfsg-2) UNRELEASED; urgency=medium * debian/control - use https for Vcs-* + - set Standards-Version: 3.9.8 -- Hideki Yamane Sun, 28 Aug 2016 11:17:04 +0900 diff --git a/debian/control b/debian/control index 14a43f2..e37c915 100644 --- a/debian/control +++ b/debian/control @@ -15,7 +15,7 @@ Build-Depends: debhelper (>= 9), libtool, libwrap0-dev, libssl-dev (>> 0.9.8), p libsensors4-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64], libmysqld-dev, libpci-dev Build-Conflicts: libsnmp-dev -Standards-Version: 3.9.6 +Standards-Version: 3.9.8 Vcs-Git: https://anonscm.debian.org/git/pkg-net-snmp/pkg-net-snmp.git Vcs-Browser: https://anonscm.debian.org/cgit/pkg-net-snmp/pkg-net-snmp.git XS-Python-Version: 2.7 -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:45 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:45 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 16/16: drop myself (henrich@debian.org) from uploaders. In-Reply-To: <20160828021940.7775.51519@moszumanska.debian.org> References: <20160828021940.7775.51519@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch master in repository pkg-net-snmp. commit 6398c9df30f535290e6a64f67255ca648b411e4f Author: Hideki Yamane Date: Sun Aug 28 11:18:49 2016 +0900 drop myself (henrich at debian.org) from uploaders. --- debian/changelog | 1 + debian/control | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index e82e39e..6e2edae 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ net-snmp (5.7.3+dfsg-2) UNRELEASED; urgency=medium * debian/control - use https for Vcs-* - set Standards-Version: 3.9.8 + - drop Hideki Yamane from Uploaders. -- Hideki Yamane Sun, 28 Aug 2016 11:17:04 +0900 diff --git a/debian/control b/debian/control index e37c915..b44c74d 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,6 @@ Section: net Priority: optional Maintainer: Net-SNMP Packaging Team Uploaders: Jochen Friedrich , Thomas Anders , Noah Meyerhans , - Hideki Yamane Build-Depends: debhelper (>= 9), libtool, libwrap0-dev, libssl-dev (>> 0.9.8), perl (>=5.8), libperl-dev, python-all (>= 2.6.6-3~), python-setuptools (>=0.6b3), python2.7-dev, autoconf, automake, autotools-dev, debianutils (>=1.13.1), -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:45 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:45 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] branch jessie created (now 2e5e46f) Message-ID: <20160828021940.7775.60435@moszumanska.debian.org> This is an automated email from the git hooks/post-receive script. henrich pushed a change to branch jessie in repository pkg-net-snmp. at 2e5e46f add debian/patches/Bug-788964-net-snmp-snmp_pdu_parse-DoS.patch This branch includes the following new commits: new 2e5e46f add debian/patches/Bug-788964-net-snmp-snmp_pdu_parse-DoS.patch The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:45 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:45 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 01/01: add debian/patches/Bug-788964-net-snmp-snmp_pdu_parse-DoS.patch In-Reply-To: <20160828021940.7775.60435@moszumanska.debian.org> References: <20160828021940.7775.60435@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch jessie in repository pkg-net-snmp. commit 2e5e46f8ad4e59fd6bd5bbddc20a686595e44099 Author: Hideki Yamane Date: Thu Jan 28 21:36:33 2016 +0900 add debian/patches/Bug-788964-net-snmp-snmp_pdu_parse-DoS.patch --- debian/changelog | 8 ++ .../Bug-788964-net-snmp-snmp_pdu_parse-DoS.patch | 125 +++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 134 insertions(+) diff --git a/debian/changelog b/debian/changelog index 3662047..879eb46 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +net-snmp (5.7.2.1+dfsg-1+deb8u1) stable-proposed-updates; urgency=medium + + * debian/patches + - add Bug-788964-net-snmp-snmp_pdu_parse-DoS.patch to fix DoS (and maybe + code execution) issue (Closes: #788964) + + -- Hideki Yamane Fri, 19 Jun 2015 22:37:43 +0900 + net-snmp (5.7.2.1+dfsg-1) unstable; urgency=medium * re-generate upstream source due to accidentally include non-free MIB files. diff --git a/debian/patches/Bug-788964-net-snmp-snmp_pdu_parse-DoS.patch b/debian/patches/Bug-788964-net-snmp-snmp_pdu_parse-DoS.patch new file mode 100644 index 0000000..0a113f3 --- /dev/null +++ b/debian/patches/Bug-788964-net-snmp-snmp_pdu_parse-DoS.patch @@ -0,0 +1,125 @@ +Description: fix net-snmp snmp_pdu_parse() DoS +Origin: upstream +Bug-Debian: http://bugs.debian.org/788964 + +taken patch from https://sourceforge.net/p/net-snmp/code/ci/f23bcd3ac6ddee5d0a48f9703007ccc738914791/ +--- + snmplib/snmp_api.c | 55 +++++++++++++++++++++++++++--------------------------- + 1 file changed, 28 insertions(+), 27 deletions(-) + +--- a/snmplib/snmp_api.c ++++ b/snmplib/snmp_api.c +@@ -4345,10 +4345,9 @@ + u_char type; + u_char msg_type; + u_char *var_val; +- int badtype = 0; + size_t len; + size_t four; +- netsnmp_variable_list *vp = NULL; ++ netsnmp_variable_list *vp = NULL, *vplast = NULL; + oid objid[MAX_OID_LEN]; + + /* +@@ -4487,38 +4486,24 @@ + (ASN_SEQUENCE | ASN_CONSTRUCTOR), + "varbinds"); + if (data == NULL) +- return -1; ++ goto fail; + + /* + * get each varBind sequence + */ + while ((int) *length > 0) { +- netsnmp_variable_list *vptemp; +- vptemp = (netsnmp_variable_list *) malloc(sizeof(*vptemp)); +- if (NULL == vptemp) { +- return -1; +- } +- if (NULL == vp) { +- pdu->variables = vptemp; +- } else { +- vp->next_variable = vptemp; +- } +- vp = vptemp; ++ vp = SNMP_MALLOC_TYPEDEF(netsnmp_variable_list); ++ if (NULL == vp) ++ goto fail; + +- vp->next_variable = NULL; +- vp->val.string = NULL; + vp->name_length = MAX_OID_LEN; +- vp->name = NULL; +- vp->index = 0; +- vp->data = NULL; +- vp->dataFreeHook = NULL; + DEBUGDUMPSECTION("recv", "VarBind"); + data = snmp_parse_var_op(data, objid, &vp->name_length, &vp->type, + &vp->val_len, &var_val, length); + if (data == NULL) +- return -1; ++ goto fail; + if (snmp_set_var_objid(vp, objid, vp->name_length)) +- return -1; ++ goto fail; + + len = MAX_PACKET_LENGTH; + DEBUGDUMPHEADER("recv", "Value"); +@@ -4583,7 +4568,7 @@ + vp->val.string = (u_char *) malloc(vp->val_len); + } + if (vp->val.string == NULL) { +- return -1; ++ goto fail; + } + asn_parse_string(var_val, &len, &vp->type, vp->val.string, + &vp->val_len); +@@ -4594,7 +4579,7 @@ + vp->val_len *= sizeof(oid); + vp->val.objid = (oid *) malloc(vp->val_len); + if (vp->val.objid == NULL) { +- return -1; ++ goto fail; + } + memmove(vp->val.objid, objid, vp->val_len); + break; +@@ -4606,19 +4591,35 @@ + case ASN_BIT_STR: + vp->val.bitstring = (u_char *) malloc(vp->val_len); + if (vp->val.bitstring == NULL) { +- return -1; ++ goto fail; + } + asn_parse_bitstring(var_val, &len, &vp->type, + vp->val.bitstring, &vp->val_len); + break; + default: + snmp_log(LOG_ERR, "bad type returned (%x)\n", vp->type); +- badtype = -1; ++ goto fail; + break; + } + DEBUGINDENTADD(-4); ++ ++ if (NULL == vplast) { ++ pdu->variables = vp; ++ } else { ++ vplast->next_variable = vp; ++ } ++ vplast = vp; ++ vp = NULL; + } +- return badtype; ++ return 0; ++ ++ fail: ++ DEBUGMSGTL(("recv", "error while parsing VarBindList\n")); ++ /** if we were parsing a var, remove it from the pdu and free it */ ++ if (vp) ++ snmp_free_var(vp); ++ ++ return -1; + } + + /* diff --git a/debian/patches/series b/debian/patches/series index 851d31c..35c58a7 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -27,3 +27,4 @@ ifmib.patch Fix-kfreebsd-builds-with-kernel-headers-10.patch fix-request-id-0.patch CVE-2014-3565.patch +Bug-788964-net-snmp-snmp_pdu_parse-DoS.patch -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:46 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:46 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] branch patch-queue/master created (now 352948c) Message-ID: <20160828021940.7775.8287@moszumanska.debian.org> This is an automated email from the git hooks/post-receive script. henrich pushed a change to branch patch-queue/master in repository pkg-net-snmp. at 352948c fix #455707 traptoemail use FQDN This branch includes the following new commits: new b029513 _statistics new 47c4bd5 _makefiles new 8e6f95e _searchdirs new 638b782 _extramibs new d750ad0 _docfiles new e73b56b _kfreebsd new d07c71b _libsensors_api new b96f02b _vacm_missing_dependency_check new 9c107d1 _add_lib_cflags new 25ed919 _missing_lib new 2b5b86e fix_snmpcheck_perl_path new 825e8eb fix_regular_expression new 8c06e30 snmptranslate.1 new 484ae50 fix_spelling_error new 7d724d7 fix_logging_option new 55cb99e fix_typo_in_snmpd.conf new a7dfbde fix_man_error new 69fb36d after_RFC5378 new cedb3de fix_manpage-has-errors_break_line new bc1f6b2 add_rocommunity6 new bb08148 fix_manpage-has-errors-from-man new 5835527 agentx-crash new c2d0f71 Fix kfreebsd builds with kernel headers >= 10 new fa359cc fix-request-id-0 new cf280b4 Bug#788964: net-snmp snmp_pdu_parse() DoS new b9b8b38 fix Bug#785380 incorrect date format new 352948c fix #455707 traptoemail use FQDN The 27 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:46 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:46 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 01/27: _statistics In-Reply-To: <20160828021940.7775.8287@moszumanska.debian.org> References: <20160828021940.7775.8287@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch patch-queue/master in repository pkg-net-snmp. commit b029513c14d8ba1c72bd7f613cfd27d0eaffdfe9 Author: Net-SNMP Packaging Team Date: Thu Jun 18 06:12:04 2015 +0900 _statistics This patch ignores interfaces without statistics. Gbp-Pq: Name 02_statistics.patch --- agent/mibgroup/mibII/interfaces.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/agent/mibgroup/mibII/interfaces.c b/agent/mibgroup/mibII/interfaces.c index 26ffebb..43f7427 100644 --- a/agent/mibgroup/mibII/interfaces.c +++ b/agent/mibgroup/mibII/interfaces.c @@ -1590,6 +1590,10 @@ Interface_Scan_Init(void) struct ifnet *nnew; char *stats, *ifstart = line; + /* Ignore interfaces with no statistics. */ + if (strstr(line, "No statistics available.")) + continue; + if (line[strlen(line) - 1] == '\n') line[strlen(line) - 1] = '\0'; @@ -1622,7 +1626,7 @@ Interface_Scan_Init(void) &coll) != 5)) { if ((scan_line_to_use == scan_line_2_2) && !strstr(line, "No statistics available")) - snmp_log(LOG_ERR, + snmp_log(LOG_DEBUG, "/proc/net/dev data format error, line ==|%s|", line); continue; -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:47 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:47 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 02/27: _makefiles In-Reply-To: <20160828021940.7775.8287@moszumanska.debian.org> References: <20160828021940.7775.8287@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch patch-queue/master in repository pkg-net-snmp. commit 47c4bd52280cbe7f2bb38582cea8c6c7ce8467e4 Author: Net-SNMP Packaging Team Date: Thu Jun 18 06:12:04 2015 +0900 _makefiles Makefile patch to include libwrap and libsensors libraries and install extra MIB files. Gbp-Pq: Name 03_makefiles.patch --- Makefile.in | 4 ++-- Makefile.top | 1 + local/Makefile.in | 2 +- mibs/Makefile.in | 6 +++--- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Makefile.in b/Makefile.in index cfcdf73..10f36f3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -17,7 +17,7 @@ CPP = @CPP@ \ INSTALLHEADERS=version.h net-snmp-features.h INCLUDESUBDIR=system -INCLUDESUBDIRHEADERS= aix.h bsd.h bsdi3.h bsdi4.h bsdi.h cygwin.h \ +INCLUDESUBDIRHEADERS= aix.h bsd.h bsdi3.h bsdi4.h bsdi.h cygwin.h kfreebsd.h \ darwin.h darwin7.h darwin8.h darwin9.h darwin10.h dragonfly.h dynix.h \ freebsd2.h freebsd3.h freebsd4.h freebsd5.h freebsd6.h \ freebsd7.h freebsd8.h freebsd9.h freebsd10.h freebsd11.h \ @@ -171,7 +171,7 @@ OTHERCLEANTODOS=perlclean @PYTHONCLEANTARGS@ cleanfeatures perlcleanfeatures pyt # # override LD_RUN_PATH to avoid dependencies on the build directory perlmodules: perlmakefiles subdirs - @(cd perl ; $(MAKE) LD_RUN_PATH="$(libdir):`$(PERL) -e 'use Config; print qq($$Config{archlibexp}/CORE);'`") ; \ + @(cd perl ; $(MAKE) LD_RUN_PATH="") ; \ if test $$? != 0 ; then \ exit 1 ; \ fi diff --git a/Makefile.top b/Makefile.top index 503f61e..bf32f3c 100644 --- a/Makefile.top +++ b/Makefile.top @@ -27,6 +27,7 @@ man8dir = $(mandir)/man8 snmplibdir = $(datadir)/snmp mibdir = $(snmplibdir)/mibs persistentdir = @PERSISTENT_DIRECTORY@ +sysconfdir = @sysconfdir@ DESTDIR = @INSTALL_PREFIX@ INSTALL_PREFIX = $(DESTDIR) diff --git a/local/Makefile.in b/local/Makefile.in index cb84afc..12d7132 100644 --- a/local/Makefile.in +++ b/local/Makefile.in @@ -103,7 +103,7 @@ tkmib.made: $(srcdir)/tkmib mib2c.made: $(srcdir)/mib2c if test "x$(PERL)" != "x" ; then \ - $(PERL) -p -e 's%^#!.*/perl.*%#!$(PERL)%;s#/usr/local/share/snmp#$(snmplibdir)#;' ${srcdir}/mib2c > mib2c.made; \ + $(PERL) -p -e 's%^#!.*/perl.*%#!$(PERL)%;s#/usr/local/share/snmp#$(snmplibdir)#;s#/usr/local/etc/snmp#$(SNMPCONFPATH)#;' ${srcdir}/mib2c > mib2c.made; \ else \ touch mib2c.made; \ fi diff --git a/mibs/Makefile.in b/mibs/Makefile.in index f185002..1ad4558 100644 --- a/mibs/Makefile.in +++ b/mibs/Makefile.in @@ -49,11 +49,11 @@ NETSNMPMIBS = NET-SNMP-TC.txt NET-SNMP-MIB.txt NET-SNMP-AGENT-MIB.txt \ UCDMIBS = UCD-SNMP-MIB.txt UCD-DEMO-MIB.txt UCD-IPFWACC-MIB.txt \ UCD-DLMOD-MIB.txt UCD-DISKIO-MIB.txt +EXTRAMIBS = GNOME-SMI LM-SENSORS-MIB + DEFAULTMIBS = @default_mibs_install@ -MIBS = $(V1MIBS) $(V2MIBS) $(V3MIBS) $(RFCMIBS) \ - $(AGENTMIBS) $(IANAMIBS) \ - $(NETSNMPMIBS) $(UCDMIBS) $(DEFAULTMIBS) +MIBS = $(NETSNMPMIBS) $(UCDMIBS) $(DEFAULTMIBS) $(EXTRAMIBS) all: standardall -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:47 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:47 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 03/27: _searchdirs In-Reply-To: <20160828021940.7775.8287@moszumanska.debian.org> References: <20160828021940.7775.8287@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch patch-queue/master in repository pkg-net-snmp. commit 8e6f95eb97f112abf398fb1e7091432248450b6f Author: Net-SNMP Packaging Team Date: Thu Jun 18 06:12:04 2015 +0900 _searchdirs Makefile patch to include libwrap and libsensors libraries and install extra MIB files. Gbp-Pq: Name 05_searchdirs.patch --- local/mib2c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/local/mib2c b/local/mib2c index 2016f06..6926321 100755 --- a/local/mib2c +++ b/local/mib2c @@ -61,8 +61,9 @@ $currentlevel = -1; if($ENV{MIB2C_DIR}) { push @def_search_dirs, split(/:/, $ENV{MIB2C_DIR}); } -push @def_search_dirs, "/usr/local/share/snmp/"; -push @def_search_dirs, "/usr/local/share/snmp/mib2c-data"; +push @def_search_dirs, "/etc/snmp/"; +push @def_search_dirs, "/usr/share/snmp/"; +push @def_search_dirs, "/usr/share/snmp/mib2c-data"; push @def_search_dirs, "./mib2c-conf.d"; sub usage { -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:47 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:47 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 04/27: _extramibs In-Reply-To: <20160828021940.7775.8287@moszumanska.debian.org> References: <20160828021940.7775.8287@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch patch-queue/master in repository pkg-net-snmp. commit 638b7829ba30e1869b42c5abcae0e034df32dd7e Author: Net-SNMP Packaging Team Date: Thu Jun 18 06:12:04 2015 +0900 _extramibs Extra MIB files shipped with Debian. Gbp-Pq: Name 06_extramibs.patch --- mibs/GNOME-SMI.txt | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) diff --git a/mibs/GNOME-SMI.txt b/mibs/GNOME-SMI.txt new file mode 100644 index 0000000..a496ee4 --- /dev/null +++ b/mibs/GNOME-SMI.txt @@ -0,0 +1,88 @@ +GNOME-SMI DEFINITIONS ::= BEGIN + +IMPORTS + MODULE-IDENTITY, + OBJECT-IDENTITY, + enterprises + FROM SNMPv2-SMI; + +gnome MODULE-IDENTITY + LAST-UPDATED "200709070000Z" + ORGANIZATION "GNOME project" + CONTACT-INFO + "GNU Network Object Model Environment project + + see http://www.gnome.org for contact persons of a particular + area or subproject of GNOME. + + Administrative contact for MIB module: + + Jochen Friedrich + Ramsaystr. 9 + 63450 Hanau + Germany + + email: jochen at scram.de" + DESCRIPTION + "The Structure of GNOME." + + -- revision history + + REVISION "200709070000Z" -- Sep 07, 2007 + DESCRIPTION + "Fixed wrong enterprise number (how comes this + typo was unnoticed for so long?)." + + REVISION "200505070000Z" -- May 07, 2005 + DESCRIPTION + "Added gnomeLDAP subtree for LDAP definitions." + + REVISION "200312070000Z" -- December 07, 2003 + DESCRIPTION + "Added gnomeSysadmin subtree for GNOME project system administration. + Updated contact info." + + REVISION "9809010000Z" -- September 01, 1998 + DESCRIPTION + "Initial version." + + ::= { enterprises 3319 } -- assigned by IANA + +gnomeProducts OBJECT-IDENTITY + STATUS current + DESCRIPTION + "gnomeProducts is the root OBJECT IDENTIFIER from + which sysObjectID values are assigned." + ::= { gnome 1 } + +gnomeMgmt OBJECT-IDENTITY + STATUS current + DESCRIPTION + "gnomeMgmt defines the subtree for production GNOME related + MIB registrations." + ::= { gnome 2 } + +gnomeTest OBJECT-IDENTITY + STATUS current + DESCRIPTION + "gnomeTest defines the subtree for testing GNOME related + MIB registrations." + ::= { gnome 3 } + +gnomeSysadmin OBJECT-IDENTITY + STATUS current + DESCRIPTION + "gnomeSysadmin defines the subtree for GNOME related Sysadmin + MIB registrations." + ::= { gnome 4 } + +gnomeLDAP OBJECT-IDENTITY + STATUS current + DESCRIPTION + "gnomeLDAP defines the subtree for GNOME related LDAP + registrations." + ::= { gnome 5 } + +-- more to come if necessary. + +END -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:47 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:47 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 05/27: _docfiles In-Reply-To: <20160828021940.7775.8287@moszumanska.debian.org> References: <20160828021940.7775.8287@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch patch-queue/master in repository pkg-net-snmp. commit d750ad0152927643c6109c9fc69f9d8a1e8de1f6 Author: Net-SNMP Packaging Team Date: Thu Jun 18 06:12:05 2015 +0900 _docfiles Patch documentation files to change paths to Debian specific locations. Gbp-Pq: Name 07_docfiles.patch --- EXAMPLE.conf.def | 2 +- FAQ | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/EXAMPLE.conf.def b/EXAMPLE.conf.def index 8f4a197..180713c 100644 --- a/EXAMPLE.conf.def +++ b/EXAMPLE.conf.def @@ -23,7 +23,7 @@ agentAddress udp:127.0.0.1:161 # SNMPv3 AUTHENTICATION # # Note that these particular settings don't actually belong here. -# They should be copied to the file /var/net-snmp/snmpd.conf +# They should be copied to the file /var/lib/snmp/snmpd.conf # and the passwords changed, before being uncommented in that file *only*. # Then restart the agent diff --git a/FAQ b/FAQ index 2844d33..47b07e6 100644 --- a/FAQ +++ b/FAQ @@ -108,7 +108,7 @@ TABLE OF CONTENTS How do I configure access control? How do I configure SNMPv3 users? The 'createUser' line disappears when I start the agent. Why? - What's the difference between /var/net-snmp and /usr/local/share/snmp? + What's the difference between /var/lib/snmp and /usr/share/snmp? My new agent is ignoring the old snmpd.conf file. Why? Where should the snmpd.conf file go? Why am I getting "Connection refused"? @@ -703,7 +703,7 @@ How do I add a MIB to the tools? There are two steps required to add a new MIB file to the tools. Firstly, copy the MIB file into the appropriate location: - cp MY-MIB.txt /usr/local/share/snmp/mibs + cp MY-MIB.txt /usr/share/snmp/mibs (which makes it available to everyone on the system) or mkdir $HOME/.snmp @@ -1399,7 +1399,7 @@ My traphandler script doesn't work when run like this - why not? If this is the case, then you can specify this interpreter explicitly as part of the trap handle directive: - traphandle default /usr/bin/perl /usr/local/bin/log_it + traphandle default /usr/bin/perl /usr/bin/log_it In this case, it's almost certain that you'll also need to give the full path to the traphandle script (as shown) @@ -1493,7 +1493,7 @@ OK, what should I put in snmp.conf? string to use. Some of these (such as MIB information), might be best put in a - shared snmp.conf file (typically /usr/local/share/snmp/snmp.conf or + shared snmp.conf file (typically /usr/share/snmp/snmp.conf or /etc/snmp/snmp.conf) to apply to all users of the system. Others (particularly the SNMPv3 security settings), are more likely to refer to a particular user, and should probably go in a personal snmp.conf @@ -2667,7 +2667,7 @@ How do I configure SNMPv3 users? createUser {myUser} MD5 {myPassword} DES - to the file /var/net-snmp/snmpd.conf (where {myUser} and + to the file /var/lib/snmp/snmpd.conf (where {myUser} and {myPassword} are the appropriate values for username and password, _without_ the braces!). Then re-start the snmpd agent. @@ -2676,7 +2676,7 @@ How do I configure SNMPv3 users? net-snmp-config --create-snmpv3-user and follow the prompts given. This will create an entry - in the /var/net-snmp/snmpd.conf file similar to the above. + in the /var/lib/snmp/snmpd.conf file similar to the above. Then re-start the snmpd agent. 3) Make sure the agent is running, and will respond to an SNMPv3 @@ -2710,16 +2710,16 @@ The 'createUser' line disappears when I start the agent. Why? -What's the difference between /var/net-snmp and /usr/local/share/snmp? ---------------------------------------------------------------------- +What's the difference between /var/lib/snmp and /usr/share/snmp? +---------------------------------------------------------------- - The /var/net-snmp location is primarily used for information set + The /var/lib/snmp location is primarily used for information set during the running of the agent, which needs to be persistent between one run of the agent and the next. Apart from "createUser" (see the previous entry), you shouldn't need to touch this file. All other user-provided configuration should go in the traditional - location (typically /usr/local/share/snmp/snmpd.conf or /etc/snmp). + location (typically /usr/share/snmp or /etc/snmp). @@ -2740,7 +2740,7 @@ Where should the snmpd.conf file go? ----------------------------------- The default location for this file with the basic distribution is - /usr/local/share/snmp/snmpd.conf (or PREFIX/share/snmp/snmpd.conf). + /usr/share/snmp/snmpd.conf (or PREFIX/share/snmp/snmpd.conf). Ready-installed versions often look for the file as /etc/snmpd.conf, or /etc/snmp/snmpd.conf. -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:47 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:47 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 06/27: _kfreebsd In-Reply-To: <20160828021940.7775.8287@moszumanska.debian.org> References: <20160828021940.7775.8287@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch patch-queue/master in repository pkg-net-snmp. commit e73b56b556ad0fdabf9c6206dcdcf8a8d0ebf606 Author: Net-SNMP Packaging Team Date: Thu Jun 18 06:12:05 2015 +0900 _kfreebsd Preliminary support for kfreebsd. Gbp-Pq: Name 26_kfreebsd.patch --- agent/mibgroup/hardware/cpu/cpu_sysctl.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/agent/mibgroup/hardware/cpu/cpu_sysctl.c b/agent/mibgroup/hardware/cpu/cpu_sysctl.c index 5ecb68e..f0899c2 100644 --- a/agent/mibgroup/hardware/cpu/cpu_sysctl.c +++ b/agent/mibgroup/hardware/cpu/cpu_sysctl.c @@ -12,7 +12,7 @@ #include #include -#if defined(__FreeBSD__) +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) #include #if !defined(CPUSTATES) #include @@ -89,7 +89,7 @@ void init_cpu_sysctl( void ) { #elif defined(KERN_CPTIME) /* OpenBSD */ #define NETSNMP_KERN_CPU KERN_CPTIME -#elif defined(__FreeBSD__) +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) #define NETSNMP_KERN_MCPU 1 /* Enable support for multi-cpu stats. Valid for FreeBSD >=6.4, >=7.1, >=8.0 and beyond */ #define NETSNMP_KERN_MCPU_TYPE NETSNMP_CPU_STATS @@ -129,7 +129,7 @@ void init_cpu_sysctl( void ) { #define NETSNMP_VM_STATS_TYPE struct uvmexp #endif /* VM_UVMEXP2 || VM_UVMEXP */ -#elif defined(__FreeBSD__) /* FreeBSD */ +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) /* FreeBSD */ #define NETSNMP_VM_STATS VM_METER #define NETSNMP_VM_STATS_TYPE struct vmmeter #define NS_VM_INTR v_intr @@ -169,10 +169,10 @@ int netsnmp_cpu_arch_load( netsnmp_cache *cache, void *magic ) { */ NETSNMP_CPU_STATS cpu_stats[CPUSTATES]; size_t cpu_size = sizeof(cpu_stats); -#if !defined(__FreeBSD__) && !defined(__NetBSD__) +#if !defined(__FreeBSD__) || defined(__FreeBSD_kernel__) && !defined(__NetBSD__) int cpu_mib[] = { CTL_KERN, NETSNMP_KERN_CPU }; #endif -#ifdef __FreeBSD__ +#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)) static int cp_times = -1; #endif #ifdef KERN_CPTIME2 @@ -189,7 +189,7 @@ int netsnmp_cpu_arch_load( netsnmp_cache *cache, void *magic ) { size_t mem_size = sizeof(NETSNMP_VM_STATS_TYPE); netsnmp_cpu_info *cpu = netsnmp_cpu_get_byIdx( -1, 0 ); -#if defined(__FreeBSD__) || defined(__NetBSD__) +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) sysctlbyname("kern.cp_time", cpu_stats, &cpu_size, NULL, 0); #else sysctl(cpu_mib, 2, cpu_stats, &cpu_size, NULL, 0); @@ -226,7 +226,7 @@ int netsnmp_cpu_arch_load( netsnmp_cache *cache, void *magic ) { mcpu_size = cpu_num*sizeof(cpu_stats); mcpu_stats = malloc(mcpu_size); sysctlbyname("kern.cp_time", mcpu_stats, &mcpu_size, NULL, 0); -#elif defined(__FreeBSD__) +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) if (cp_times == -1) { int ret = sysctlbyname("kern.cp_times", NULL, &mcpu_size, NULL, 0); cp_times = ret == -1 ? 0 : 1; -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:47 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:47 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 07/27: _libsensors_api In-Reply-To: <20160828021940.7775.8287@moszumanska.debian.org> References: <20160828021940.7775.8287@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch patch-queue/master in repository pkg-net-snmp. commit d07c71b17d0a3e79dd14847f5e4fcc51e072d2d8 Author: Net-SNMP Packaging Team Date: Thu Jun 18 06:12:05 2015 +0900 _libsensors_api Patch from Jonathan Nieder to update lmsensors API to libsensors4. Gbp-Pq: Name 60_libsensors_api.patch --- agent/mibgroup/ucd-snmp/lmSensors.c | 162 +++++++++++++++++------------------- 1 file changed, 78 insertions(+), 84 deletions(-) diff --git a/agent/mibgroup/ucd-snmp/lmSensors.c b/agent/mibgroup/ucd-snmp/lmSensors.c index 05c60b7..888731f 100644 --- a/agent/mibgroup/ucd-snmp/lmSensors.c +++ b/agent/mibgroup/ucd-snmp/lmSensors.c @@ -94,7 +94,6 @@ netsnmp_feature_require(table_container) #endif #else #include - #define CONFIG_FILE_NAME "/etc/sensors.conf" #endif #include "lmSensors.h" @@ -357,9 +356,7 @@ sensor_init(void) { int res; #ifndef solaris2 - char filename[] = CONFIG_FILE_NAME; time_t t = time(NULL); - FILE *fp = fopen(filename, "r"); int i = 0; DEBUGMSG(("ucd-snmp/lmSensors", "=> sensor_init\n")); @@ -371,13 +368,7 @@ sensor_init(void) sensor_array[i].sensor = NULL; } - if (!fp) - { - res = 1; - goto leaving; - } - - if (sensors_init(fp)) + if (sensors_init(NULL)) { res = 2; goto leaving; @@ -395,7 +386,7 @@ static int sensor_load(void) { int rc = 0; - time_t t = time(NULL); + time_t t = time(NULL); if (t > timestamp + 7) /* this may require some tuning - currently 7 seconds*/ { @@ -947,7 +938,8 @@ else{ #else /* end solaris2 only ie. ifdef everything else */ const sensors_chip_name *chip; - const sensors_feature_data *data; + const sensors_feature *feature; + const sensors_subfeature *subfeature; int chip_nr = 0; unsigned int i = 0; @@ -969,78 +961,80 @@ else{ sensor_array[i].current_len = DEFAULT_SENSORS; } /* end for */ - while ((chip = sensors_get_detected_chips(&chip_nr))) { - int a = 0; - int b = 0; - - while ((data = sensors_get_all_features(*chip, &a, &b))) { - char *label = NULL; - double val; - - if ((data->mode & SENSORS_MODE_R) && - (data->mapping == SENSORS_NO_MAPPING) && - !sensors_get_label(*chip, data->number, &label) && - !sensors_get_feature(*chip, data->number, &val)) { - int type = -1; - float mul = 0; - _sensor_array *array; - - /* The label, as determined for a given chip in sensors.conf, - * is used to place each sensor in the appropriate bucket. - * Volt, Fan, Temp, and Misc. If the text being looked for below - * is not in the label of a given sensor (e.g., the temp1 sensor - * has been labeled 'CPU' and not 'CPU temp') it will end up being - * lumped in the MISC bucket. */ - - if (strstr(label, "V")) { - type = VOLT_TYPE; - mul = 1000.0; - } - if (strstr(label, "fan") || strstr(label, "Fan")) { - type = FAN_TYPE; - mul = 1.0; - } - if (strstr(label, "temp") || strstr(label, "Temp")) { - type = TEMP_TYPE; - mul = 1000.0; - } - if (type == -1) { - type = MISC_TYPE; - mul = 1000.0; - } - - array = &sensor_array[type]; - if ( array->current_len <= array->n) { - _sensor* old_buffer = array->sensor; - size_t new_size = (sizeof(_sensor) * array->current_len) + (sizeof(_sensor) * DEFAULT_SENSORS); - array->sensor = (_sensor*)realloc(array->sensor, new_size); - if (array->sensor == NULL) - { - /* Continuing would be unsafe */ - snmp_log(LOG_ERR, "too many sensors to fit, and failed to alloc more, failing on %s\n", label); - free(old_buffer); - old_buffer = NULL; - if (label) { - free(label); - label = NULL; - } /* end if label */ - return 1; - } /* end if array->sensor */ - array->current_len = new_size / sizeof(_sensor); - DEBUGMSG(("ucd-snmp/lmSensors", "type #%d increased to %d elements\n", type, (int)array->current_len)); - } /* end if array->current */ - strlcpy(array->sensor[array->n].name, label, MAX_NAME); - array->sensor[array->n].value = (int) (val * mul); - DEBUGMSGTL(("sensors","sensor %s, value %d\n", - array->sensor[array->n].name, - array->sensor[array->n].value)); - array->n++; - } /* end if data-mode */ - if (label) { - free(label); - label = NULL; - } /* end if label */ - } /* end while data */ + while ((chip = sensors_get_detected_chips(NULL, &chip_nr))) { + int a = 0; + while ((feature = sensors_get_features(chip, &a))) { + int b = 0; + while ((subfeature = sensors_get_all_subfeatures(chip, + feature, &b))) { + char *label = NULL; + double val; + + if ((subfeature->flags & SENSORS_MODE_R) && + (label = sensors_get_label(chip, feature)) && + !sensors_get_value(chip, subfeature->number, &val)) { + int type = -1; + float mul; + _sensor_array *array; + + /* The label, as determined for a given chip in + * sensors.conf, is used to place each sensor in the + * appropriate bucket. Volt, Fan, Temp, and Misc. + * If the text being looked for below is not in the + * label of a given sensor (e.g., the temp1 sensor + * has been labeled 'CPU' and not 'CPU temp') it + * will end up being lumped in the MISC bucket. */ + + if (strstr(label, "V")) { + type = VOLT_TYPE; + mul = 1000.0; + } + if (strstr(label, "fan") || strstr(label, "Fan")) { + type = FAN_TYPE; + mul = 1.0; + } + if (strstr(label, "temp") || strstr(label, "Temp")) { + type = TEMP_TYPE; + mul = 1000.0; + } + if (type == -1) { + type = MISC_TYPE; + mul = 1000.0; + } + + array = &sensor_array[type]; + if ( array->current_len <= array->n) { + _sensor* old_buffer = array->sensor; + size_t new_size = (sizeof(_sensor) * array->current_len) + (sizeof(_sensor) * DEFAULT_SENSORS); + array->sensor = (_sensor*)realloc(array->sensor, new_size); + if (array->sensor == NULL) + { + /* Continuing would be unsafe */ + snmp_log(LOG_ERR, "too many sensors to fit, and failed to alloc more, failing on %s\n", label); + free(old_buffer); + old_buffer = NULL; + if (label) { + free(label); + label = NULL; + } /* end if label */ + return (rc=1); + } /* end if array->sensor */ + array->current_len = new_size / sizeof(_sensor); + DEBUGMSG(("ucd-snmp/lmSensors", "type #%d increased to %d elements\n", type, array->current_len)); + } /* end if array->current */ + strncpy(array->sensor[array->n].name, label, MAX_NAME); + array->sensor[array->n].value = (int) (val * mul); + DEBUGMSGTL(("sensors","sensor %d, value %d\n", + array->sensor[array->n].name, + array->sensor[array->n].value)); + array->n++; + } /* end if data-mode */ + if (label) { + free(label); + label = NULL; + } /* end if label */ + } /* end while subfeature */ + } /* end while feature */ } /* end while chip */ DEBUGMSG(("ucd-snmp/lmSensors", "<= sensor_load\n")); #endif /* end else ie. ifdef everything else */ -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:47 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:47 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 08/27: _vacm_missing_dependency_check In-Reply-To: <20160828021940.7775.8287@moszumanska.debian.org> References: <20160828021940.7775.8287@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch patch-queue/master in repository pkg-net-snmp. commit b96f02b3a9e3d500fd8886eb8ae67c4bfbd30140 Author: Net-SNMP Packaging Team Date: Thu Jun 18 06:12:05 2015 +0900 _vacm_missing_dependency_check Do not call vacm_standard_views() if the corresponding module was not compiled. (applied upstream in changeset 19116) http://net-snmp.git.sourceforge.net/git/gitweb.cgi?p=net-snmp/net-snmp;a=commitdiff;h=93161743ab8caa5259a945a8d890ae96a99f0b1c;hp=2299559c29fc6493ac2f8836b82683c0904a9b9d However, it isn't applied newest 5.7.2 source tree... why? Gbp-Pq: Name 61_vacm_missing_dependency_check.patch --- agent/agent_read_config.c | 3 +++ apps/snmptrapd_auth.c | 1 + 2 files changed, 4 insertions(+) diff --git a/agent/agent_read_config.c b/agent/agent_read_config.c index f9ef1af..68a3bd8 100644 --- a/agent/agent_read_config.c +++ b/agent/agent_read_config.c @@ -290,6 +290,9 @@ update_config(void) snmp_call_callbacks(SNMP_CALLBACK_APPLICATION, SNMPD_CALLBACK_PRE_UPDATE_CONFIG, NULL); free_config(); +#ifdef USING_MIBII_VACM_CONF_MODULE + vacm_standard_views(0,0,NULL,NULL); +#endif read_configs(); } diff --git a/apps/snmptrapd_auth.c b/apps/snmptrapd_auth.c index be21e5e..10765ce 100644 --- a/apps/snmptrapd_auth.c +++ b/apps/snmptrapd_auth.c @@ -27,6 +27,7 @@ #endif #include +#include /** * initializes the snmptrapd authorization code registering needed -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:48 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:48 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 09/27: _add_lib_cflags In-Reply-To: <20160828021940.7775.8287@moszumanska.debian.org> References: <20160828021940.7775.8287@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch patch-queue/master in repository pkg-net-snmp. commit 9c107d1b0b752c9dde22a103acb424722a455a5f Author: Net-SNMP Packaging Team Date: Thu Jun 18 06:12:05 2015 +0900 _add_lib_cflags Patch to add option "--base-lib-cflags" to net-snmp-config. This flag returns options needed to link against libnetsnmp. In particular, no perl specific options are provided. It was reported in "libsnmp-base: forcing perl headers in net-snmp-config --cflags breaks perl builds" http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=502806 Gbp-Pq: Name 62_add_lib_cflags.patch --- net-snmp-config.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/net-snmp-config.in b/net-snmp-config.in index d55872c..0831fa0 100644 --- a/net-snmp-config.in +++ b/net-snmp-config.in @@ -140,6 +140,9 @@ else --base-cflags) echo @CFLAGS@ @CPPFLAGS@ -I${NSC_INCLUDEDIR} ;; + --base-lib-cflags) + echo @LIBCFLAGS@ @CPPFLAGS@ -I${NSC_INCLUDEDIR} + ;; --cflags|--cf*) echo @CFLAGS@ @DEVFLAGS@ @CPPFLAGS@ -I. -I${NSC_INCLUDEDIR} ;; @@ -643,6 +646,8 @@ if test "x$usage" = "xyes"; then echo " These options produce the various compilation flags needed when" echo " building external SNMP applications:" echo "" + echo " --base-lib-cflags lists additional compilation flags needed for linking" + echo " against libsnmp" echo " --base-cflags lists additional compilation flags needed" echo " --cflags lists additional compilation flags needed" echo " (includes -I. and extra developer warning flags)" -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:48 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:48 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 10/27: _missing_lib In-Reply-To: <20160828021940.7775.8287@moszumanska.debian.org> References: <20160828021940.7775.8287@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch patch-queue/master in repository pkg-net-snmp. commit 25ed919ec281b73ec25bcbbbeb048c31eb0ca00c Author: Net-SNMP Packaging Team Date: Thu Jun 18 06:12:05 2015 +0900 _missing_lib Gbp-Pq: Name 64_missing_lib.patch --- apps/Makefile.in | 6 ++++-- configure.ac | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/Makefile.in b/apps/Makefile.in index 77404dd..c611e01 100644 --- a/apps/Makefile.in +++ b/apps/Makefile.in @@ -83,6 +83,8 @@ MIBLIB = ../agent/libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION) USEAGENTLIBS = $(MIBLIB) $(AGENTLIB) $(USELIBS) MYSQL_LIBS = @MYSQL_LIBS@ MYSQL_INCLUDES = @MYSQL_INCLUDES@ +LIBCRYPTO = @LIBCRYPTO@ +LIBWRAP = @LIBWRAP@ VAL_LIBS = @VAL_LIBS@ LIBS = $(USELIBS) $(VAL_LIBS) @LIBS@ @@ -170,7 +172,7 @@ snmptest$(EXEEXT): snmptest.$(OSUFFIX) $(USELIBS) $(LINK) ${CFLAGS} -o $@ snmptest.$(OSUFFIX) ${LDFLAGS} ${LIBS} snmptrapd$(EXEEXT): $(TRAPD_OBJECTS) $(USETRAPLIBS) $(INSTALLLIBS) - $(LINK) ${CFLAGS} -o $@ $(TRAPD_OBJECTS) $(INSTALLLIBS) ${LDFLAGS} ${TRAPLIBS} + $(LINK) ${CFLAGS} -o $@ $(TRAPD_OBJECTS) $(INSTALLLIBS) ${LDFLAGS} ${TRAPLIBS} $(LIBWRAP) snmptrap$(EXEEXT): snmptrap.$(OSUFFIX) $(USELIBS) $(LINK) ${CFLAGS} -o $@ snmptrap.$(OSUFFIX) ${LDFLAGS} ${LIBS} @@ -183,7 +185,7 @@ snmpset$(EXEEXT): snmpset.$(OSUFFIX) $(USELIBS) $(LINK) ${CFLAGS} -o $@ snmpset.$(OSUFFIX) ${LDFLAGS} ${LIBS} snmpusm$(EXEEXT): snmpusm.$(OSUFFIX) $(USELIBS) - $(LINK) ${CFLAGS} -o $@ snmpusm.$(OSUFFIX) ${LDFLAGS} ${LIBS} + $(LINK) ${CFLAGS} -o $@ snmpusm.$(OSUFFIX) ${LDFLAGS} ${LIBS} $(LIBCRYPTO) snmpvacm$(EXEEXT): snmpvacm.$(OSUFFIX) $(USELIBS) $(LINK) ${CFLAGS} -o $@ snmpvacm.$(OSUFFIX) ${LDFLAGS} ${LIBS} diff --git a/configure.ac b/configure.ac index ecf761f..6d28e67 100644 --- a/configure.ac +++ b/configure.ac @@ -78,6 +78,9 @@ AC_SUBST(DLLIBS) AC_SUBST(PARTIALTARGETFLAGS) AC_SUBST(ac_cv_NETSNMP_SYSTEM_INCLUDE_FILE) +LIBWRAP="$_wraplibs" +AC_SUBST(LIBWRAP) +AC_SUBST(LIBCRYPTO) AC_CONFIG_FILES([Makefile:Makefile.top:Makefile.in:Makefile.rules]) AC_CONFIG_FILES([snmplib/Makefile:Makefile.top:snmplib/Makefile.in:Makefile.rules:snmplib/Makefile.depend]) -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:48 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:48 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 11/27: fix_snmpcheck_perl_path In-Reply-To: <20160828021940.7775.8287@moszumanska.debian.org> References: <20160828021940.7775.8287@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch patch-queue/master in repository pkg-net-snmp. commit 2b5b86ef131949600ae7b02ae78be8c57d68bcd5 Author: Net-SNMP Packaging Team Date: Thu Jun 18 06:12:05 2015 +0900 fix_snmpcheck_perl_path Author: Hideki Yamane Gbp-Pq: Name fix_snmpcheck_perl_path.patch --- local/snmpcheck.def | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/snmpcheck.def b/local/snmpcheck.def index ad392ee..df3450e 100755 --- a/local/snmpcheck.def +++ b/local/snmpcheck.def @@ -1,4 +1,4 @@ -#!/usr/local/bin/perl -w +#!/usr/bin/perl use strict 'refs'; require Net::Ping; -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:48 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:48 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 12/27: fix_regular_expression In-Reply-To: <20160828021940.7775.8287@moszumanska.debian.org> References: <20160828021940.7775.8287@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch patch-queue/master in repository pkg-net-snmp. commit 825e8eb05cc97999ff2c6d64f226f1257e8d1cb9 Author: Net-SNMP Packaging Team Date: Thu Jun 18 06:12:05 2015 +0900 fix_regular_expression >>> import os >>> import re >>> import string >>> import sys >>> netsnmp_libs="-Wl,-z,relro -Wl,-z,now -L/usr/lib/x86_64-linux-gnu -lnetsnmp -lcrypto -lm" >>> print netsnmp_libs -Wl,-z,relro -Wl,-z,now -L/usr/lib/x86_64-linux-gnu -lnetsnmp -lcrypto -lm >>> re.findall(r"-l(\S+)", netsnmp_libs) ['inux-gnu', 'netsnmp', 'crypto', 'm'] Just inserting space will fix this. >>> re.findall(r" -l(\S+)", netsnmp_libs) ['netsnmp', 'crypto', 'm'] Author: Hideki Yamane Gbp-Pq: Name fix_regular_expression.patch --- python/setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/setup.py b/python/setup.py index c520df9..0bd3155 100644 --- a/python/setup.py +++ b/python/setup.py @@ -18,14 +18,14 @@ if intree: netsnmp_libs = os.popen(basedir+'/net-snmp-config --libs').read() libdir = os.popen(basedir+'/net-snmp-config --build-lib-dirs '+basedir).read() incdir = os.popen(basedir+'/net-snmp-config --build-includes '+basedir).read() - libs = re.findall(r"-l(\S+)", netsnmp_libs) + libs = re.findall(r" -l(\S+)", netsnmp_libs) libdirs = re.findall(r"-L(\S+)", libdir) incdirs = re.findall(r"-I(\S+)", incdir) else: netsnmp_libs = os.popen('net-snmp-config --libs').read() libdirs = re.findall(r"-L(\S+)", netsnmp_libs) incdirs = [] - libs = re.findall(r"-l(\S+)", netsnmp_libs) + libs = re.findall(r" -l(\S+)", netsnmp_libs) setup( name="netsnmp-python", version="1.0a1", -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:48 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:48 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 13/27: snmptranslate.1 In-Reply-To: <20160828021940.7775.8287@moszumanska.debian.org> References: <20160828021940.7775.8287@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch patch-queue/master in repository pkg-net-snmp. commit 8c06e30c0834adbd6f07cc3f912a37f6b94f6bff Author: Net-SNMP Packaging Team Date: Thu Jun 18 06:12:05 2015 +0900 snmptranslate.1 Author: Hideki Yamane Gbp-Pq: Name snmptranslate.1.patch --- man/snmptranslate.1.def | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/man/snmptranslate.1.def b/man/snmptranslate.1.def index 721af99..13da01f 100644 --- a/man/snmptranslate.1.def +++ b/man/snmptranslate.1.def @@ -166,22 +166,22 @@ will print the following tree: .nf +--system(1) | - +-- -R-- String sysDescr(1) + +-- \-R-- String sysDescr(1) | Textual Convention: DisplayString | Size: 0..255 - +-- -R-- ObjID sysObjectID(2) - +-- -R-- TimeTicks sysUpTime(3) - +-- -RW- String sysContact(4) + +-- \-R-- ObjID sysObjectID(2) + +-- \-R-- TimeTicks sysUpTime(3) + +-- \-RW- String sysContact(4) | Textual Convention: DisplayString | Size: 0..255 - +-- -RW- String sysName(5) + +-- \-RW- String sysName(5) | Textual Convention: DisplayString | Size: 0..255 - +-- -RW- String sysLocation(6) + +-- \-RW- String sysLocation(6) | Textual Convention: DisplayString | Size: 0..255 - +-- -R-- Integer sysServices(7) - +-- -R-- TimeTicks sysORLastChange(8) + +-- \-R-- Integer sysServices(7) + +-- \-R-- TimeTicks sysORLastChange(8) | Textual Convention: TimeStamp | +--sysORTable(9) @@ -189,11 +189,11 @@ will print the following tree: +--sysOREntry(1) | +-- ---- Integer sysORIndex(1) - +-- -R-- ObjID sysORID(2) - +-- -R-- String sysORDescr(3) + +-- \-R-- ObjID sysORID(2) + +-- \-R-- String sysORDescr(3) | Textual Convention: DisplayString | Size: 0..255 - +-- -R-- TimeTicks sysORUpTime(4) + +-- \-R-- TimeTicks sysORUpTime(4) Textual Convention: TimeStamp .fi -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:48 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:48 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 14/27: fix_spelling_error In-Reply-To: <20160828021940.7775.8287@moszumanska.debian.org> References: <20160828021940.7775.8287@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch patch-queue/master in repository pkg-net-snmp. commit 484ae5017334e1df5bc56508efb33778a199a021 Author: Net-SNMP Packaging Team Date: Thu Jun 18 06:12:05 2015 +0900 fix_spelling_error Gbp-Pq: Name fix_spelling_error.patch --- apps/encode_keychange.c | 2 +- apps/snmpnetstat/inet.c | 2 +- apps/snmpnetstat/inet6.c | 2 +- apps/snmpusm.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/encode_keychange.c b/apps/encode_keychange.c index 5bf8e4c..0ecc51b 100644 --- a/apps/encode_keychange.c +++ b/apps/encode_keychange.c @@ -403,7 +403,7 @@ usage_to_file(FILE * ofp) "-f will require reading from the stdin/terminal, ignoring a) and b).\n\ -P will prevent prompts for passphrases to stdout from being printed.\n\ \n\ - is interpreted as a hex string when preceeded by \"0x\",\n\ + is interpreted as a hex string when preceded by \"0x\",\n\ otherwise it is created to contain \"text\". If nothing is given,\n\ is constructed from the first IP address for the local host.\n"); diff --git a/apps/snmpnetstat/inet.c b/apps/snmpnetstat/inet.c index 0537340..9224973 100644 --- a/apps/snmpnetstat/inet.c +++ b/apps/snmpnetstat/inet.c @@ -449,7 +449,7 @@ icmp_stats(const char *name) struct stat_table icmpstats_tbl[] = { { 1, "%14d total message%s received"}, { 2, "%14d message%s dropped due to errors"}, - {14, "%14d ouput message request%s"}, + {14, "%14d output message request%s"}, {15, "%14d output message%s discarded"}, { 0, ""} }; diff --git a/apps/snmpnetstat/inet6.c b/apps/snmpnetstat/inet6.c index 7109b87..f3bf195 100644 --- a/apps/snmpnetstat/inet6.c +++ b/apps/snmpnetstat/inet6.c @@ -334,7 +334,7 @@ icmp6_stats(const char *name) struct stat_table icmp6stats_tbl[] = { { 1, "%14d total message%s received"}, { 2, "%14d message%s dropped due to errors"}, - {18, "%14d ouput message request%s"}, + {18, "%14d output message request%s"}, {19, "%14d output message%s discarded"}, { 0, ""} }; diff --git a/apps/snmpusm.c b/apps/snmpusm.c index 42919bd..f0985fd 100644 --- a/apps/snmpusm.c +++ b/apps/snmpusm.c @@ -150,7 +150,7 @@ usage(void) fprintf(stderr, "\t\t\t(it won't be active until you active it)\n"); fprintf(stderr, "\t-Cx\t\tChange the privacy key.\n"); fprintf(stderr, "\t-Ca\t\tChange the authentication key.\n"); - fprintf(stderr, "\t-Ck\t\tAllows to use localized key (must start with 0x)\n"); + fprintf(stderr, "\t-Ck\t\tAllows one to use localized key (must start with 0x)\n"); fprintf(stderr, "\t\t\tinstead of passphrase.\n"); } -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:48 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:48 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 15/27: fix_logging_option In-Reply-To: <20160828021940.7775.8287@moszumanska.debian.org> References: <20160828021940.7775.8287@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch patch-queue/master in repository pkg-net-snmp. commit 7d724d70da6a4cc6d998f0fa894965485755819f Author: Net-SNMP Packaging Team Date: Thu Jun 18 06:12:05 2015 +0900 fix_logging_option Gbp-Pq: Name fix_logging_option.patch --- man/snmpd.8.def | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man/snmpd.8.def b/man/snmpd.8.def index f173396..d86023a 100644 --- a/man/snmpd.8.def +++ b/man/snmpd.8.def @@ -78,9 +78,9 @@ To get a list of compiled modules, run the agent with the arguments .I "\-Dmib_init \-H" (assuming debugging support has been compiled in). .TP -.B \-L[efos] +.B \-L[eEfFoOsS] Specify where logging output should be directed (standard error or output, -to a file or via syslog). See LOGGING OPTIONS in snmpcmd(5) for details. +to a file or via syslog). See LOGGING OPTIONS in snmpcmd(1) for details. .TP .BR \-m " \fIMIBLIST" Specifies a colon separated list of MIB modules to load for this -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:49 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:49 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 16/27: fix_typo_in_snmpd.conf In-Reply-To: <20160828021940.7775.8287@moszumanska.debian.org> References: <20160828021940.7775.8287@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch patch-queue/master in repository pkg-net-snmp. commit 55cb99efc1ee3ed698a955bf574e20ee207c0134 Author: Net-SNMP Packaging Team Date: Thu Jun 18 06:12:05 2015 +0900 fix_typo_in_snmpd.conf Gbp-Pq: Name fix_typo_in_snmpd.conf.patch --- EXAMPLE.conf.def | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EXAMPLE.conf.def b/EXAMPLE.conf.def index 180713c..f619c8e 100644 --- a/EXAMPLE.conf.def +++ b/EXAMPLE.conf.def @@ -63,7 +63,7 @@ view systemonly included .1.3.6.1.2.1.25.1 #rwuser authPrivUser priv # It's no longer typically necessary to use the full 'com2sec/group/access' configuration -# r[ou]user and r[ow]community, together with suitable views, should cover most requirements +# r[ow]user and r[ow]community, together with suitable views, should cover most requirements -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:49 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:49 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 17/27: fix_man_error In-Reply-To: <20160828021940.7775.8287@moszumanska.debian.org> References: <20160828021940.7775.8287@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch patch-queue/master in repository pkg-net-snmp. commit a7dfbde3e7a13e341d09d43f9d8033947542aeb4 Author: Net-SNMP Packaging Team Date: Thu Jun 18 06:12:05 2015 +0900 fix_man_error Author: Hideki Yamane Gbp-Pq: Name fix_man_error.patch --- man/mib2c.conf.5.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/mib2c.conf.5.in b/man/mib2c.conf.5.in index 3692a65..d756055 100644 --- a/man/mib2c.conf.5.in +++ b/man/mib2c.conf.5.in @@ -1,6 +1,6 @@ .TH MIB2C.CONF 5 "28 Apr 2004" VVERSIONINFO "Net-SNMP" .SH NAME -mib2c.conf \[em] How to write mib2c.conf files to do ANYTHING based on MIB input. +mib2c.conf - How to write mib2c.conf files to do ANYTHING based on MIB input. .SH SYNOPSIS % cat > mib2c.test.conf << EOF @foreach $t table@ -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:49 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:49 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 18/27: after_RFC5378 In-Reply-To: <20160828021940.7775.8287@moszumanska.debian.org> References: <20160828021940.7775.8287@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch patch-queue/master in repository pkg-net-snmp. commit 69fb36d0ef5287fa9d5836bfa5023974e5ecaea1 Author: Net-SNMP Packaging Team Date: Thu Jun 18 06:12:05 2015 +0900 after_RFC5378 Gbp-Pq: Name after_RFC5378 --- mibs/rfclist | 45 --------------------------------------------- 1 file changed, 45 deletions(-) diff --git a/mibs/rfclist b/mibs/rfclist index e0d3eef..9cca4cc 100644 --- a/mibs/rfclist +++ b/mibs/rfclist @@ -232,48 +232,3 @@ 5190 MIDCOM-MIB 5240 PIM-BSR-MIB 5324 T11-FC-SP-TC-MIB:T11-FC-SP-AUTHENTICATION-MIB:T11-FC-SP-ZONING-MIB:T11-FC-SP-POLICY-MIB:T11-FC-SP-SA-MIB -5427 SYSLOG-TC-MIB -5428 PKTC-IETF-EVENT-MIB -5488 NEMO-MIB -5519 MGMD-STD-MIB -5525 RSERPOOL-MIB -5542 PW-TC-STD-MIB -5591 SNMP-TSM-MIB -5601 PW-STD-MIB:IANA-PWE3-MIB -5602 PW-MPLS-STD-MIB -5603 PW-ENET-STD-MIB -5604 PW-TDM-MIB -5605 PW-ATM-MIB -5643 OSPFV3-MIB -5650 VDSL2-LINE-TC-MIB:VDSL2-LINE-MIB -5676 SYSLOG-MSG-MIB -5728 DVB-RCS-MIB -5813 FORCES-MIB -5833 CAPWAP-BASE-MIB -5834 CAPWAP-DOT11-MIB -5907 NTPv4-MIB -6065 SNMP-VACM-AAA-MIB -6173 IFCP-MGMT-MIB -6240 PW-CEP-STD-MIB -6340 FLOAT-TC-MIB -6353 SNMP-TLS-TM-MIB -6445 MPLS-FRR-GENERAL-STD-MIB:MPLS-FRR-ONE2ONE-STD-MIB:MPLS-FRR-FACILITY-STD-MIB -6475 PMIPV6-TC-MIB:PMIPV6-MIB -6527 VRRPV3-MIB -6615 IPFIX-MIB:IPFIX-SELECTOR-MIB -6727 PSAMP-MIB -6765 GBOND-MIB:IANA-GBOND-TC-MIB -6766 G9983-MIB -6767 G9982-MIB -6768 G9981-MIB -6779 NHDP-MIB -6825 TED-MIB -6850 RBRIDGE-MIB -6933 ENTITY-MIB:UUID-TC-MIB -6945 RPKI-ROUTER-MIB -7052 LISP-MIB -7147 ISCSI-MIB -7184 OLSRv2-MIB -7257 VPLS-GENERIC-MIB:VPLS-LDP-MIB:VPLS-BGP-MIB -7330 BFD-TC-STD-MIB -7331 BFD-STD-MIB -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:49 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:49 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 19/27: fix_manpage-has-errors_break_line In-Reply-To: <20160828021940.7775.8287@moszumanska.debian.org> References: <20160828021940.7775.8287@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch patch-queue/master in repository pkg-net-snmp. commit cedb3def99d27612f0098fbdbd6178a189ccc36e Author: Net-SNMP Packaging Team Date: Thu Jun 18 06:12:05 2015 +0900 fix_manpage-has-errors_break_line see http://lintian.debian.org/tags/manpage-has-errors-from-man.html Author: Hideki Yamane Gbp-Pq: Name fix_manpage-has-errors_break_line.patch --- man/netsnmp_config_api.3.def | 2 +- man/netsnmp_mib_api.3.def | 2 +- man/snmpcmd.1.def | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/man/netsnmp_config_api.3.def b/man/netsnmp_config_api.3.def index d009fc5..bb7e80b 100644 --- a/man/netsnmp_config_api.3.def +++ b/man/netsnmp_config_api.3.def @@ -365,7 +365,7 @@ function that it should abort the operation of the application. SNMPCONFPATH A colon separated list of directories to search for configuration files in. -Default: SYSCONFDIR/snmp:DATADIR/snmp:LIBDIR/snmp:$HOME/.snmp +Default\: SYSCONFDIR/snmp\:DATADIR/snmp\:LIBDIR/snmp\:$HOME/.snmp .SH "SEE ALSO" netsnmp_mib_api(3), snmp_api(3) .\" Local Variables: diff --git a/man/netsnmp_mib_api.3.def b/man/netsnmp_mib_api.3.def index 2e1da8f..72924ce 100644 --- a/man/netsnmp_mib_api.3.def +++ b/man/netsnmp_mib_api.3.def @@ -277,7 +277,7 @@ A colon separated list of MIB modules to load. .br The default list of modules will depend on how the Net-SNMP software was originally compiled, but is typically: -IP\-MIB:IF\-MIB:TCP\-MIB:UDP\-MIB:SNMPv2\-MIB:RFC1213\-MIB: UCD\-SNMP\-MIB:HOST\-RESOURCES\-MIB +IP\-MIB\:IF\-MIB\:TCP\-MIB\:UDP\-MIB\:SNMPv2\-MIB\:RFC1213\-MIB\: UCD\-SNMP\-MIB\:HOST\-RESOURCES\-MIB .IP If the value of the .B MIBS diff --git a/man/snmpcmd.1.def b/man/snmpcmd.1.def index e4df8b2..c41c24a 100644 --- a/man/snmpcmd.1.def +++ b/man/snmpcmd.1.def @@ -888,7 +888,7 @@ The standard prefix for object identifiers (when using UCD-style output). Defaults to .iso.org.dod.internet.mgmt.mib\-2 .IP MIBS The list of MIBs to load. Defaults to -SNMPv2\-TC:SNMPv2\-MIB:IF\-MIB:IP\-MIB:TCP\-MIB:UDP\-MIB:SNMP\-VACM\-MIB. +SNMPv2\-TC\:SNMPv2\-MIB:IF\-MIB:IP\-MIB\:TCP\-MIB\:UDP\-MIB\:SNMP\-VACM\-MIB. Overridden by the .B \-m option. -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:49 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:49 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 20/27: add_rocommunity6 In-Reply-To: <20160828021940.7775.8287@moszumanska.debian.org> References: <20160828021940.7775.8287@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch patch-queue/master in repository pkg-net-snmp. commit bc1f6b27c06383e0031290e89874f566dd3e787b Author: Net-SNMP Packaging Team Date: Thu Jun 18 06:12:05 2015 +0900 add_rocommunity6 Gbp-Pq: Name add_rocommunity6.patch --- EXAMPLE.conf.def | 2 ++ 1 file changed, 2 insertions(+) diff --git a/EXAMPLE.conf.def b/EXAMPLE.conf.def index f619c8e..0c21dee 100644 --- a/EXAMPLE.conf.def +++ b/EXAMPLE.conf.def @@ -49,6 +49,8 @@ view systemonly included .1.3.6.1.2.1.25.1 #rocommunity public localhost # Default access to basic system info rocommunity public default -V systemonly + # rocommunity6 is for IPv6 + rocommunity6 public default -V systemonly # Full access from an example network # Adjust this network address to match your local -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:49 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:49 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 21/27: fix_manpage-has-errors-from-man In-Reply-To: <20160828021940.7775.8287@moszumanska.debian.org> References: <20160828021940.7775.8287@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch patch-queue/master in repository pkg-net-snmp. commit bb08148399065eb5a8299bc3f112e5f98a2a0659 Author: Net-SNMP Packaging Team Date: Thu Jun 18 06:12:05 2015 +0900 fix_manpage-has-errors-from-man $ LC_ALL=C MANROFFSEQ='' MANWIDTH=80 man --warnings -E UTF-8 -l -Tutf8 -Z man/variables.5.def > /dev/null cause error. Forwarded: no Last-Update: 2014-01-11 Gbp-Pq: Name fix_manpage-has-errors-from-man.patch --- man/variables.5.def | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/man/variables.5.def b/man/variables.5.def index 14ee5e2..ccf8f77 100644 --- a/man/variables.5.def +++ b/man/variables.5.def @@ -84,7 +84,8 @@ A variant of this (typically used when writing OIDs in descriptive text, rather than running programs), is to combine the name and numeric subidentifier: .RS - .iso(1).org(3).dod(6).internet(1).mgmt(2).mib-2(1).system(1).sysDescr(1) + .iso(1).org(3).dod(6).internet(1).mgmt(2).mib-2(1).system(1) + .sysDescr(1) .RE .SS Module-qualified OIDs -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:49 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:49 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 22/27: agentx-crash In-Reply-To: <20160828021940.7775.8287@moszumanska.debian.org> References: <20160828021940.7775.8287@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch patch-queue/master in repository pkg-net-snmp. commit 583552747161d2c7c9bd184c72fe35b824476ed7 Author: Net-SNMP Packaging Team Date: Thu Jun 18 06:12:05 2015 +0900 agentx-crash bz729738 - net-snmp dumps core in netsnmp_oid_find_prefix bz1038011 - net-snmp: snmpd crashes/hangs when AgentX subagent times-out commit f9304c83f76202db0e684269ca1af32e43cd9db4 Author: Jan Safranek Date: Tue Feb 7 14:53:44 2012 +0100 CHANGES: PATCH 1633670: fixed snmpd crashing when an AgentX subagent disconnect in the middle of processing of a request. I fixed also the memory leak reported in the tracker comments. Origin: vendor Forwarded: not-needed Last-Update: Gbp-Pq: Name agentx-crash.patch --- agent/mibgroup/agentx/master.c | 5 +++++ agent/mibgroup/agentx/master_admin.c | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/agent/mibgroup/agentx/master.c b/agent/mibgroup/agentx/master.c index c42a42a..baeebaf 100644 --- a/agent/mibgroup/agentx/master.c +++ b/agent/mibgroup/agentx/master.c @@ -219,6 +219,9 @@ agentx_got_response(int operation, if (!cache) { DEBUGMSGTL(("agentx/master", "response too late on session %8p\n", session)); + /* response is too late, free the cache */ + if (magic) + netsnmp_free_delegated_cache((netsnmp_delegated_cache*) magic); return 0; } requests = cache->requests; @@ -606,6 +609,8 @@ agentx_master_handler(netsnmp_mib_handler *handler, result = snmp_async_send(ax_session, pdu, agentx_got_response, cb_data); if (result == 0) { snmp_free_pdu(pdu); + if (cb_data) + netsnmp_free_delegated_cache((netsnmp_delegated_cache*) cb_data); } return SNMP_ERR_NOERROR; diff --git a/agent/mibgroup/agentx/master_admin.c b/agent/mibgroup/agentx/master_admin.c index 4eaeab6..4dc1aa7 100644 --- a/agent/mibgroup/agentx/master_admin.c +++ b/agent/mibgroup/agentx/master_admin.c @@ -133,11 +133,16 @@ close_agentx_session(netsnmp_session * session, int sessid) * requests, so that the delegated request will be completed and * further requests can be processed */ - netsnmp_remove_delegated_requests_for_session(session); + while (netsnmp_remove_delegated_requests_for_session(session)) { + DEBUGMSGTL(("agentx/master", "Continue removing delegated reqests\n")); + } + if (session->subsession != NULL) { netsnmp_session *subsession = session->subsession; for(; subsession; subsession = subsession->next) { - netsnmp_remove_delegated_requests_for_session(subsession); + while (netsnmp_remove_delegated_requests_for_session(subsession)) { + DEBUGMSGTL(("agentx/master", "Continue removing delegated subsession reqests\n")); + } } } -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:49 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:49 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 23/27: Fix kfreebsd builds with kernel headers >= 10 In-Reply-To: <20160828021940.7775.8287@moszumanska.debian.org> References: <20160828021940.7775.8287@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch patch-queue/master in repository pkg-net-snmp. commit c2d0f7157acd4759b98cec9d7d3a466e67da9b64 Author: Niko Tyni Date: Wed Jul 16 21:42:30 2014 +0000 Fix kfreebsd builds with kernel headers >= 10 This fixes warnings like In file included from ../../include/net-snmp/net-snmp-config.h:2085:0, from host/data_access/swinst_apt.c:5: ../../include/net-snmp/system/kfreebsd.h:5:0: warning: "__FreeBSD_version" redefined [enabled by default] #define __FreeBSD_version __FreeBSD_kernel_version ^ In file included from /usr/include/sys/kern/param.h:1:0, from /usr/include/osreldate.h:1, from ../../include/net-snmp/system/kfreebsd.h:4, from ../../include/net-snmp/net-snmp-config.h:2085, from host/data_access/swinst_apt.c:5: /usr/include/sys/kglue/sys/param.h:67:0: note: this is the location of the previous definition #define __FreeBSD_version 1000510 /* Master, propagated to newvers */ and makes agent/mibgroup/host/data_access/swrun_kinfo.c use the modern kinfo_proc field names. Bug-Debian: http://bugs.debian.org/753144 Gbp-Pq: Name Fix-kfreebsd-builds-with-kernel-headers-10.patch --- include/net-snmp/system/kfreebsd.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/net-snmp/system/kfreebsd.h b/include/net-snmp/system/kfreebsd.h index dbf7024..cb32758 100644 --- a/include/net-snmp/system/kfreebsd.h +++ b/include/net-snmp/system/kfreebsd.h @@ -2,7 +2,9 @@ #define freebsd6 freebsd6 #include +#if defined(__FreeBSD_kernel_version) && !defined(__FreeBSD_version) #define __FreeBSD_version __FreeBSD_kernel_version +#endif #include #include -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:50 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:50 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 24/27: fix-request-id-0 In-Reply-To: <20160828021940.7775.8287@moszumanska.debian.org> References: <20160828021940.7775.8287@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch patch-queue/master in repository pkg-net-snmp. commit fa359cc561cb2c8360655b793b43779e4dd00fe0 Author: Net-SNMP Packaging Team Date: Thu Jun 18 06:12:05 2015 +0900 fix-request-id-0 Gbp-Pq: Name fix-request-id-0.patch --- snmplib/snmp_api.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/snmplib/snmp_api.c b/snmplib/snmp_api.c index 191debf..d2568bf 100644 --- a/snmplib/snmp_api.c +++ b/snmplib/snmp_api.c @@ -5025,6 +5025,9 @@ _sess_async_send(void *sessp, /* * No response expected... */ + if ((reqid == 0) && (pdu->command == SNMP_MSG_RESPONSE)) { + reqid = 2; + } if (reqid) { /* * Free v1 or v2 TRAP PDU iff no error -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:50 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:50 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 25/27: Bug#788964: net-snmp snmp_pdu_parse() DoS In-Reply-To: <20160828021940.7775.8287@moszumanska.debian.org> References: <20160828021940.7775.8287@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch patch-queue/master in repository pkg-net-snmp. commit cf280b433a7fa91bf7cc08cc8cbde0ad618b12a0 Author: Hideki Yamane Date: Thu Jun 18 06:21:20 2015 +0900 Bug#788964: net-snmp snmp_pdu_parse() DoS taken patch from https://sourceforge.net/p/net-snmp/code/ci/f23bcd3ac6ddee5d0a48f9703007ccc738914791/ --- snmplib/snmp_api.c | 55 +++++++++++++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/snmplib/snmp_api.c b/snmplib/snmp_api.c index d2568bf..85cc720 100644 --- a/snmplib/snmp_api.c +++ b/snmplib/snmp_api.c @@ -4350,10 +4350,9 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length) u_char type; u_char msg_type; u_char *var_val; - int badtype = 0; size_t len; size_t four; - netsnmp_variable_list *vp = NULL; + netsnmp_variable_list *vp = NULL, *vplast = NULL; oid objid[MAX_OID_LEN]; u_char *p; @@ -4493,38 +4492,24 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length) (ASN_SEQUENCE | ASN_CONSTRUCTOR), "varbinds"); if (data == NULL) - return -1; + goto fail; /* * get each varBind sequence */ while ((int) *length > 0) { - netsnmp_variable_list *vptemp; - vptemp = (netsnmp_variable_list *) malloc(sizeof(*vptemp)); - if (NULL == vptemp) { - return -1; - } - if (NULL == vp) { - pdu->variables = vptemp; - } else { - vp->next_variable = vptemp; - } - vp = vptemp; + vp = SNMP_MALLOC_TYPEDEF(netsnmp_variable_list); + if (NULL == vp) + goto fail; - vp->next_variable = NULL; - vp->val.string = NULL; vp->name_length = MAX_OID_LEN; - vp->name = NULL; - vp->index = 0; - vp->data = NULL; - vp->dataFreeHook = NULL; DEBUGDUMPSECTION("recv", "VarBind"); data = snmp_parse_var_op(data, objid, &vp->name_length, &vp->type, &vp->val_len, &var_val, length); if (data == NULL) - return -1; + goto fail; if (snmp_set_var_objid(vp, objid, vp->name_length)) - return -1; + goto fail; len = MAX_PACKET_LENGTH; DEBUGDUMPHEADER("recv", "Value"); @@ -4604,7 +4589,7 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length) vp->val.string = (u_char *) malloc(vp->val_len); } if (vp->val.string == NULL) { - return -1; + goto fail; } p = asn_parse_string(var_val, &len, &vp->type, vp->val.string, &vp->val_len); @@ -4619,7 +4604,7 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length) vp->val_len *= sizeof(oid); vp->val.objid = (oid *) malloc(vp->val_len); if (vp->val.objid == NULL) { - return -1; + goto fail; } memmove(vp->val.objid, objid, vp->val_len); break; @@ -4631,7 +4616,7 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length) case ASN_BIT_STR: vp->val.bitstring = (u_char *) malloc(vp->val_len); if (vp->val.bitstring == NULL) { - return -1; + goto fail; } p = asn_parse_bitstring(var_val, &len, &vp->type, vp->val.bitstring, &vp->val_len); @@ -4640,12 +4625,28 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length) break; default: snmp_log(LOG_ERR, "bad type returned (%x)\n", vp->type); - badtype = -1; + goto fail; break; } DEBUGINDENTADD(-4); + + if (NULL == vplast) { + pdu->variables = vp; + } else { + vplast->next_variable = vp; + } + vplast = vp; + vp = NULL; } - return badtype; + return 0; + + fail: + DEBUGMSGTL(("recv", "error while parsing VarBindList\n")); + /** if we were parsing a var, remove it from the pdu and free it */ + if (vp) + snmp_free_var(vp); + + return -1; } /* -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:50 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:50 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 26/27: fix Bug#785380 incorrect date format In-Reply-To: <20160828021940.7775.8287@moszumanska.debian.org> References: <20160828021940.7775.8287@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch patch-queue/master in repository pkg-net-snmp. commit b9b8b386ea4e3d3d73459120b9c1a6d3aa08989f Author: Hideki Yamane Date: Thu Jan 28 21:38:09 2016 +0900 fix Bug#785380 incorrect date format --- local/traptoemail | 3 +++ 1 file changed, 3 insertions(+) diff --git a/local/traptoemail b/local/traptoemail index e738ba7..cadc18b 100755 --- a/local/traptoemail +++ b/local/traptoemail @@ -13,6 +13,9 @@ use Net::SMTP; use Getopt::Std; use POSIX qw(strftime); +# for sane timestamp format +$ENV{LANG} = 'C'; + $opts{'s'} = "localhost"; $opts{'f'} = 'root@' . `hostname`; chomp($opts{'f'}); -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:50 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:50 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 27/27: fix #455707 traptoemail use FQDN In-Reply-To: <20160828021940.7775.8287@moszumanska.debian.org> References: <20160828021940.7775.8287@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch patch-queue/master in repository pkg-net-snmp. commit 352948c38fdc4ea26c809a62365a79a2d437de06 Author: Hideki Yamane Date: Fri Jan 29 20:54:57 2016 +0900 fix #455707 traptoemail use FQDN --- local/traptoemail | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/traptoemail b/local/traptoemail index cadc18b..3694c3a 100755 --- a/local/traptoemail +++ b/local/traptoemail @@ -17,7 +17,7 @@ use POSIX qw(strftime); $ENV{LANG} = 'C'; $opts{'s'} = "localhost"; -$opts{'f'} = 'root@' . `hostname`; +$opts{'f'} = 'root@' . `hostname -f`; chomp($opts{'f'}); getopts("hs:f:", \%opts); -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:50 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:50 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] branch temporary created (now c6cf5e1) Message-ID: <20160828021940.7775.18954@moszumanska.debian.org> This is an automated email from the git hooks/post-receive script. henrich pushed a change to branch temporary in repository pkg-net-snmp. at c6cf5e1 add Bug-788964-net-snmp-snmp_pdu_parse-DoS.patch This branch includes the following new commits: new c6cf5e1 add Bug-788964-net-snmp-snmp_pdu_parse-DoS.patch The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:19:50 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:19:50 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] 01/01: add Bug-788964-net-snmp-snmp_pdu_parse-DoS.patch In-Reply-To: <20160828021940.7775.18954@moszumanska.debian.org> References: <20160828021940.7775.18954@moszumanska.debian.org> Message-ID: This is an automated email from the git hooks/post-receive script. henrich pushed a commit to branch temporary in repository pkg-net-snmp. commit c6cf5e12bc90ad8f2d2761a01ec481d591f07384 Author: Hideki Yamane Date: Thu Jun 18 06:26:45 2015 +0900 add Bug-788964-net-snmp-snmp_pdu_parse-DoS.patch --- .../Bug-788964-net-snmp-snmp_pdu_parse-DoS.patch | 128 +++++++++++++++++++++ debian/patches/series | 2 +- 2 files changed, 129 insertions(+), 1 deletion(-) diff --git a/debian/patches/Bug-788964-net-snmp-snmp_pdu_parse-DoS.patch b/debian/patches/Bug-788964-net-snmp-snmp_pdu_parse-DoS.patch new file mode 100644 index 0000000..74b3297 --- /dev/null +++ b/debian/patches/Bug-788964-net-snmp-snmp_pdu_parse-DoS.patch @@ -0,0 +1,128 @@ +From: Hideki Yamane +Date: Thu, 18 Jun 2015 06:21:20 +0900 +Subject: Bug#788964: net-snmp snmp_pdu_parse() DoS + +taken patch from https://sourceforge.net/p/net-snmp/code/ci/f23bcd3ac6ddee5d0a48f9703007ccc738914791/ +--- + snmplib/snmp_api.c | 55 +++++++++++++++++++++++++++--------------------------- + 1 file changed, 28 insertions(+), 27 deletions(-) + +diff --git a/snmplib/snmp_api.c b/snmplib/snmp_api.c +index d2568bf..85cc720 100644 +--- a/snmplib/snmp_api.c ++++ b/snmplib/snmp_api.c +@@ -4350,10 +4350,9 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length) + u_char type; + u_char msg_type; + u_char *var_val; +- int badtype = 0; + size_t len; + size_t four; +- netsnmp_variable_list *vp = NULL; ++ netsnmp_variable_list *vp = NULL, *vplast = NULL; + oid objid[MAX_OID_LEN]; + u_char *p; + +@@ -4493,38 +4492,24 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length) + (ASN_SEQUENCE | ASN_CONSTRUCTOR), + "varbinds"); + if (data == NULL) +- return -1; ++ goto fail; + + /* + * get each varBind sequence + */ + while ((int) *length > 0) { +- netsnmp_variable_list *vptemp; +- vptemp = (netsnmp_variable_list *) malloc(sizeof(*vptemp)); +- if (NULL == vptemp) { +- return -1; +- } +- if (NULL == vp) { +- pdu->variables = vptemp; +- } else { +- vp->next_variable = vptemp; +- } +- vp = vptemp; ++ vp = SNMP_MALLOC_TYPEDEF(netsnmp_variable_list); ++ if (NULL == vp) ++ goto fail; + +- vp->next_variable = NULL; +- vp->val.string = NULL; + vp->name_length = MAX_OID_LEN; +- vp->name = NULL; +- vp->index = 0; +- vp->data = NULL; +- vp->dataFreeHook = NULL; + DEBUGDUMPSECTION("recv", "VarBind"); + data = snmp_parse_var_op(data, objid, &vp->name_length, &vp->type, + &vp->val_len, &var_val, length); + if (data == NULL) +- return -1; ++ goto fail; + if (snmp_set_var_objid(vp, objid, vp->name_length)) +- return -1; ++ goto fail; + + len = MAX_PACKET_LENGTH; + DEBUGDUMPHEADER("recv", "Value"); +@@ -4604,7 +4589,7 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length) + vp->val.string = (u_char *) malloc(vp->val_len); + } + if (vp->val.string == NULL) { +- return -1; ++ goto fail; + } + p = asn_parse_string(var_val, &len, &vp->type, vp->val.string, + &vp->val_len); +@@ -4619,7 +4604,7 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length) + vp->val_len *= sizeof(oid); + vp->val.objid = (oid *) malloc(vp->val_len); + if (vp->val.objid == NULL) { +- return -1; ++ goto fail; + } + memmove(vp->val.objid, objid, vp->val_len); + break; +@@ -4631,7 +4616,7 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length) + case ASN_BIT_STR: + vp->val.bitstring = (u_char *) malloc(vp->val_len); + if (vp->val.bitstring == NULL) { +- return -1; ++ goto fail; + } + p = asn_parse_bitstring(var_val, &len, &vp->type, + vp->val.bitstring, &vp->val_len); +@@ -4640,12 +4625,28 @@ snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data, size_t * length) + break; + default: + snmp_log(LOG_ERR, "bad type returned (%x)\n", vp->type); +- badtype = -1; ++ goto fail; + break; + } + DEBUGINDENTADD(-4); ++ ++ if (NULL == vplast) { ++ pdu->variables = vp; ++ } else { ++ vplast->next_variable = vp; ++ } ++ vplast = vp; ++ vp = NULL; + } +- return badtype; ++ return 0; ++ ++ fail: ++ DEBUGMSGTL(("recv", "error while parsing VarBindList\n")); ++ /** if we were parsing a var, remove it from the pdu and free it */ ++ if (vp) ++ snmp_free_var(vp); ++ ++ return -1; + } + + /* diff --git a/debian/patches/series b/debian/patches/series index 7f5d48d..34fb96e 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -12,7 +12,6 @@ fix_snmpcheck_perl_path.patch fix_regular_expression.patch snmptranslate.1.patch fix_spelling_error.patch -#net-snmp-config_multi-arch.patch fix_logging_option.patch fix_typo_in_snmpd.conf.patch fix_man_error.patch @@ -23,3 +22,4 @@ fix_manpage-has-errors-from-man.patch agentx-crash.patch Fix-kfreebsd-builds-with-kernel-headers-10.patch fix-request-id-0.patch +Bug-788964-net-snmp-snmp_pdu_parse-DoS.patch -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:20:02 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:20:02 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] annotated tag debian/5.7.3+dfsg-1.1 created (now a835863) Message-ID: <20160828022001.10779.64989@moszumanska.debian.org> This is an automated email from the git hooks/post-receive script. henrich pushed a change to annotated tag debian/5.7.3+dfsg-1.1 in repository pkg-net-snmp. at a835863 (tag) tagging 6f0c2a20312c7ed21190c504a85d1f20cc21513b (commit) replaces debian/5.7.2.1+dfsg-1 tagged by Hideki Yamane on Sun Aug 28 11:12:16 2016 +0900 - Log ----------------------------------------------------------------- Debian release 5.7.3+dfsg-1.1 Hideki Yamane (20): Imported Upstream version 5.7.3+dfsg Merge tag 'upstream/5.7.3+dfsg' refresh patches and drop unnecessary one also drop kfreebsd patch set Standards-Version: 3.9.6 upload to unstable fix Bug#788964 snmp_pdu_parse() DoS add 0026-fix-Bug-785380-incorrect-date-format.patch note to fix #785380 fix #794641, #794647, #781257 fix #455707 fix #774775 fix #801991 just adjust line fix #778539 really fix #781257 enable parallel build use https for Vcs-* fix #586722, #587183 fix #746397 Steinar H. Gunderson (1): Import Debian patch 5.7.3+dfsg-1.1 ----------------------------------------------------------------------- No new revisions were added by this update. -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:20:02 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:20:02 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] annotated tag debian/5.7.3+dfsg-1.2 created (now 7c024f8) Message-ID: <20160828022001.10779.9451@moszumanska.debian.org> This is an automated email from the git hooks/post-receive script. henrich pushed a change to annotated tag debian/5.7.3+dfsg-1.2 in repository pkg-net-snmp. at 7c024f8 (tag) tagging d0da2fd494efd83b612f218af909d6ff21485373 (commit) replaces debian/5.7.3+dfsg-1.1 tagged by Hideki Yamane on Sun Aug 28 11:14:56 2016 +0900 - Log ----------------------------------------------------------------- Debian release 5.7.3+dfsg-1.2 Steinar H. Gunderson (1): Import Debian patch 5.7.3+dfsg-1.2 ----------------------------------------------------------------------- No new revisions were added by this update. -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:20:02 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:20:02 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] annotated tag debian/5.7.3+dfsg-1.3 created (now c18f9c6) Message-ID: <20160828022001.10779.69949@moszumanska.debian.org> This is an automated email from the git hooks/post-receive script. henrich pushed a change to annotated tag debian/5.7.3+dfsg-1.3 in repository pkg-net-snmp. at c18f9c6 (tag) tagging 321a93676351b961d0e43a8d42a5929503e59b74 (commit) replaces debian/5.7.3+dfsg-1.2 tagged by Hideki Yamane on Sun Aug 28 11:15:15 2016 +0900 - Log ----------------------------------------------------------------- Debian release 5.7.3+dfsg-1.3 Steinar H. Gunderson (1): Import Debian patch 5.7.3+dfsg-1.3 ----------------------------------------------------------------------- No new revisions were added by this update. -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:20:03 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:20:03 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] annotated tag debian/5.7.3+dfsg-1.4 created (now 8e65ee4) Message-ID: <20160828022001.10779.51994@moszumanska.debian.org> This is an automated email from the git hooks/post-receive script. henrich pushed a change to annotated tag debian/5.7.3+dfsg-1.4 in repository pkg-net-snmp. at 8e65ee4 (tag) tagging 740e4dbd701f8006026f2f3e1f13ea145392aebd (commit) replaces debian/5.7.3+dfsg-1.3 tagged by Hideki Yamane on Sun Aug 28 11:15:36 2016 +0900 - Log ----------------------------------------------------------------- Debian release 5.7.3+dfsg-1.4 Rapha?l Hertzog (1): Import Debian patch 5.7.3+dfsg-1.4 ----------------------------------------------------------------------- No new revisions were added by this update. -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git From henrich at moszumanska.debian.org Sun Aug 28 02:20:03 2016 From: henrich at moszumanska.debian.org (Hideki Yamane) Date: Sun, 28 Aug 2016 02:20:03 +0000 Subject: [Pkg-net-snmp-commits] [pkg-net-snmp] tag debian/5.7.3+dfsg-1 created (now 803df48) Message-ID: <20160828022001.10779.39924@moszumanska.debian.org> This is an automated email from the git hooks/post-receive script. henrich pushed a change to tag debian/5.7.3+dfsg-1 in repository pkg-net-snmp. at 803df48 (commit) No new revisions were added by this update. -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git