Hello community,

here is the log from the commit of package net-snmp.2983 for 
openSUSE:12.3:Update checked in at 2014-09-10 10:31:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.3:Update/net-snmp.2983 (Old)
 and      /work/SRC/openSUSE:12.3:Update/.net-snmp.2983.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "net-snmp.2983"

Changes:
--------
New Changes file:

--- /dev/null   2014-07-24 01:57:42.080040256 +0200
+++ /work/SRC/openSUSE:12.3:Update/.net-snmp.2983.new/net-snmp.changes  
2014-09-10 10:31:18.000000000 +0200
@@ -0,0 +1,1012 @@
+-------------------------------------------------------------------
+Tue Sep  2 21:06:19 UTC 2014 - abergm...@suse.com
+
+- added net-snmp-5.7.2-fix-snmptrapd-remote-denial-of-service.patch:
+  fix remote denial of service problem inside snmptrapd when started 
+  with the "-OQ" option (CVE-2014-3565)(bnc#894361) 
+
+-------------------------------------------------------------------
+Mon Mar 10 16:00:45 UTC 2014 - abergm...@suse.com
+
+- net-snmp-5.7.2-fix-icmp-mib-table-handling.patch: fix potential 
+  remote denial of service problem within the Linux ICMP-MIB 
+  implementation (CVE-2014-2284)(bnc#866942)
+- net-snmp-5.7.2-fix-perl-trap-handler.patch: fix potential remote
+  denial of service problem inside the snmptrapd Perl trap handler 
+  (CVE-2014-2285)(bnc#866942)
+
+-------------------------------------------------------------------
+Mon May 20 11:22:24 UTC 2013 - lchiqui...@suse.com
+
+- Disable parallelism during build. The dependencies between the
+  Perl module and libnetsnmp are not defined correctly and might
+  result in broken linkage (bnc#819497, bnc#818907)
+
+-------------------------------------------------------------------
+Tue Dec 18 22:01:23 UTC 2012 - lchiqui...@suse.com
+
+- net-snmp-5.7.2-build-fix-for-strlcat.patch: fix exported strlcat()
+  prototype that could conflict with other packages (bnc#793548)
+
+-------------------------------------------------------------------
+Wed Oct 10 18:21:19 UTC 2012 - lchiqui...@suse.com
+
+- update to version 5.7.2: several bug fixes in the agent, client
+  utilities and libraries. The CHANGES file shipped with the
+  package contains a comprehensive list of fixes and improvements
+- rebase patches to apply cleanly:
+  * net-snmp-5.7.2-perl-tk-warning.patch
+  * net-snmp-5.7.2-socket-path.patch
+  * net-snmp-5.7.2-testing-empty-arptable.patch
+  * net-snmp-5.7.2-pie.patch
+  * net-snmp-5.7.2-velocity-mib.patch
+  * net-snmp-5.7.2-fix-snmpd-crashing-when-an-agentx-disconnects.patch
+- remove patches that are now present in the upstream release:
+  * net-snmp-5.7.0-recognize-reiserfs.patch
+  * net-snmp-5.7.1-snmplib-zero-timeout.patch
+  * net-snmp-5.7.1-old-api-double-free.patch
+  * net-snmp-5.7.1-use-pclose-to-close-pipes.patch
+  * net-snmp-5.7.1-fix-handling-of-large-filesystems.patch
+  * net-snmp-5.7.1-snmplib-default-retries.patch
+  * net-snmp-5.7.1-fsys-memory-leak.patch
+  * net-snmp-5.7.1-adjust-copyright-in-agent-txt-file.patch
+  * net-snmp-5.7.1-recognize-ocfs2.patch
+  * net-snmp-5.7.1-properly-clean-up-old-requests-in-subagents.patch
+  * net-snmp-5.7.1-reduce-code-duplication-in-agentx.patch
+  * net-snmp-5.7.1-log-agentx-disconnections.patch
+  * net-snmp-5.7.1-more-robust-handling-of-agentx-errors.patch
+  * net-snmp-5.7.1-report-problems-with-setundo-processing.patch
+  * net-snmp-5.7.1-fix-array-index-error.patch
+
+-------------------------------------------------------------------
+Fri Sep  7 17:28:00 UTC 2012 - jeng...@inai.de
+
+- Remove redundant sections from specfile
+- Avoid shipping .la files
+
+-------------------------------------------------------------------
+Mon May 14 17:39:17 UTC 2012 - lchiqui...@suse.com
+
+- fix array index error that could lead to a crash (CVE-2012-2141)
+  (bnc#759352)
+
+-------------------------------------------------------------------
+Thu Mar 29 22:14:55 UTC 2012 - lchiqui...@suse.com
+
+- fix agent crash when reloading a subagent (AgentX) during a query
+  (bnc#670789)
+
+-------------------------------------------------------------------
+Thu Mar 29 22:14:04 UTC 2012 - lchiqui...@suse.com
+
+- add OCFS2 to the list of known file systems
+
+-------------------------------------------------------------------
+Thu Mar 22 11:04:08 UTC 2012 - lchiqui...@suse.com
+
+- update copyright notice of AGENT.txt allowing us to redistribute
+  the file in our package (from Dave Shield) (bnc#750704)
+
+-------------------------------------------------------------------
+Wed Feb  8 06:09:32 UTC 2012 - co...@suse.com
+
+- fix license to be in spdx.org format
+
+-------------------------------------------------------------------
+Tue Nov  1 11:01:12 UTC 2011 - lchiqui...@suse.com
+
+- logrotate: use "reload" instead of "try-restart" to avoid an
+  unnecessary stop/start cycle in the agent (bnc#707636)
+
+-------------------------------------------------------------------
+Fri Oct 21 12:30:29 UTC 2011 - lchiqui...@suse.com
+
+- net-snmp-5.7.1-fsys-memory-leak.patch: fix a memory leak in
+  agent/mibgroup/hardware/fsys (bnc#725766)
+- net-snmp-5.7.1-snmplib-default-retries.patch: change default
+  number of retries back from 0 to 5 (bnc#725766)
+- net-snmp-5.7.1-fix-handling-of-large-filesystems.patch: fix
+  bug in handling large (>8TB) filesystems (bnc#725766)
+- net-snmp-5.7.1-use-pclose-to-close-pipes.patch: use pclose()
+  instead of fclose() to close a pipe (bnc#725766)
+- net-snmp-5.7.1-old-api-double-free.patch: agent: avoid double
+  free when netsnmp_register_old_api() fails (bnc#725766)
+- net-snmp-5.7.1-snmplib-zero-timeout.patch: snmplib: avoid
+  waiting indefinitely if a session has timeout zero (bnc#725766)
+
+-------------------------------------------------------------------
+Thu Sep 29 00:44:40 UTC 2011 - lchiqui...@suse.com
+
+- update to version 5.7.1: minor release including some bug fixes
+
+-------------------------------------------------------------------
+Fri Sep 16 17:24:39 UTC 2011 - jeng...@medozas.de
+
+- enable net-snmp-devel on all baselib architectures
+
+-------------------------------------------------------------------
+Wed Sep 14 18:33:18 UTC 2011 - lchiqui...@suse.com
+
+- make sure all delegated requests are removed before closing an
+  AgentX session (bnc#670789)
+
+-------------------------------------------------------------------
+Fri Sep  9 20:41:31 UTC 2011 - lchiqui...@suse.com
+
+- update to version 5.7.1.rc1 but keep package version as 5.7.1
+  to avoid update problems when the final version is released
+
+-------------------------------------------------------------------
+Fri Sep  9 20:18:31 UTC 2011 - lchiqui...@suse.com
+
+- small fixes to snmpd and snmptrapd init scripts:
+  - if $SNMPD_LOGLEVEL is not defined, use LOG_NOTICE instead of
+    LOG_DEBUG
+  - improve messages printed and service description
+  - write snmptrapd logs to /var/log/net-snmpd.log
+
+-------------------------------------------------------------------
+Fri Sep  9 19:36:55 UTC 2011 - lchiqui...@suse.com
+
+- update README.SUSE to reflect some recent changes and drop a bit
+  of outdated information
+- update baselibs to reflect new library version
+- spec file cleanup: rename some source files for consistency
+
+-------------------------------------------------------------------
+Thu Sep  1 12:48:57 UTC 2011 - lchiqui...@suse.com
+
+- add ReiserFS to the list of known file systems (bnc#715199)
+
+-------------------------------------------------------------------
+Tue Aug 30 01:43:26 UTC 2011 - lchiqui...@suse.com
+
+- install snmptrapd init script by default (bnc#712175)
+
+-------------------------------------------------------------------
+Tue Aug 30 01:37:28 UTC 2011 - lchiqui...@suse.com
+
+- fix logging option in snmptrapd init script (bnc#712174) 
+
+-------------------------------------------------------------------
+Thu Jul 14 17:46:57 UTC 2011 - lchiqui...@suse.com
+
+- update upstream patches from branch V5-7-patches to 20110714
+
+-------------------------------------------------------------------
+Tue Jul  5 12:28:00 UTC 2011 - lchiqui...@suse.com
+
+- update to version 5.7:
+  new features and lots of bug fixes
+- remove patches that are no longer needed:
+  net-snmp-5.6.0-enable-hrh-filesys.patch
+  net-snmp-5.6.1-recognize-jfs-and-xfs.patch
+  net-snmp-5.6.1-rpm490.patch
+- refresh and rename patches to apply cleanly after update:
+  net-snmp-5.7.0-pie.patch
+  net-snmp-5.7.0-velocity-mib.patch
+
+-------------------------------------------------------------------
+Thu May 19 14:43:13 CEST 2011 - m...@suse.de
+
+- switch from rpmdb to rpmts to support rpm-4.9.0
+
+-------------------------------------------------------------------
+Thu May 12 14:49:34 UTC 2011 - lchiqui...@suse.com
+
+- update upstream patches from branch V5-6-patches to 20110512
++++ 815 more lines (skipped)
++++ between /dev/null
++++ and /work/SRC/openSUSE:12.3:Update/.net-snmp.2983.new/net-snmp.changes

New:
----
  README.SUSE
  baselibs.conf
  net-snmp-5.7.2-build-fix-for-strlcat.patch
  net-snmp-5.7.2-fix-icmp-mib-table-handling.patch
  net-snmp-5.7.2-fix-perl-trap-handler.patch
  net-snmp-5.7.2-fix-snmpd-crashing-when-an-agentx-disconnects.patch
  net-snmp-5.7.2-fix-snmptrapd-remote-denial-of-service.patch
  net-snmp-5.7.2-net-snmp-config-headercheck.patch
  net-snmp-5.7.2-perl-tk-warning.patch
  net-snmp-5.7.2-pie.patch
  net-snmp-5.7.2-socket-path.patch
  net-snmp-5.7.2-testing-empty-arptable.patch
  net-snmp-5.7.2-velocity-mib.patch
  net-snmp-5.7.2.tar.bz2
  net-snmp-rpmlintrc
  net-snmp.changes
  net-snmp.logrotate
  net-snmp.spec
  net-snmp.sysconfig
  rc.snmpd
  rc.snmptrapd
  snmpd.conf
  test_installed

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ net-snmp.spec ++++++
#
# spec file for package net-snmp
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%define pkg_name net-snmp
%ifnarch s390 s390x
%define netsnmp_with_sensors 1
%endif
%define netsnmp_check 1
%define netsnmp_logfile /var/log/net-snmpd.log
%define netsnmp_agentx_socket_dir_fhs /var/run/agentx
%define netsnmp_agentx_socket_dir_rfc /var/agentx

Name:           net-snmp
Version:        5.7.2
Release:        0
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  openssl-devel
BuildRequires:  rpm-devel
BuildRequires:  tcpd-devel
%if 0%{?netsnmp_with_sensors}
BuildRequires:  libsensors4-devel
%endif
Requires:       logrotate
Requires:       perl-SNMP = %{version}
Requires:       perl-TermReadKey
PreReq:         %insserv_prereq %fillup_prereq /sbin/chkconfig
# bug437293
%ifarch ppc64
Obsoletes:      net-snmp-64bit
%endif
#
Url:            http://sourceforge.net/projects/net-snmp
Source:         %{pkg_name}-%{version}.tar.bz2
Source1:        rc.snmpd
Source2:        snmpd.conf
Source3:        README.SUSE
Source4:        rc.snmptrapd
Source5:        net-snmp.logrotate
Source6:        test_installed
Source7:        net-snmp.sysconfig
Source8:        net-snmp-rpmlintrc
Source9:        baselibs.conf
Patch1:         net-snmp-5.7.2-socket-path.patch
Patch2:         net-snmp-5.7.2-testing-empty-arptable.patch
Patch3:         net-snmp-5.7.2-pie.patch
Patch5:         net-snmp-5.7.2-net-snmp-config-headercheck.patch
Patch6:         net-snmp-5.7.2-perl-tk-warning.patch
Patch7:         net-snmp-5.7.2-velocity-mib.patch
Patch8:         net-snmp-5.7.2-build-fix-for-strlcat.patch
Patch23:        
net-snmp-5.7.2-fix-snmpd-crashing-when-an-agentx-disconnects.patch
Patch24:        net-snmp-5.7.2-fix-icmp-mib-table-handling.patch
Patch25:        net-snmp-5.7.2-fix-perl-trap-handler.patch
Patch26:        net-snmp-5.7.2-fix-snmptrapd-remote-denial-of-service.patch
#
Summary:        SNMP Daemon
License:        BSD-3-Clause and MIT
Group:          Productivity/Networking/Other

%description
Net-SNMP is a suite of applications used to implement SNMP v1, SNMP v2c
and SNMP v3 using both IPv4 and IPv6. The suite includes:

- An extensible agent for responding to SNMP queries including built-in
  support for a wide range of MIB information modules
- Command-line applications to retrieve and manipulate information from
  SNMP-capable devices
- A daemon application for receiving SNMP notifications
- A library for developing new SNMP applications, with C and Perl APIs
- A graphical MIB browser.

This package was originally based on the CMU 2.1.2.1 snmp code. It was
renamed from cmu-snmp to ucd-snmp in 1995 and later renamed from ucd-snmp
to net-snmp in November 2000.


Authors:
--------
    Wes Hardaker <harda...@users.sourceforge.net>

%define library_name libsnmp30

%package     -n libsnmp30
Requires:       perl-base = %{perl_version}
Requires:       snmp-mibs = %{version}
#
Summary:        Shared Libraries from net-snmp
License:        BSD-3-Clause and MIT
Group:          Productivity/Networking/Other

%description -n libsnmp30
Net-SNMP is a suite of applications used to implement SNMP v1, SNMP v2c
and SNMP v3 using both IPv4 and IPv6. The suite includes:

* An extensible agent for responding to SNMP queries including built-in
  support for a wide range of MIB information modules
* Command-line applications to retrieve and manipulate information from
  SNMP-capable devices
* A daemon application for receiving SNMP notifications
* A library for developing new SNMP applications, with C and Perl APIs
* A graphical MIB browser.

This package holds the shared libraries from the net-snmp package.


Authors:
--------
    Wes Hardaker <harda...@users.sourceforge.net>

%package devel
# bug437293
%ifarch ppc64
Obsoletes:      net-snmp-devel-64bit
%endif
#
Requires:       %{library_name} = %{version}
# for mib2c
Requires:       libopenssl-devel
Requires:       perl
Requires:       perl-SNMP = %{version}
Requires:       rpm-devel
Requires:       tcpd-devel
Requires:       zlib-devel
%if 0%{?netsnmp_with_sensors}
Requires:       libsensors4-devel
%endif
#
Summary:        Development files from net-snmp
License:        BSD-3-Clause and MIT
Group:          Development/Libraries/C and C++

%description devel
Net-SNMP is a suite of applications used to implement SNMP v1, SNMP v2c
and SNMP v3 using both IPv4 and IPv6. The suite includes:

* An extensible agent for responding to SNMP queries including built-in
  support for a wide range of MIB information modules
* Command-line applications to retrieve and manipulate information from
  SNMP-capable devices
* A daemon application for receiving SNMP notifications
* A library for developing new SNMP applications, with C and Perl APIs
* A graphical MIB browser.

This package holds the development headers, libraries and API documentation
from the net-snmp package.


Authors:
--------
    Wes Hardaker <harda...@users.sourceforge.net>

%package     -n snmp-mibs
#
Summary:        MIB files from net-snmp
License:        BSD-3-Clause and MIT
Group:          Productivity/Networking/Other

%description -n snmp-mibs
Net-SNMP is a suite of applications used to implement SNMP v1, SNMP v2c
and SNMP v3 using both IPv4 and IPv6. The suite includes:

- An extensible agent for responding to SNMP queries including built-in
  support for a wide range of MIB information modules
- Command-line applications to retrieve and manipulate information from
  SNMP-capable devices
- A daemon application for receiving SNMP notifications
- A library for developing new SNMP applications, with C and Perl APIs
- A graphical MIB browser.

This package holds the MIB files from the net-snmp package.


Authors:
--------
    Wes Hardaker <harda...@users.sourceforge.net>

%package     -n perl-SNMP
Requires:       %{pkg_name} = %{version}
Requires:       perl-base = %{perl_version}
#
Summary:        Perl5 SNMP Extension Module
License:        GPL-2.0+
Group:          Development/Libraries/Perl

%description -n perl-SNMP
The Perl5 'SNMP' Extension Module v3.1.0 for the UCD SNMPv3 library.


Authors:
--------
    G.S. Marzot <gmar...@nortelnetworks.com>

%prep
%setup -q -n %{pkg_name}-%{version}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch23 -p1
%patch24 -p1
%patch25 -p1
%patch26 -p1

%build
MIBS="misc/ipfwacc ucd-snmp/diskio etherlike-mib rmon-mib velocity smux \
      ip-mib/ipv4InterfaceTable ip-mib/ipv6InterfaceTable \
      ip-mib/ipDefaultRouterTable ip-mib/ipAddressPrefixTable \
      ip-mib/ipv6ScopeZoneIndexTable ip-mib/ipIfStatsTable"

%if 0%{?netsnmp_with_sensors}
MIBS="$MIBS ucd-snmp/lmsensorsMib"
%endif

%configure \
        --with-sys-contact="root@localhost" \
        --with-sys-location="unknown" \
        --with-mib-modules="$MIBS" \
        --with-cflags="%{optflags} -fstack-protector-all" \
        --with-persistent-directory="/var/lib/net-snmp" \
        --with-agentx-socket="%{netsnmp_agentx_socket_dir_fhs}/master" \
        --with-logfile="%{netsnmp_logfile}" \
        --with-libwrap="%{_prefix}" \
        --with-perl-modules="INSTALLDIRS=vendor" \
        --with-defaults \
        --enable-shared \
        --disable-static \
        --enable-as-needed \
        --without-root-access \
        --enable-local-smux \
        --enable-ipv6 \
        --enable-ucd-snmp-compatibility
# Parallel building is disabled because dependencies between the Perl
# module and libnetsnmp are not correctly defined.
make #%{?_smp_mflags}

%check
%if 0%{?netsnmp_check}
%ifnarch %arm
ulimit -c unlimited
%{__make} test ||:
%{__make} test TESTOPTS='-P tcp' ||:
%endif
%{__make} perlmodules ||:
LD_RUN_PATH="$PWD/snmplib/.libs" 
LD_LIBRARY_PATH="${PWD}/snmplib/.libs:${PWD}/agent/.libs:${PWD}/agent/helpers/.libs"
 %{__make} perltest ||:
%endif

%install
%makeinstall INSTALL_PREFIX=%{buildroot}
%{__install} -Dd %{buildroot}/var/log %{buildroot}/var/lib/net-snmp 
%{buildroot}/usr/lib/net-snmp/agents 
%{buildroot}%{netsnmp_agentx_socket_dir_fhs}
%{__install} -D -m 0755 %{SOURCE1} %{buildroot}/etc/init.d/snmpd
%{__install} -D -m 0755 %{SOURCE4} %{buildroot}/etc/init.d/snmptrapd
%{__install} -D -m 0600 %{SOURCE2} %{buildroot}/etc/snmp/snmpd.conf
%{__install} -m 0644 %{SOURCE3} .
%{__install} -m 0644 %{SOURCE4} .
%{__install} -D -m 0644 %{SOURCE5} %{buildroot}/etc/logrotate.d/net-snmp
%{__install} -m 0744 %{SOURCE6} testing/
%{__ln_s} -f /etc/init.d/snmpd %{buildroot}%{_sbindir}/rcsnmpd
%{__ln_s} -f /etc/init.d/snmptrapd %{buildroot}%{_sbindir}/rcsnmptrapd
%{__install} -m 0644 /dev/null  %{buildroot}%{netsnmp_logfile}
pushd perl
    %perl_make_install
    %perl_process_packlist
    %{__rm} -f %{buildroot}/%{perl_vendorarch}/Bundle/Makefile.subs.pl
popd
%{__grep} -v "^#define PACKAGE" 
%{buildroot}%{_includedir}/net-snmp/net-snmp-config.h > \
    %{buildroot}%{_includedir}/net-snmp/net-snmp-config.h.new
%{__mv}  %{buildroot}%{_includedir}/net-snmp/net-snmp-config.h{.new,}
%{__install} -D -m 0644 %{S:7} \
    %{buildroot}/var/adm/fillup-templates/sysconfig.%{pkg_name}
#
%{__ln_s} -f %{netsnmp_agentx_socket_dir_fhs} 
%{buildroot}%{netsnmp_agentx_socket_dir_rfc}
#
rm -f "%buildroot/%_libdir"/*.la

%preun
%stop_on_removal snmpd

%post
/sbin/chkconfig -c snmpd 2> /dev/null && FIRST_ARG=2
%{fillup_only}

%postun
%restart_on_update snmpd
%restart_on_update snmptrapd
%{insserv_cleanup}

%post   -n %{library_name} -p /sbin/ldconfig

%postun -n %{library_name} -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc AGENT.txt COPYING EXAMPLE.conf EXAMPLE.conf.def
%doc FAQ NEWS TODO CHANGES
%doc README README.agent-mibs README.agentx README.krb5 README.snmpv3 
README.thread
%dir /etc/snmp
%config(noreplace) /etc/snmp/snmpd.conf
%config /etc/init.d/snmpd
%config /etc/init.d/snmptrapd
%{_bindir}/encode_keychange
%{_bindir}/fixproc
%{_bindir}/ipf-mod.pl
%{_bindir}/net-snmp-config
%{_bindir}/snmpbulkget
%{_bindir}/snmpbulkwalk
%{_bindir}/snmpcheck
%{_bindir}/snmpconf
%{_bindir}/snmpdelta
%{_bindir}/snmpdf
%{_bindir}/snmpget
%{_bindir}/snmpgetnext
%{_bindir}/snmpinform
%{_bindir}/snmpnetstat
%{_bindir}/snmpset
%{_bindir}/snmpstatus
%{_bindir}/snmptable
%{_bindir}/snmptest
%{_bindir}/snmptranslate
%{_bindir}/snmptrap
%{_bindir}/snmpusm
%{_bindir}/snmpvacm
%{_bindir}/snmpwalk
%{_bindir}/traptoemail
%{_bindir}/net-snmp-create-v3-user
%{_bindir}/net-snmp-cert
%{_bindir}/agentxtrap
%{_bindir}/snmp-bridge-mib
%dir %{_prefix}/lib/net-snmp
%dir %{_prefix}/lib/net-snmp/agents
%{_mandir}/man[158]/*
%{_sbindir}/*
/var/lib/net-snmp
%dir %ghost %attr(700,root,root) %{netsnmp_agentx_socket_dir_fhs}
%ghost %{netsnmp_logfile}
%config(noreplace) /etc/logrotate.d/net-snmp
/var/adm/fillup-templates/sysconfig.%{pkg_name}
%{netsnmp_agentx_socket_dir_rfc}
%{_datadir}/snmp/snmpconf-data/
%{_datadir}/snmp/snmp_perl.pl
%{_datadir}/snmp/snmp_perl_trapd.pl

%files -n snmp-mibs
%defattr(-,root,root)
%dir %{_datadir}/snmp
%{_datadir}/snmp/mibs/

%files -n %{library_name}
%defattr(-,root,root)
%{_libdir}/libsnmp*.so.*
%{_libdir}/libnetsnmp*.so.*

%files devel
%defattr(-,root,root)
%doc ChangeLog PORTING
%{_mandir}/man3/*
%{_includedir}/ucd-snmp
%{_includedir}/net-snmp
%{_libdir}/libsnmp*.so
%{_libdir}/libnetsnmp*.so
%{_bindir}/mib2c
%{_bindir}/mib2c-update
%{_datadir}/snmp/mib2c*

%files -n perl-SNMP
%defattr(-,root,root)
%{perl_vendorarch}/auto/SNMP
%{perl_vendorarch}/auto/NetSNMP
%{perl_vendorarch}/auto/Bundle
%{perl_vendorarch}/SNMP.pm
%{perl_vendorarch}/NetSNMP
%{_bindir}/tkmib
%if 0%{?suse_version} <= 1130
/var/adm/perl-modules/net-snmp
%endif

%changelog
++++++ README.SUSE ++++++
An SNMP agent is a powerful and complex software and, as such, may
be affected by flaws and security issues.  We recommend that SNMP
access (161/udp,162/udp) be blocked at your firewall.

There are also some important changes that have been made in this release
of our package:

      o the daemon now sets a PID file in /var/run/

      o logging is now done directly to /var/log/net-snmpd.log instead
        of sending stderr/stdout through syslog.

      o the daemon is now started with the '-r'.  This option prevents
        snmpd from exiting if it doesn't have permission to read something.
        This only occurs if you start snmpd on a high port as a non-root
        root user.

      o If you need to run snmptrapd, we've provided an init script
        in /etc/init.d/snmptrapd, but the service is disabled by default.
        SNMP traps should be avoided whenever possible because they are
        unreliable (you should poll with snmpget instead) and snmptrapd
        has been the source of many of the security problems with SNMP
        so please don't run this unless you are sure of what you are doing.
        To enable the service, run
          chkconfig snmptrapd on
        and create a configuration file named /etc/snmp/snmptrapd.conf.
        Then, start the daemon with
          rcsnmptrapd start
        Logging is done to /var/log/net-snmpd.log.

        For more information see the manpages for snmptrapd and snmptrapd.conf.

      o Master AgentX support is enabled if you have modules in
        /usr/lib/net-snmp/agents. The domain socket is created as
        /var/run/agentx/master.  You can change this to a network
        interface if needed (see snmpd(1)).  The snmpd init script
        automatically detects and starts any sub-agents in placed into
        /var/lib/net-snmp.

More documentation on the net-snmp package can be found in this directory
as well as the project's homepage: http://www.net-snmp.org/
++++++ baselibs.conf ++++++
libsnmp30
net-snmp-devel
   requires -net-snmp-<targettype>
   requires "libsnmp30-<targettype> = <version>"
++++++ net-snmp-5.7.2-build-fix-for-strlcat.patch ++++++
commit 4a6d0378a3916571ce7604c4a3d54a8c96a8f807
Author: Bart Van Assche <bvanass...@acm.org>
Date:   Sun Oct 28 09:54:12 2012 -0700

    Windows: Visual Studio 6 build fix for strlcat()

Index: net-snmp-5.7.2/snmplib/strlcat.c
===================================================================
--- net-snmp-5.7.2.orig/snmplib/strlcat.c
+++ net-snmp-5.7.2/snmplib/strlcat.c
@@ -37,7 +37,7 @@
  * If retval >= siz, truncation occurred.
  */
 size_t
-strlcat(char * __restrict dst, const char * __restrict src, size_t siz)
+strlcat(char *dst, const char *src, size_t siz)
 {
        char *d = dst;
        const char *s = src;
Index: net-snmp-5.7.2/include/net-snmp/library/system.h
===================================================================
--- net-snmp-5.7.2.orig/include/net-snmp/library/system.h
+++ net-snmp-5.7.2/include/net-snmp/library/system.h
@@ -196,8 +196,7 @@ SOFTWARE.
 #endif
 #ifndef HAVE_STRLCAT
     NETSNMP_IMPORT
-    size_t            strlcat(char * __restrict, const char * __restrict,
-                              size_t);
+    size_t            strlcat(char *, const char *, size_t);
 #endif
 
     int             netsnmp_os_prematch(const char *ospmname,
++++++ net-snmp-5.7.2-fix-icmp-mib-table-handling.patch ++++++
commit a1fd64716f6794c55c34d77e618210238a73bfa1
Author: Wes Hardaker <harda...@users.sourceforge.net>
Date:   Wed Feb 19 15:21:57 2014 -0800

    bug fix from fenner: fix ICMP mib table handling on linux

diff --git a/agent/mibgroup/mibII/icmp.c b/agent/mibgroup/mibII/icmp.c
index af63395..e43380a 100644
--- a/agent/mibgroup/mibII/icmp.c
+++ b/agent/mibgroup/mibII/icmp.c
@@ -103,10 +103,20 @@ struct icmp_msg_stats_table_entry {
         int flags;
 };
 
+#ifdef linux
+/* Linux keeps track of all possible message types */
+#define ICMP_MSG_STATS_IPV4_COUNT 256
+#else
 #define ICMP_MSG_STATS_IPV4_COUNT 11
+#endif
 
 #ifdef NETSNMP_ENABLE_IPV6
+#ifdef linux
+/* Linux keeps track of all possible message types */
+#define ICMP_MSG_STATS_IPV6_COUNT 256
+#else
 #define ICMP_MSG_STATS_IPV6_COUNT 14
+#endif
 #else
 #define ICMP_MSG_STATS_IPV6_COUNT 0
 #endif /* NETSNMP_ENABLE_IPV6 */
@@ -172,7 +182,7 @@ icmp_msg_stats_load(netsnmp_cache *cache, void *vmagic)
     inc = 0;
     linux_read_icmp_msg_stat(&v4icmp, &v4icmpmsg, &flag);
     if (flag) {
-        while (254 != k) {
+        while (255 >= k) {
             if (v4icmpmsg.vals[k].InType) {
                 icmp_msg_stats_table[i].ipVer = 1;
                 icmp_msg_stats_table[i].icmpMsgStatsType = k;
@@ -262,7 +272,7 @@ icmp_msg_stats_load(netsnmp_cache *cache, void *vmagic)
     inc = 0;
     linux_read_icmp6_msg_stat(&v6icmp, &v6icmpmsg, &flag);
     if (flag) {
-        while (254 != k) {
+        while (255 >= k) {
             if (v6icmpmsg.vals[k].InType) {
                 icmp_msg_stats_table[i].ipVer = 2;
                 icmp_msg_stats_table[i].icmpMsgStatsType = k;
@@ -1059,6 +1069,12 @@ icmp_stats_table_handler(netsnmp_mib_handler  *handler,
                                        continue;
                                table_info = 
netsnmp_extract_table_info(request);
                                subid      = table_info->colnum;
+                               DEBUGMSGTL(( "mibII/icmpStatsTable", "oid: " ));
+                               DEBUGMSGOID(( "mibII/icmpStatsTable", 
request->requestvb->name,
+                                                
request->requestvb->name_length ));
+                               DEBUGMSG(( "mibII/icmpStatsTable", " In %d 
InErr %d Out %d OutErr %d\n",
+                                             entry->icmpStatsInMsgs, 
entry->icmpStatsInErrors,
+                                             entry->icmpStatsOutMsgs, 
entry->icmpStatsOutErrors ));
 
                                switch (subid) {
                                        case ICMP_STAT_INMSG:
@@ -1124,6 +1140,11 @@ icmp_msg_stats_table_handler(netsnmp_mib_handler         
 *handler,
                     continue;
                 table_info = netsnmp_extract_table_info(request);
                 subid = table_info->colnum;
+                DEBUGMSGTL(( "mibII/icmpMsgStatsTable", "oid: " ));
+                DEBUGMSGOID(( "mibII/icmpMsgStatsTable", 
request->requestvb->name,
+                                 request->requestvb->name_length ));
+                DEBUGMSG(( "mibII/icmpMsgStatsTable", " In %d Out %d Flags 
0x%x\n",
+                                 entry->icmpMsgStatsInPkts, 
entry->icmpMsgStatsOutPkts, entry->flags ));
 
                 switch (subid) {
                     case ICMP_MSG_STAT_IN_PKTS:
diff --git a/agent/mibgroup/mibII/kernel_linux.c 
b/agent/mibgroup/mibII/kernel_linux.c
index 397365c..26b899c 100644
--- a/agent/mibgroup/mibII/kernel_linux.c
+++ b/agent/mibgroup/mibII/kernel_linux.c
@@ -76,9 +76,9 @@ decode_icmp_msg(char *line, char *data, struct icmp4_msg_mib 
*msg)
             index = strtol(token, &delim, 0);
             if (ERANGE == errno) {
                 continue;
-            } else if (index > LONG_MAX) {
+            } else if (index > 255) {
                 continue;
-            } else if (index < LONG_MIN) {
+            } else if (index < 0) {
                 continue;
             }
             if (NULL == (token = strtok_r(dataptr, " ", &saveptr1)))
@@ -89,9 +89,9 @@ decode_icmp_msg(char *line, char *data, struct icmp4_msg_mib 
*msg)
             index = strtol(token, &delim, 0);
             if (ERANGE == errno) {
                 continue;
-            } else if (index > LONG_MAX) {
+            } else if (index > 255) {
                 continue;
-            } else if (index < LONG_MIN) {
+            } else if (index < 0) {
                 continue;
             }
             if(NULL == (token = strtok_r(dataptr, " ", &saveptr1)))
@@ -419,14 +419,21 @@ linux_read_icmp6_parse(struct icmp6_mib *icmp6stat,
 
         vals = name;
         if (NULL != icmp6msgstat) {
+            int type;
             if (0 == strncmp(name, "Icmp6OutType", 12)) {
                 strsep(&vals, "e");
-                icmp6msgstat->vals[atoi(vals)].OutType = stats;
+                type = atoi(vals);
+                if ( type < 0 || type > 255 )
+                    continue;
+                icmp6msgstat->vals[type].OutType = stats;
                 *support = 1;
                 continue;
             } else if (0 == strncmp(name, "Icmp6InType", 11)) {
                 strsep(&vals, "e");
-                icmp6msgstat->vals[atoi(vals)].InType = stats;
+                type = atoi(vals);
+                if ( type < 0 || type > 255 )
+                    continue;
+                icmp6msgstat->vals[type].InType = stats;
                 *support = 1;
                 continue;
             }
diff --git a/agent/mibgroup/mibII/kernel_linux.h 
b/agent/mibgroup/mibII/kernel_linux.h
index 6bf5d47..c6dfca9 100644
--- a/agent/mibgroup/mibII/kernel_linux.h
+++ b/agent/mibgroup/mibII/kernel_linux.h
@@ -121,11 +121,11 @@ struct icmp_msg_mib {
 
 /* Lets use wrapper structures for future expansion */
 struct icmp4_msg_mib {
-    struct icmp_msg_mib vals[255];
+    struct icmp_msg_mib vals[256];
 };
 
 struct icmp6_msg_mib {
-    struct icmp_msg_mib vals[255];
+    struct icmp_msg_mib vals[256];
 };
 
 struct udp_mib {
++++++ net-snmp-5.7.2-fix-perl-trap-handler.patch ++++++
commit 76e8d6d100320629d8a23be4b0128619600c919d
Author: Jan Safranek <jsafra...@users.sourceforge.net>
Date:   Thu Mar 6 09:21:51 2014 +0100

    CHANGES: snmpd: PATCH: 1275: from Viliam Púčik: fixed Perl trap handler 
when processing trap with empty community string.

diff --git a/perl/TrapReceiver/TrapReceiver.xs 
b/perl/TrapReceiver/TrapReceiver.xs
index e11ef27..8713efd 100644
--- a/perl/TrapReceiver/TrapReceiver.xs
+++ b/perl/TrapReceiver/TrapReceiver.xs
@@ -81,18 +81,18 @@ int   perl_trapd_handler( netsnmp_pdu           *pdu,
         STOREPDUi("securitymodel", pdu->securityModel);
         STOREPDUi("securitylevel", pdu->securityLevel);
         STOREPDU("contextName",
-                 newSVpv(pdu->contextName, pdu->contextNameLen));
+                 newSVpv(pdu->contextName ? pdu->contextName : "", 
pdu->contextNameLen));
         STOREPDU("contextEngineID",
-                 newSVpv((char *) pdu->contextEngineID,
+                 newSVpv(pdu->contextEngineID ? (char *) pdu->contextEngineID 
: "",
                                     pdu->contextEngineIDLen));
         STOREPDU("securityEngineID",
-                 newSVpv((char *) pdu->securityEngineID,
+                 newSVpv(pdu->securityEngineID ? (char *) 
pdu->securityEngineID : "",
                                     pdu->securityEngineIDLen));
         STOREPDU("securityName",
-                 newSVpv((char *) pdu->securityName, pdu->securityNameLen));
+                 newSVpv(pdu->securityName ? (char *) pdu->securityName : "", 
pdu->securityNameLen));
     } else {
         STOREPDU("community",
-                 newSVpv((char *) pdu->community, pdu->community_len));
+                 newSVpv(pdu->community ? (char *) pdu->community : "", 
pdu->community_len));
     }
 
     if (transport && transport->f_fmtaddr) {
++++++ net-snmp-5.7.2-fix-snmpd-crashing-when-an-agentx-disconnects.patch ++++++
commit f9304c83f76202db0e684269ca1af32e43cd9db4
Author: Jan Safranek <jsafra...@users.sourceforge.net>
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.

Index: net-snmp-5.7.2/agent/mibgroup/agentx/master.c
===================================================================
--- net-snmp-5.7.2.orig/agent/mibgroup/agentx/master.c
+++ net-snmp-5.7.2/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_handle
     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;
Index: net-snmp-5.7.2/agent/mibgroup/agentx/master_admin.c
===================================================================
--- net-snmp-5.7.2.orig/agent/mibgroup/agentx/master_admin.c
+++ net-snmp-5.7.2/agent/mibgroup/agentx/master_admin.c
@@ -133,11 +133,16 @@ close_agentx_session(netsnmp_session * s
          * 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"));
+               }
             }
         }
                 
++++++ net-snmp-5.7.2-fix-snmptrapd-remote-denial-of-service.patch ++++++
commit 74ab608f60fe6130e6e1eb37b29b0efe9c9c2293
Author: Jan Safranek <jsafra...@users.sourceforge.net>
Date:   Thu Jul 31 13:46:49 2014 +0200

    Added checks for printing variables with wrong types.
    
    When -OQ command line argument is used, variable formatter preffers the type
    of the varible parsed from a MIB file instead of checking type of the 
variable
    as parsed from SNMP message.
    
    This can lead to crashes when incoming packets contains a variable with
    NULL type, while the MIB says the variable should be non-NULL, like Integer.
    The formatter then tries to interpret the NULL (from packet) as Integer 
(from
    MIB file).

diff --git a/snmplib/mib.c b/snmplib/mib.c
index 9d3ca41..c6e0010 100644
--- a/snmplib/mib.c
+++ b/snmplib/mib.c
@@ -439,17 +439,16 @@ sprint_realloc_octet_string(u_char ** buf, size_t * 
buf_len,
     u_char         *cp;
     int             output_format, cnt;
 
-    if ((var->type != ASN_OCTET_STR) && 
-        (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, 
NETSNMP_DS_LIB_QUICKE_PRINT))) {
-        const char      str[] = "Wrong Type (should be OCTET STRING): ";
-        if (snmp_cstrcat
-            (buf, buf_len, out_len, allow_realloc, str)) {
-            return sprint_realloc_by_type(buf, buf_len, out_len,
+    if (var->type != ASN_OCTET_STR) {
+        if (!netsnmp_ds_get_boolean(
+                    NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
+            const char      str[] = "Wrong Type (should be OCTET STRING): ";
+            if (!snmp_cstrcat(buf, buf_len, out_len, allow_realloc, str))
+                return 0;
+        }
+        return sprint_realloc_by_type(buf, buf_len, out_len,
                                           allow_realloc, var, NULL, NULL,
                                           NULL);
-        } else {
-            return 0;
-        }
     }
 
 
@@ -702,16 +701,16 @@ sprint_realloc_float(u_char ** buf, size_t * buf_len,
                      const struct enum_list *enums,
                      const char *hint, const char *units)
 {
-    if ((var->type != ASN_OPAQUE_FLOAT) &&
-        (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, 
NETSNMP_DS_LIB_QUICKE_PRINT))) {
-        if (snmp_cstrcat(buf, buf_len, out_len, allow_realloc, 
-                         "Wrong Type (should be Float): ")) {
-            return sprint_realloc_by_type(buf, buf_len, out_len,
+    if (var->type != ASN_OPAQUE_FLOAT) {
+        if (!netsnmp_ds_get_boolean(
+                NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
+            u_char          str[] = "Wrong Type (should be Float): ";
+            if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
+                return 0;
+        }
+        return sprint_realloc_by_type(buf, buf_len, out_len,
                                           allow_realloc, var, NULL, NULL,
                                           NULL);
-        } else {
-            return 0;
-        }
     }
 
     if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, 
NETSNMP_DS_LIB_QUICK_PRINT)) {
@@ -772,17 +771,16 @@ sprint_realloc_double(u_char ** buf, size_t * buf_len,
                       const struct enum_list *enums,
                       const char *hint, const char *units)
 {
-    if ((var->type != ASN_OPAQUE_DOUBLE) && 
-        (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, 
NETSNMP_DS_LIB_QUICKE_PRINT))) {
-        if (snmp_cstrcat
-            (buf, buf_len, out_len, allow_realloc, 
-             "Wrong Type (should be Double): ")) {
-            return sprint_realloc_by_type(buf, buf_len, out_len,
+    if (var->type != ASN_OPAQUE_DOUBLE) {
+        if (!netsnmp_ds_get_boolean(
+                NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
+            u_char          str[] = "Wrong Type (should be Double): ";
+            if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
+                return 0;
+        }
+        return sprint_realloc_by_type(buf, buf_len, out_len,
                                           allow_realloc, var, NULL, NULL,
                                           NULL);
-        } else {
-            return 0;
-        }
     }
 
     if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, 
NETSNMP_DS_LIB_QUICK_PRINT)) {
@@ -847,20 +845,21 @@ sprint_realloc_counter64(u_char ** buf, size_t * buf_len, 
size_t * out_len,
 {
     char            a64buf[I64CHARSZ + 1];
 
-    if ((var->type != ASN_COUNTER64
+    if (var->type != ASN_COUNTER64
 #ifdef NETSNMP_WITH_OPAQUE_SPECIAL_TYPES
         && var->type != ASN_OPAQUE_COUNTER64
         && var->type != ASN_OPAQUE_I64 && var->type != ASN_OPAQUE_U64
 #endif
-        ) && (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, 
NETSNMP_DS_LIB_QUICKE_PRINT))) {
-        if (snmp_cstrcat(buf, buf_len, out_len, allow_realloc, 
-                        "Wrong Type (should be Counter64): ")) {
-            return sprint_realloc_by_type(buf, buf_len, out_len,
+        ) {
+        if (!netsnmp_ds_get_boolean(
+                NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
+            u_char          str[] = "Wrong Type (should be Counter64): ";
+            if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
+                return 0;
+        }
+        return sprint_realloc_by_type(buf, buf_len, out_len,
                                           allow_realloc, var, NULL, NULL,
                                           NULL);
-        } else {
-            return 0;
-        }
     }
 
     if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, 
NETSNMP_DS_LIB_QUICK_PRINT)) {
@@ -948,23 +947,25 @@ sprint_realloc_opaque(u_char ** buf, size_t * buf_len,
                       const struct enum_list *enums,
                       const char *hint, const char *units)
 {
-    if ((var->type != ASN_OPAQUE
+    if (var->type != ASN_OPAQUE
 #ifdef NETSNMP_WITH_OPAQUE_SPECIAL_TYPES
         && var->type != ASN_OPAQUE_COUNTER64
         && var->type != ASN_OPAQUE_U64
         && var->type != ASN_OPAQUE_I64
         && var->type != ASN_OPAQUE_FLOAT && var->type != ASN_OPAQUE_DOUBLE
 #endif                          /* NETSNMP_WITH_OPAQUE_SPECIAL_TYPES */
-        ) && (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, 
NETSNMP_DS_LIB_QUICKE_PRINT))) {
-        if (snmp_cstrcat(buf, buf_len, out_len, allow_realloc, 
-                         "Wrong Type (should be Opaque): ")) {
-            return sprint_realloc_by_type(buf, buf_len, out_len,
+        ) {
+        if (!netsnmp_ds_get_boolean(
+                NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
+            u_char          str[] = "Wrong Type (should be Opaque): ";
+            if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
+                return 0;
+        }
+        return sprint_realloc_by_type(buf, buf_len, out_len,
                                           allow_realloc, var, NULL, NULL,
                                           NULL);
-        } else {
-            return 0;
-        }
     }
+
 #ifdef NETSNMP_WITH_OPAQUE_SPECIAL_TYPES
     switch (var->type) {
     case ASN_OPAQUE_COUNTER64:
@@ -1040,17 +1041,16 @@ sprint_realloc_object_identifier(u_char ** buf, size_t 
* buf_len,
 {
     int             buf_overflow = 0;
 
-    if ((var->type != ASN_OBJECT_ID) &&
-        (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, 
NETSNMP_DS_LIB_QUICKE_PRINT))) {
-        u_char          str[] =
-            "Wrong Type (should be OBJECT IDENTIFIER): ";
-        if (snmp_strcat(buf, buf_len, out_len, allow_realloc, str)) {
-            return sprint_realloc_by_type(buf, buf_len, out_len,
+    if (var->type != ASN_OBJECT_ID) {
+        if (!netsnmp_ds_get_boolean(
+                NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
+            u_char          str[] = "Wrong Type (should be OBJECT IDENTIFIER): 
";
+            if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
+                return 0;
+        }
+        return sprint_realloc_by_type(buf, buf_len, out_len,
                                           allow_realloc, var, NULL, NULL,
                                           NULL);
-        } else {
-            return 0;
-        }
     }
 
     if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, 
NETSNMP_DS_LIB_QUICK_PRINT)) {
@@ -1110,16 +1110,16 @@ sprint_realloc_timeticks(u_char ** buf, size_t * 
buf_len, size_t * out_len,
 {
     char            timebuf[40];
 
-    if ((var->type != ASN_TIMETICKS) && 
-        (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, 
NETSNMP_DS_LIB_QUICKE_PRINT))) {
-        u_char          str[] = "Wrong Type (should be Timeticks): ";
-        if (snmp_strcat(buf, buf_len, out_len, allow_realloc, str)) {
-            return sprint_realloc_by_type(buf, buf_len, out_len,
+    if (var->type != ASN_TIMETICKS) {
+        if (!netsnmp_ds_get_boolean(
+                NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
+            u_char          str[] = "Wrong Type (should be Timeticks): ";
+            if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
+                return 0;
+        }
+        return sprint_realloc_by_type(buf, buf_len, out_len,
                                           allow_realloc, var, NULL, NULL,
                                           NULL);
-        } else {
-            return 0;
-        }
     }
 
     if (netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, 
NETSNMP_DS_LIB_NUMERIC_TIMETICKS)) {
@@ -1277,17 +1277,18 @@ sprint_realloc_integer(u_char ** buf, size_t * buf_len, 
size_t * out_len,
 {
     char           *enum_string = NULL;
 
-    if ((var->type != ASN_INTEGER) && 
-        (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, 
NETSNMP_DS_LIB_QUICKE_PRINT))) {
-        u_char          str[] = "Wrong Type (should be INTEGER): ";
-        if (snmp_strcat(buf, buf_len, out_len, allow_realloc, str)) {
-            return sprint_realloc_by_type(buf, buf_len, out_len,
+    if (var->type != ASN_INTEGER) {
+        if (!netsnmp_ds_get_boolean(
+                NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
+            u_char          str[] = "Wrong Type (should be INTEGER): ";
+            if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
+                return 0;
+        }
+        return sprint_realloc_by_type(buf, buf_len, out_len,
                                           allow_realloc, var, NULL, NULL,
                                           NULL);
-        } else {
-            return 0;
-        }
     }
+
     for (; enums; enums = enums->next) {
         if (enums->value == *var->val.integer) {
             enum_string = enums->label;
@@ -1380,16 +1381,16 @@ sprint_realloc_uinteger(u_char ** buf, size_t * 
buf_len, size_t * out_len,
 {
     char           *enum_string = NULL;
 
-    if ((var->type != ASN_UINTEGER) && 
-        (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, 
NETSNMP_DS_LIB_QUICKE_PRINT))) {
-        u_char          str[] = "Wrong Type (should be UInteger32): ";
-        if (snmp_strcat(buf, buf_len, out_len, allow_realloc, str)) {
-            return sprint_realloc_by_type(buf, buf_len, out_len,
+    if (var->type != ASN_UINTEGER) {
+        if (!netsnmp_ds_get_boolean(
+                NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
+            u_char          str[] = "Wrong Type (should be UInteger32): ";
+            if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
+                return 0;
+        }
+        return sprint_realloc_by_type(buf, buf_len, out_len,
                                           allow_realloc, var, NULL, NULL,
                                           NULL);
-        } else {
-            return 0;
-        }
     }
 
     for (; enums; enums = enums->next) {
@@ -1477,17 +1478,16 @@ sprint_realloc_gauge(u_char ** buf, size_t * buf_len, 
size_t * out_len,
 {
     char            tmp[32];
 
-    if ((var->type != ASN_GAUGE) && 
-        (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, 
NETSNMP_DS_LIB_QUICKE_PRINT))) {
-        u_char          str[] =
-            "Wrong Type (should be Gauge32 or Unsigned32): ";
-        if (snmp_strcat(buf, buf_len, out_len, allow_realloc, str)) {
-            return sprint_realloc_by_type(buf, buf_len, out_len,
+    if (var->type != ASN_GAUGE) {
+        if (!netsnmp_ds_get_boolean(
+                NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
+            u_char          str[] = "Wrong Type (should be Gauge32 or 
Unsigned32): ";
+            if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
+                return 0;
+        }
+        return sprint_realloc_by_type(buf, buf_len, out_len,
                                           allow_realloc, var, NULL, NULL,
                                           NULL);
-        } else {
-            return 0;
-        }
     }
 
     if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, 
NETSNMP_DS_LIB_QUICK_PRINT)) {
@@ -1550,16 +1550,16 @@ sprint_realloc_counter(u_char ** buf, size_t * buf_len, 
size_t * out_len,
 {
     char            tmp[32];
 
-    if ((var->type != ASN_COUNTER) && 
-        (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, 
NETSNMP_DS_LIB_QUICKE_PRINT))) {
-        u_char          str[] = "Wrong Type (should be Counter32): ";
-        if (snmp_strcat(buf, buf_len, out_len, allow_realloc, str)) {
-            return sprint_realloc_by_type(buf, buf_len, out_len,
+    if (var->type != ASN_COUNTER) {
+        if (!netsnmp_ds_get_boolean(
+                NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
+            u_char          str[] = "Wrong Type (should be Counter32): ";
+            if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
+                return 0;
+        }
+        return sprint_realloc_by_type(buf, buf_len, out_len,
                                           allow_realloc, var, NULL, NULL,
                                           NULL);
-        } else {
-            return 0;
-        }
     }
 
     if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, 
NETSNMP_DS_LIB_QUICK_PRINT)) {
@@ -1613,16 +1613,16 @@ sprint_realloc_networkaddress(u_char ** buf, size_t * 
buf_len,
 {
     size_t          i;
 
-    if ((var->type != ASN_IPADDRESS) && 
-        (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, 
NETSNMP_DS_LIB_QUICKE_PRINT))) {
-        u_char          str[] = "Wrong Type (should be NetworkAddress): ";
-        if (snmp_strcat(buf, buf_len, out_len, allow_realloc, str)) {
-            return sprint_realloc_by_type(buf, buf_len, out_len,
+    if (var->type != ASN_IPADDRESS) {
+        if (!netsnmp_ds_get_boolean(
+                NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
+            u_char          str[] = "Wrong Type (should be NetworkAddress): ";
+            if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
+                return 0;
+        }
+        return sprint_realloc_by_type(buf, buf_len, out_len,
                                           allow_realloc, var, NULL, NULL,
                                           NULL);
-        } else {
-            return 0;
-        }
     }
 
     if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, 
NETSNMP_DS_LIB_QUICK_PRINT)) {
@@ -1679,16 +1679,16 @@ sprint_realloc_ipaddress(u_char ** buf, size_t * 
buf_len, size_t * out_len,
 {
     u_char         *ip = var->val.string;
 
-    if ((var->type != ASN_IPADDRESS) && 
-        (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, 
NETSNMP_DS_LIB_QUICKE_PRINT))) {
-        u_char          str[] = "Wrong Type (should be IpAddress): ";
-        if (snmp_strcat(buf, buf_len, out_len, allow_realloc, str)) {
-            return sprint_realloc_by_type(buf, buf_len, out_len,
+    if (var->type != ASN_IPADDRESS) {
+        if (!netsnmp_ds_get_boolean(
+                NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
+            u_char          str[] = "Wrong Type (should be IpAddress): ";
+            if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
+                return 0;
+        }
+        return sprint_realloc_by_type(buf, buf_len, out_len,
                                           allow_realloc, var, NULL, NULL,
                                           NULL);
-        } else {
-            return 0;
-        }
     }
 
     if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, 
NETSNMP_DS_LIB_QUICK_PRINT)) {
@@ -1737,20 +1737,20 @@ sprint_realloc_null(u_char ** buf, size_t * buf_len, 
size_t * out_len,
                     const struct enum_list *enums,
                     const char *hint, const char *units)
 {
-    if ((var->type != ASN_NULL) && 
-        (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, 
NETSNMP_DS_LIB_QUICKE_PRINT))) {
-        u_char          str[] = "Wrong Type (should be NULL): ";
-        if (snmp_strcat(buf, buf_len, out_len, allow_realloc, str)) {
-            return sprint_realloc_by_type(buf, buf_len, out_len,
+    if (var->type != ASN_NULL) {
+        if (!netsnmp_ds_get_boolean(
+                NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
+            u_char          str[] = "Wrong Type (should be NULL): ";
+            if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
+                return 0;
+        }
+        return sprint_realloc_by_type(buf, buf_len, out_len,
                                           allow_realloc, var, NULL, NULL,
                                           NULL);
-        } else {
-            return 0;
-        }
-    } else {
-        u_char          str[] = "NULL";
-        return snmp_strcat(buf, buf_len, out_len, allow_realloc, str);
     }
+
+    u_char          str[] = "NULL";
+    return snmp_strcat(buf, buf_len, out_len, allow_realloc, str);
 }
 
 
@@ -1785,16 +1785,16 @@ sprint_realloc_bitstring(u_char ** buf, size_t * 
buf_len, size_t * out_len,
     u_char         *cp;
     char           *enum_string;
 
-    if ((var->type != ASN_BIT_STR && var->type != ASN_OCTET_STR) &&
-        (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, 
NETSNMP_DS_LIB_QUICKE_PRINT))) {
-        u_char          str[] = "Wrong Type (should be BITS): ";
-        if (snmp_strcat(buf, buf_len, out_len, allow_realloc, str)) {
-            return sprint_realloc_by_type(buf, buf_len, out_len,
+    if (var->type != ASN_BIT_STR && var->type != ASN_OCTET_STR) {
+        if (!netsnmp_ds_get_boolean(
+                NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
+            u_char          str[] = "Wrong Type (should be BITS): ";
+            if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
+                return 0;
+        }
+        return sprint_realloc_by_type(buf, buf_len, out_len,
                                           allow_realloc, var, NULL, NULL,
                                           NULL);
-        } else {
-            return 0;
-        }
     }
 
     if (netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, 
NETSNMP_DS_LIB_QUICK_PRINT)) {
@@ -1869,16 +1869,16 @@ sprint_realloc_nsapaddress(u_char ** buf, size_t * 
buf_len,
                            const struct enum_list *enums, const char *hint,
                            const char *units)
 {
-    if ((var->type != ASN_NSAP) && 
-        (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, 
NETSNMP_DS_LIB_QUICKE_PRINT))) {
-        u_char          str[] = "Wrong Type (should be NsapAddress): ";
-        if (snmp_strcat(buf, buf_len, out_len, allow_realloc, str)) {
-            return sprint_realloc_by_type(buf, buf_len, out_len,
+    if (var->type != ASN_NSAP) {
+        if (!netsnmp_ds_get_boolean(
+                NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_QUICKE_PRINT)) {
+            u_char          str[] = "Wrong Type (should be NsapAddress): ";
+            if (!snmp_strcat(buf, buf_len, out_len, allow_realloc, str))
+                return 0;
+        }
+        return sprint_realloc_by_type(buf, buf_len, out_len,
                                           allow_realloc, var, NULL, NULL,
                                           NULL);
-        } else {
-            return 0;
-        }
     }
 
     if (!netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, 
NETSNMP_DS_LIB_QUICK_PRINT)) {

++++++ net-snmp-5.7.2-net-snmp-config-headercheck.patch ++++++
Index: net-snmp-5.7.2/net-snmp-config.in
===================================================================
--- net-snmp-5.7.2.orig/net-snmp-config.in
+++ net-snmp-5.7.2/net-snmp-config.in
@@ -41,6 +41,14 @@ count()
     echo $#
 }
 
+check_devel_files()
+{
+    if [ ! -e "${NSC_INCDIR}/net-snmp/net-snmp-config.h" ] ; then
+        echo "Can not find \"${NSC_INCDIR}/net-snmp/net-snmp-config.h\". The 
net-snmp development files seems to be missing. Exiting" >&2
+       # exit 2
+    fi
+}
+
 prefix=@prefix@
 exec_prefix=@exec_prefix@
 includedir=@includedir@
@@ -138,9 +146,11 @@ else
       ;;
     #################################################### compile
     --base-cflags)
+      check_devel_files
       echo @CFLAGS@ @CPPFLAGS@ -I${NSC_INCLUDEDIR}
       ;;
     --cflags|--cf*)
+      check_devel_files
       echo @CFLAGS@ @DEVFLAGS@ @CPPFLAGS@ -I. -I${NSC_INCLUDEDIR}
       ;;
     --srcdir)
@@ -151,6 +161,7 @@ else
       echo $NSC_LIBDIR
       ;;
     --ldflags|--ld*)
+      check_devel_files
       echo $NSC_LDFLAGS
       ;;
     --build-lib-dirs)
@@ -188,29 +199,37 @@ else
     #################################################### client lib
     --libs)
       # use this one == --netsnmp-libs + --external-libs
+      check_devel_files
       echo $NSC_LDFLAGS $NSC_LIBDIR $NSC_SNMPLIBS $NSC_LIBS
       ;;
     --netsnmp-libs)
+      check_devel_files
       echo $NSC_LIBDIR $NSC_BASE_SNMP_LIBS
       ;;
     --external-libs)
+      check_devel_files
       echo $NSC_LDFLAGS $NSC_LNETSNMPLIBS $NSC_LIBS @PERLLDOPTS_FOR_APPS@
       ;;
     #################################################### agent lib
     --base-agent-libs)
+      check_devel_files
       echo $NSC_BASE_AGENT_LIBS
       ;;
     --base-subagent-libs)
+      check_devel_files
       echo $NSC_BASE_SUBAGENT_LIBS
       ;;
     --agent-libs)
       # use this one == --netsnmp-agent-libs + --external-libs
+      check_devel_files
       echo $NSC_LDFLAGS $NSC_LIBDIR $NSC_AGENTLIBS $NSC_LIBS
       ;;
     --netsnmp-agent-libs)
+      check_devel_files
       echo $NSC_LIBDIR $NSC_BASE_AGENT_LIBS
       ;;
     --external-agent-libs)
+      check_devel_files
       echo $NSC_LDFLAGS $NSC_LMIBLIBS $NSC_LAGENTLIBS $NSC_LNETSNMPLIBS 
$NSC_LIBS
       ;;
     ####################################################
@@ -236,6 +255,7 @@ else
 
     ####################################################
     --compile-subagent)
+      check_devel_files
       shift
       shifted=1
       while test "x$done" = "x" -a "x$1" != "x" ; do
++++++ net-snmp-5.7.2-perl-tk-warning.patch ++++++
Index: net-snmp-5.7.2/local/tkmib
===================================================================
--- net-snmp-5.7.2.orig/local/tkmib
+++ net-snmp-5.7.2/local/tkmib
@@ -27,10 +27,9 @@ instructions.
 
 if (!$havetk) {
     print "
-ERROR:  You don't have the Tk module installed.  You should be able to
-install this by running (as root):
+ERROR:  You don't have the Tk module installed.
 
-    perl -MCPAN -e 'install Tk'
+    Please install the perl-Tk package.
 ";
 }
 
++++++ net-snmp-5.7.2-pie.patch ++++++
Index: net-snmp-5.7.2/agent/Makefile.in
===================================================================
--- net-snmp-5.7.2.orig/agent/Makefile.in
+++ net-snmp-5.7.2/agent/Makefile.in
@@ -294,7 +294,7 @@ getmibstat.o: mibgroup/kernel_sunos5.c
        $(CC) $(CFLAGS) -o $@ -D_GETMIBSTAT_TEST -DDODEBUG -c $? 
 
 snmpd$(EXEEXT):        ${LAGENTOBJS} $(USELIBS) $(AGENTLIB) $(HELPERLIB) 
$(MIBLIB) $(LIBTARG) 
-       $(LINK) $(CFLAGS) -o $@ ${LAGENTOBJS} ${LDFLAGS} ${OUR_AGENT_LIBS}
+       $(LINK) $(CFLAGS) -o $@ -pie ${LAGENTOBJS} ${LDFLAGS} ${OUR_AGENT_LIBS}
 
 libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION):    ${LLIBAGENTOBJS} $(USELIBS)
        $(LIB_LD_CMD) $(AGENTLIB) ${LLIBAGENTOBJS} $(USELIBS) ${LAGENTLIBS} 
@LD_NO_UNDEFINED@ $(LDFLAGS) $(PERLLDOPTS_FOR_LIBS) $(LIB_LD_LIBS) @AGENTLIBS@
Index: net-snmp-5.7.2/apps/Makefile.in
===================================================================
--- net-snmp-5.7.2.orig/apps/Makefile.in
+++ net-snmp-5.7.2/apps/Makefile.in
@@ -170,7 +170,7 @@ snmptest$(EXEEXT):    snmptest.$(OSUFFIX
        $(LINK) ${CFLAGS} -o $@ snmptest.$(OSUFFIX) ${LDFLAGS} ${LIBS}
 
 snmptrapd$(EXEEXT):    $(TRAPD_OBJECTS) $(USETRAPLIBS) $(INSTALLLIBS)
-       $(LINK) ${CFLAGS} -o $@ $(TRAPD_OBJECTS) $(INSTALLLIBS) ${LDFLAGS} 
${TRAPLIBS}
+       $(LINK) ${CFLAGS} -o $@ -pie $(TRAPD_OBJECTS) $(INSTALLLIBS) ${LDFLAGS} 
${TRAPLIBS}
 
 snmptrap$(EXEEXT):    snmptrap.$(OSUFFIX) $(USELIBS)
        $(LINK) ${CFLAGS} -o $@ snmptrap.$(OSUFFIX) ${LDFLAGS} ${LIBS}
++++++ net-snmp-5.7.2-socket-path.patch ++++++
Index: net-snmp-5.7.2/agent/mibgroup/agentx/protocol.h
===================================================================
--- net-snmp-5.7.2.orig/agent/mibgroup/agentx/protocol.h
+++ net-snmp-5.7.2/agent/mibgroup/agentx/protocol.h
@@ -13,7 +13,7 @@ extern          "C" {
 
 #define AGENTX_PORT    705
 #ifndef NETSNMP_AGENTX_SOCKET
-#define NETSNMP_AGENTX_SOCKET  "/var/agentx/master"
+#define NETSNMP_AGENTX_SOCKET  "/var/run/agentx/master"
 #endif
 
     /*
++++++ net-snmp-5.7.2-testing-empty-arptable.patch ++++++
Index: net-snmp-5.7.2/testing/rfc1213/snmpfun.sh
===================================================================
--- net-snmp-5.7.2.orig/testing/rfc1213/snmpfun.sh
+++ net-snmp-5.7.2/testing/rfc1213/snmpfun.sh
@@ -1,4 +1,3 @@
-
 # functions used by RFC-1213 MIB test modules
 
 myport=$SNMP_TRANSPORT_SPEC:$SNMP_TEST_DEST$SNMP_SNMPD_PORT
@@ -11,6 +10,23 @@ else
    TEST_AUTHPRIV_PARMS="-l authNoPriv -a MD5 -A testpass"
 fi
 
+check_skip_arp_tests ()
+{
+       #
+       # skip all tests relying on a filed arp table. e.g. on s390 boxes this
+       # does not have to be the case
+       #
+       TABLE_ENTRIES="at.atTable ip.ipNetToMediaTable"
+       ARP_COUNT=`/sbin/arp | grep -v incomplete | wc -l`
+       for entry in $TABLE_ENTRIES ; do
+               if [ "x$1" == "x$entry" -a $ARP_COUNT == 0 ] ; then
+                       echo "skipping $1, because the arp table is empty." >&2
+                       return 0
+               fi
+       done
+       return 1
+}
+
 config()
 {
        rm -f $SNMP_CONFIG_FILE
@@ -54,25 +70,35 @@ get_snmpv3_variable()
 get_snmp_table()
 {
        test_start "Access table $2 by SNMPv$1..."
-       CAPTURE "snmpgetnext -Of -v $1 -c test $myport $2"
-        CHECKFILE '' "\.$2\."
-        if [ "$snmp_last_test_result" = 0 ] ; then
-               test_finish FAIL
+       check_skip_arp_tests
+       if check_skip_arp_tests "$2" ; then
+               test_finish SKIPPED
        else
-               test_finish PASS
+               CAPTURE "snmpgetnext -Of -v $1 -c test $myport $2"
+               CHECKFILE '' "\.$2\."
+               if [ "$snmp_last_test_result" = 0 ] ; then
+                       test_finish FAIL
+               else
+                       test_finish PASS
+               fi
        fi
 
 }
 
 get_snmpv3_table()
 {
-       test_start "Access table $2 by SNMPv3..."
-       CAPTURE "snmpgetnext -Of -v 3 -u testrwuser $TEST_AUTHPRIV_PARMS 
$myport $2"
-        CHECKFILE '' "\.$2\."
-        if [ "$snmp_last_test_result" = 0 ] ; then
-               test_finish FAIL
+       test_start "Access table $2 by SNMPv3..."
+       if check_skip_arp_tests  "$2" ; then
+               test_finish SKIPPED
        else
-               test_finish PASS
+               CAPTURE "snmpgetnext -Of -v 3 -u testrwuser 
$TEST_AUTHPRIV_PARMS $myport $2"
+               CHECKFILE '' "\.$2\."
+               if [ "$snmp_last_test_result" = 0 ] ; then
+                       test_finish FAIL
+               else
+                       test_finish PASS
+               fi
        fi
 
 }
+
Index: net-snmp-5.7.2/testing/rfc1213/test_fun
===================================================================
--- net-snmp-5.7.2.orig/testing/rfc1213/test_fun
+++ net-snmp-5.7.2/testing/rfc1213/test_fun
@@ -51,6 +51,9 @@ test_finish()
        if [ x$1 == x"PASS" ];then
                pass_num=`expr $pass_num + 1`
                pass_info "PASS\n"
+       elif [ x$1 == x"SKIPPED" ];then
+               pass_num=`expr $pass_num + 1`
+               pass_info "SKIPPED\n"
        else
                fail_num=`expr $fail_num + 1`
                fail_info "FAIL\n"
@@ -66,3 +69,4 @@ summary()
     fi
 }
 
+
++++++ net-snmp-5.7.2-velocity-mib.patch ++++++
++++ 3373 lines (skipped)

++++++ net-snmp-rpmlintrc ++++++
addFilter("net-snmp-devel.* files-duplicate.*man.*")
addFilter("net-snmp.*incoherent-init-script-name")
addFilter("perl-SNMP.* zero-length.*\.bs")
++++++ net-snmp.logrotate ++++++
/var/log/net-snmpd.log {
   compress
   dateext
   maxage 365
   rotate 99
   size=+1024k
   notifempty
   missingok
   create 600 root root
   sharedscripts
   postrotate
       /etc/init.d/snmpd reload ||:
       if [ -x /etc/init.d/snmptrapd ] ; then \
          /etc/init.d/snmptrapd reload ||: ; \
       fi
   endscript

}
++++++ net-snmp.sysconfig ++++++
## Path:        System/Net-SNMP
## Description: Log level of the snmp server.
## Type:        string(!,a,c,e,w,n,i,d,0,1,2,3,4,5,6,7)
## Default:     n
#
# Defines the log level for snmpd.
#
# The default is "n" (5, LOG_NOTICE)
#
SNMPD_LOGLEVEL="n"

## Path:        System/Net-SNMP
## Description: En-/Disables SNMP SMUX support.
## Type:        yesno
## Default:     yes
#
# Setting this to "no" prevents snmpd from binding to TCP port 199.
#
# The default is "yes" to provide backward compatibility.
#
SNMPD_USE_SMUX="yes"

## Path:        System/Net-SNMP
## Description: Connection logging.
## Type:        yesno
## Default:     yes
#
# If this setting is "yes" and $SNMPD_LOGLEVEL is set to "i" (LOG_INFO)
# or "d" (LOG_DEBUG), snmpd will log all successful connections.
#
# Setting it to "no" will prevent this kind of log regardless of the
# configured log level.
#
# The default is "yes" to provide backward compatibility.
#
SNMPD_LOG_SUCCESSFUL_CONNECTIONS="yes"
++++++ rc.snmpd ++++++
#! /bin/sh
# Copyright (c) 1996-2011 SuSE GmbH Nuernberg, Germany.  All rights reserved.
#
# Author: Christopher Mahmood, Remo Behn
#
# /etc/init.d/snmpd
#
### BEGIN INIT INFO
# Provides:            net-snmp snmp
# Required-Start:      $remote_fs
# Should-Start:        $syslog $network
# Required-Stop:       $remote_fs
# Should-Stop:         $syslog $network
# Default-Start:       2 3 5
# Default-Stop:        0 1 6
# Description:         Net-SNMP agent
# Short-Description:   Net-SNMP agent
### END INIT INFO

SNMPD=/usr/sbin/snmpd
AGENTDIR=/usr/lib/net-snmp/agents
SNMPDCONF=/etc/snmp/snmpd.conf
SNMPD_PID=/var/run/snmpd.pid

test -x $SNMPD || exit 5

# Check for existence of needed config file and read it
SNMPD_CONFIG=/etc/sysconfig/net-snmp
test -r $SNMPD_CONFIG || { echo "$SNMPD_CONFIG not existing";
        if [ "$1" = "stop" ]; then exit 0;
        else exit 6; fi; }

# Read config
. $SNMPD_CONFIG

# Shell functions sourced from /etc/rc.status:
#      rc_check         check and set local and overall rc status
#      rc_status        check and set local and overall rc status
#      rc_status -v     ditto but be verbose in local rc status
#      rc_status -v -r  ditto and clear the local rc status
#      rc_failed        set local and overall rc status to failed
#      rc_failed <num>  set local and overall rc status to <num><num>
#      rc_reset         clear local rc status (overall remains)
#      rc_exit          exit appropriate to overall rc status
. /etc/rc.status

# First reset status of this service
rc_reset

# Return values acc. to LSB for all commands but status:
# 0 - success
# 1 - generic or unspecified error
# 2 - invalid or excess argument(s)
# 3 - unimplemented feature (e.g. "reload")
# 4 - insufficient privilege
# 5 - program is not installed
# 6 - program is not configured
# 7 - program is not running
#
# Note that starting an already running service, stopping
# or restarting a not-running service as well as the restart
# with force-reload (in case signalling is not supported) are
# considered a success.

# check whether to enable agentx support and get list of installed
# agents
get_agents()
{
  agents=
  agentargs=''
  for agent in $AGENTDIR/*; do
    test -x $agent || continue
    agents="$agents $agent"
    agentargs="-x /var/run/agentx/master"
  done
}

case "$1" in
    start)
        echo -n "Starting snmpd"
        #
        # do not even try to start if the log file is (2GB-1MB) big.
        # the snmpd doesnt handle LFS properly
        #
        SNMPD_LOGFILE="${SNMPD_LOGFILE:-/var/log/net-snmpd.log}"
        if [ -e "$SNMPD_LOGFILE" ] ; then
        SNMPD_SIZE_LOGFILE="$(stat -c "%s" $SNMPD_LOGFILE)"
        SNMPD_SIZE_MAX="1073741824"
        if [ $SNMPD_SIZE_LOGFILE -gt $SNMPD_SIZE_MAX ] ; then
            echo -e "\n\"$SNMPD_LOGFILE\" is too large. Running 'logrotate' for 
net-snmp." >&2
            /usr/sbin/logrotate /etc/logrotate.d/net-snmp
        fi
        fi
        get_agents
        # Don't add -c /etc/snmp/snmpd.conf, as it is loaded by default.
        if [ $SNMPDCONF = "/etc/snmp/snmpd.conf" ]; then
          SNMPDCONF=""
        else
          SNMPDCONF="-c $SNMPDCONF"
        fi
        case "${SNMPD_USE_SMUX:-yes}" in
          [Nn][Oo])
            SNMPDNOSMUX="-I -smux"
          ;;
        esac
        case "${SNMPD_LOG_SUCCESSFUL_CONNECTIONS:-yes}" in
          [Nn][Oo])
            SNMPDNOTCPWRAPPERLOG="--dontLogTCPWrappersConnects"
          ;;
        esac
        # /var/run can now be mounted as tmpfs
        if [ ! -d /var/run/agentx ]; then
          mkdir -m 0700 /var/run/agentx
        fi
        startproc $SNMPD $SNMPDCONF -r -A -LF ${SNMPD_LOGLEVEL:-n} 
$SNMPD_LOGFILE -p $SNMPD_PID $agentargs $SNMPDNOSMUX $SNMPDNOTCPWRAPPERLOG
        rc_status -v
        rc_reset

        # start all agents
        if test -n "$agents"; then
          usleep 300000
          for agent in $agents; do
            echo -en "\tStarting `basename $agent`"
            startproc -t1 $agent
            rc_status -v ; rc_reset
          done
        fi
        ;;
    stop)
        echo -n "Shutting down snmpd:"
        killproc -TERM $SNMPD
        rc_status -v ; rc_reset
        # we also need to make sure all agents die
        if test -n "$agents"; then
          for agent in $AGENTDIR/*; do
           test -x $agent || continue
           echo -ne "\tShutting down `basename $agent`:"
           killproc $agent
           rc_status -v ; rc_reset
        done
        fi
        ;;
    try-restart)
        $0 status >/dev/null &&  $0 restart
        rc_status
        ;;
    restart)
        $0 stop
        $0 start
        rc_status
        ;;
    force-reload)
        echo -n "Reload service snmpd:"
        killproc -HUP $SNMPD
        rc_status -v
        ;;
    reload)
        echo -n "Reload service snmpd:"
        killproc -HUP $SNMPD
        rc_status -v
        ;;
    status)
        echo -n "Checking for service snmpd:"
        checkproc $SNMPD
        rc_status -v
        get_agents
        if test -n "$agents"; then
          echo -e "Checking for agents:"

          for agent in $agents; do
            echo -en "\t`basename $agent`"
            checkproc $agent
            rc_status -v
      done
        fi
        ;;
    *)
        echo "Usage: $0 
{start|stop|try-restart|restart|force-reload|reload|status}"
        exit 1
        ;;
esac
rc_exit

++++++ rc.snmptrapd ++++++
#! /bin/sh
# Copyright (c) 1996-2011 SuSE GmbH Nuernberg, Germany. All rights reserved.
#
# Author: Christopher Mahmood
#
# /etc/init.d/snmptrapd
#
### BEGIN INIT INFO
# Provides:            snmptrapd
# Required-Start:      $network
# Required-Stop:       $network
# Default-Start:       2 3 5
# Default-Stop:        0 1 6
# Description:         Receive and log SNMP trap messages
# Short-Description:   Receive and log SNMP trap messages
### END INIT INFO

SNMPTRAPD=/usr/sbin/snmptrapd
SNMPTRAPD_CONF="/etc/snmp/snmptrapd.conf"
SNMPTRAPD_LOGFILE="/var/log/net-snmpd.log"
SNMPTRAPD_PID="/var/run/snmptrapd.pid"

test -x $SNMPTRAPD || exit 5

# Check for existence of needed config file and read it
SNMPD_CONFIG=/etc/sysconfig/net-snmp
test -r $SNMPD_CONFIG || { echo "$SNMPD_CONFIG doesn't exist.";
        if [ "$1" = "stop" ]; then exit 0;
        else exit 6; fi; }

# Read config
. $SNMPD_CONFIG

# Shell functions sourced from /etc/rc.status:
#      rc_check         check and set local and overall rc status
#      rc_status        check and set local and overall rc status
#      rc_status -v     ditto but be verbose in local rc status
#      rc_status -v -r  ditto and clear the local rc status
#      rc_failed        set local and overall rc status to failed
#      rc_failed <num>  set local and overall rc status to <num><num>
#      rc_reset         clear local rc status (overall remains)
#      rc_exit          exit appropriate to overall rc status
. /etc/rc.status

# First reset status of this service
rc_reset

# Return values acc. to LSB for all commands but status:
# 0 - success
# 1 - generic or unspecified error
# 2 - invalid or excess argument(s)
# 3 - unimplemented feature (e.g. "reload")
# 4 - insufficient privilege
# 5 - program is not installed
# 6 - program is not configured
# 7 - program is not running
#
# Note that starting an already running service, stopping
# or restarting a not-running service as well as the restart
# with force-reload (in case signalling is not supported) are
# considered a success.
if [ $SNMPTRAPD_CONF = "/etc/snmp/snmptrapd.conf" ]; then
  SNMPTRAPD_CONF=""
else
  SNMPTRAPD_CONF="-c $SNMPTRAPD_CONF"
fi
SNMPTRAPD_LOGFILE="${SNMPTRAPD_LOGFILE:-/var/log/net-snmpd.log}"
case "$1" in
    start)
        echo -n "Starting snmptrapd:"
        startproc $SNMPTRAPD $SNMPTRAPD_CONF -A -LF ${SNMPD_LOGLEVEL:-n} 
$SNMPTRAPD_LOGFILE -p $SNMPTRAPD_PID
        rc_status -v
        ;;
    stop)
        echo -n "Shutting down snmptrapd:"
        killproc -TERM $SNMPTRAPD
        rc_status -v
        ;;
    try-restart)
        $0 status >/dev/null &&  $0 restart
        rc_status
        ;;
    restart)
        $0 stop
        $0 start
        rc_status
        ;;
    force-reload)
        echo -n "Reload service snmptrapd:"
        killproc -HUP $SNMPTRAPD
        rc_status -v
        ;;
    reload)
        echo -n "Reload service snmptrapd:"
        killproc -HUP $SNMPTRAPD
        rc_status -v
        ;;
    status)
        echo -n "Checking for service snmptrapd:"
        checkproc $SNMPTRAPD
        rc_status -v
        ;;
    *)
        echo "Usage: $0 
{start|stop|try-restart|restart|force-reload|reload|status}"
        exit 1
        ;;
esac
rc_exit

++++++ snmpd.conf ++++++
# Please see /usr/share/doc/packages/net-snmp/EXAMPLE.conf for a
# more complete example and snmpd.conf(5).
#
# Writing is disabled by default for security reasons.  If you'd like
# to enable it uncomment the rwcommunity line and change the community
# name to something nominally secure (keeping in mind that this is
# transmitted in clear text).

# don't use ' < > in strings for syslocation or syscontact
# Note that if you define the following here you won't be able to change
# them with snmpset
syslocation Server Room
syscontact Sysadmin (root@localhost)

# These really aren't meant for production use.  They include all MIBS
# and can use considerable resources.  See snmpd.conf(5) for information
# on setting up groups and limiting MIBS.
rocommunity public 127.0.0.1
# rwcommunity mysecret 127.0.0.1
++++++ test_installed ++++++
#!/bin/bash
#
# c...@suse.com
# runs the test suite on the installed package instead of in the build
# tree, really only useful for QA

base=/usr/share/doc/packages/net-snmp/testing
export PATH="/bin:/usr/bin:/sbin:/usr/sbin:${base}"
export MIBDIRS=/usr/share/snmp/mibs

rcsnmpd stop &>/dev/null
cd ${base} || exit 1

RUNTESTS -a
-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to