Accepting request 37126 from net-snmp:factory
Copy from net-snmp:factory/net-snmp based on submit request 37126 from user leonardocf OBS-URL: https://build.opensuse.org/request/show/37126 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/net-snmp?expand=0&rev=28
This commit is contained in:
parent
34fd42299d
commit
43432f2022
@ -1,12 +0,0 @@
|
|||||||
Index: agent/mibgroup/host/hr_swinst.c
|
|
||||||
===================================================================
|
|
||||||
--- agent/mibgroup/host/hr_swinst.c.orig
|
|
||||||
+++ agent/mibgroup/host/hr_swinst.c
|
|
||||||
@@ -3,6 +3,7 @@
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
+#define _RPM_4_4_COMPAT 1
|
|
||||||
#include <net-snmp/net-snmp-config.h>
|
|
||||||
|
|
||||||
#if HAVE_SYS_PARAM_H
|
|
@ -1,150 +0,0 @@
|
|||||||
Index: agent/mibgroup/examples/ucdDemoPublic.c
|
|
||||||
===================================================================
|
|
||||||
--- agent/mibgroup/examples/ucdDemoPublic.c.orig
|
|
||||||
+++ agent/mibgroup/examples/ucdDemoPublic.c
|
|
||||||
@@ -222,7 +222,11 @@ write_ucdDemoPublicString(int action,
|
|
||||||
}
|
|
||||||
if (action == COMMIT) {
|
|
||||||
if (var_val_len != 0) {
|
|
||||||
- strcpy(publicString, var_val);
|
|
||||||
+ strncpy(publicString, var_val, sizeof(publicString)-1);
|
|
||||||
+ /* XXX thomas: just some sanity checks */
|
|
||||||
+ if(strlen(var_val) > sizeof(publicString)-1 || strlen(var_val) != var_val_len)
|
|
||||||
+ publicString[sizeof(publicString)-1] = '\0';
|
|
||||||
+ else
|
|
||||||
publicString[var_val_len] = '\0';
|
|
||||||
} else
|
|
||||||
publicString[0] = '\0';
|
|
||||||
Index: agent/mibgroup/util_funcs.c
|
|
||||||
===================================================================
|
|
||||||
--- agent/mibgroup/util_funcs.c.orig
|
|
||||||
+++ agent/mibgroup/util_funcs.c
|
|
||||||
@@ -142,6 +142,10 @@ make_tempfile(void)
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if (fd >= 0) {
|
|
||||||
+ if(fchmod(fd, 0600) != 0) {
|
|
||||||
+ close(fd);
|
|
||||||
+ return NULL;
|
|
||||||
+ }
|
|
||||||
close(fd);
|
|
||||||
DEBUGMSGTL(("make_tempfile", "temp file created: %s\n", name));
|
|
||||||
return name;
|
|
||||||
Index: agent/auto_nlist.c
|
|
||||||
===================================================================
|
|
||||||
--- agent/auto_nlist.c.orig
|
|
||||||
+++ agent/auto_nlist.c
|
|
||||||
@@ -64,6 +64,7 @@ auto_nlist_value(const char *string)
|
|
||||||
it->nl[0].n_name = (char *) malloc(strlen(string) + 2);
|
|
||||||
#if defined(aix4) || defined(aix5) || defined(aix6)
|
|
||||||
strcpy(it->nl[0].n_name, string);
|
|
||||||
+ it->nl[0].n_name[strlen(string)+1] = '\0';
|
|
||||||
#else
|
|
||||||
sprintf(it->nl[0].n_name, "_%s", string);
|
|
||||||
#endif
|
|
||||||
@@ -72,6 +73,7 @@ auto_nlist_value(const char *string)
|
|
||||||
#if !(defined(aix4) || defined(aix5) || defined(aix6))
|
|
||||||
if (it->nl[0].n_type == 0) {
|
|
||||||
strcpy(it->nl[0].n_name, string);
|
|
||||||
+ it->nl[0].n_name[strlen(string)+1] = '\0';
|
|
||||||
init_nlist(it->nl);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
Index: apps/snmptest.c
|
|
||||||
===================================================================
|
|
||||||
--- apps/snmptest.c.orig
|
|
||||||
+++ apps/snmptest.c
|
|
||||||
@@ -456,6 +456,7 @@ input_variable(netsnmp_variable_list * v
|
|
||||||
goto getValue;
|
|
||||||
}
|
|
||||||
memcpy(vp->val.string, buf, strlen(buf) - 1);
|
|
||||||
+ vp->val.string[sizeof(vp->val.string)-1] = 0;
|
|
||||||
vp->val_len = strlen(buf) - 1;
|
|
||||||
} else if (ch == 'x') {
|
|
||||||
size_t buf_len = 256;
|
|
||||||
Index: snmplib/parse.c
|
|
||||||
===================================================================
|
|
||||||
--- snmplib/parse.c.orig
|
|
||||||
+++ snmplib/parse.c
|
|
||||||
@@ -4231,7 +4231,7 @@ parse(FILE * fp, struct node *root)
|
|
||||||
extern void xmalloc_stats(FILE *);
|
|
||||||
#endif
|
|
||||||
char token[MAXTOKEN];
|
|
||||||
- char name[MAXTOKEN];
|
|
||||||
+ char name[MAXTOKEN+1];
|
|
||||||
int type = LABEL;
|
|
||||||
int lasttype = LABEL;
|
|
||||||
|
|
||||||
@@ -4323,7 +4323,8 @@ parse(FILE * fp, struct node *root)
|
|
||||||
case ENDOFFILE:
|
|
||||||
continue;
|
|
||||||
default:
|
|
||||||
- strcpy(name, token);
|
|
||||||
+ strncpy(name, token, sizeof(name));
|
|
||||||
+ name[sizeof(name)-1] = '\0';
|
|
||||||
type = get_token(fp, token, MAXTOKEN);
|
|
||||||
nnp = NULL;
|
|
||||||
if (type == MACRO) {
|
|
||||||
@@ -4340,7 +4341,8 @@ parse(FILE * fp, struct node *root)
|
|
||||||
print_error(name, "is a reserved word", lasttype);
|
|
||||||
continue; /* see if we can parse the rest of the file */
|
|
||||||
}
|
|
||||||
- strcpy(name, token);
|
|
||||||
+ strncpy(name, token, sizeof(name));
|
|
||||||
+ name[sizeof(name)-1] = '\0';
|
|
||||||
type = get_token(fp, token, MAXTOKEN);
|
|
||||||
nnp = NULL;
|
|
||||||
|
|
||||||
Index: snmplib/tools.c
|
|
||||||
===================================================================
|
|
||||||
--- snmplib/tools.c.orig
|
|
||||||
+++ snmplib/tools.c
|
|
||||||
@@ -696,7 +696,7 @@ dump_snmpEngineID(const u_char * estring
|
|
||||||
/*
|
|
||||||
* s += snprintf(s, remaining_len+3, "\"%s\"", esp);
|
|
||||||
*/
|
|
||||||
- s += sprintf(s, "\"%s\"", esp);
|
|
||||||
+ s += sprintf(s, "\"%.*s\"", sizeof(buf)-strlen(buf)-3, esp);
|
|
||||||
goto dump_snmpEngineID_quit;
|
|
||||||
break;
|
|
||||||
/*NOTREACHED*/ case 5: /* Octets. */
|
|
||||||
Index: testing/TESTCONF.sh
|
|
||||||
===================================================================
|
|
||||||
--- testing/TESTCONF.sh.orig
|
|
||||||
+++ testing/TESTCONF.sh
|
|
||||||
@@ -77,8 +77,8 @@ if [ "x$SNMP_TMPDIR" = "x" -a "x$SNMP_HE
|
|
||||||
fi
|
|
||||||
SNMP_TMP_PERSISTENTDIR=$SNMP_TMPDIR/persist
|
|
||||||
export SNMP_TMP_PERSISTENTDIR
|
|
||||||
- mkdir $SNMP_TMPDIR
|
|
||||||
- mkdir $SNMP_TMP_PERSISTENTDIR
|
|
||||||
+ mkdir -m 0700 $SNMP_TMPDIR
|
|
||||||
+ mkdir -m 0700 $SNMP_TMP_PERSISTENTDIR
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "x$SNMP_SAVE_TMPDIR" = "x" ]; then
|
|
||||||
Index: testing/eval_suite.sh
|
|
||||||
===================================================================
|
|
||||||
--- testing/eval_suite.sh.orig
|
|
||||||
+++ testing/eval_suite.sh
|
|
||||||
@@ -79,7 +79,11 @@ exit 0
|
|
||||||
PROGRAM=
|
|
||||||
ARGUMENTS="$*"
|
|
||||||
|
|
||||||
-TMPFILE=/tmp/eval_suite.sh$$
|
|
||||||
+umask 0077 # just to be on the save side
|
|
||||||
+TMPDIR=/tmp/ucd-snmpd-eval-dir.$$
|
|
||||||
+/bin/rm -rf $TMPDIR
|
|
||||||
+/bin/mkdir -m 0700 $TMPDIR || exit -1
|
|
||||||
+TMPFILE=$TMPDIR/eval_suite.sh$$
|
|
||||||
|
|
||||||
TESTLISTFILE=eval_testlist
|
|
||||||
|
|
||||||
@@ -205,6 +209,7 @@ done # endwhile
|
|
||||||
# Cleanup, exit.
|
|
||||||
#
|
|
||||||
rm -f $TMPFILE
|
|
||||||
+rm -rf $TMPDIR
|
|
||||||
|
|
||||||
exit $TESTFAILURE
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
|||||||
Index: snmplib/mib.c
|
|
||||||
===================================================================
|
|
||||||
--- snmplib/mib.c.orig
|
|
||||||
+++ snmplib/mib.c
|
|
||||||
@@ -1507,7 +1507,7 @@ sprint_realloc_gauge(u_char ** buf, size
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
- sprintf(tmp, "%lu", *var->val.integer);
|
|
||||||
+ sprintf(tmp, "%u", (unsigned int)(*var->val.integer & 0xffffffff));
|
|
||||||
if (!snmp_strcat
|
|
||||||
(buf, buf_len, out_len, allow_realloc, (const u_char *) tmp)) {
|
|
||||||
return 0;
|
|
||||||
@@ -1571,7 +1571,7 @@ sprint_realloc_counter(u_char ** buf, si
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
- sprintf(tmp, "%lu", *var->val.integer);
|
|
||||||
+ sprintf(tmp, "%u", (unsigned int)(*var->val.integer & 0xffffffff));
|
|
||||||
if (!snmp_strcat
|
|
||||||
(buf, buf_len, out_len, allow_realloc, (const u_char *) tmp)) {
|
|
||||||
return 0;
|
|
@ -1,52 +0,0 @@
|
|||||||
Index: configure.d/config_os_progs
|
|
||||||
===================================================================
|
|
||||||
--- configure.d/config_os_progs
|
|
||||||
+++ configure.d/config_os_progs
|
|
||||||
@@ -153,7 +153,7 @@ AC_SUBST(NON_GNU_VPATH)
|
|
||||||
|
|
||||||
# What system are we building for
|
|
||||||
#
|
|
||||||
-AC_CANONICAL_TARGET
|
|
||||||
+AC_CANONICAL_TARGET([])
|
|
||||||
changequote(, )
|
|
||||||
PARTIALTARGETOS=`echo $target_os | sed 's/[-._].*//'`
|
|
||||||
changequote([, ])
|
|
||||||
Index: configure.d/config_os_libs
|
|
||||||
===================================================================
|
|
||||||
--- configure.d/config_os_libs
|
|
||||||
+++ configure.d/config_os_libs
|
|
||||||
@@ -235,8 +235,6 @@ if test "$with_libwrap" != "no"; then
|
|
||||||
_wraplibs="$_wraplibs -lwrap"],
|
|
||||||
[AC_MSG_RESULT([no])
|
|
||||||
# Linux RedHat 6.1 won't link libwrap without libnsl
|
|
||||||
- AC_CHECK_FUNC(yp_get_default_domain, ,
|
|
||||||
- AC_CHECK_LIB(nsl, yp_get_default_domain))
|
|
||||||
AC_MSG_CHECKING([for TCP wrappers library -lwrap linked with -lnsl])
|
|
||||||
AC_TRY_LINK(
|
|
||||||
[#include <sys/types.h>
|
|
||||||
Index: configure.d/config_os_misc4
|
|
||||||
===================================================================
|
|
||||||
--- configure.d/config_os_misc4
|
|
||||||
+++ configure.d/config_os_misc4
|
|
||||||
@@ -205,7 +205,7 @@ fi
|
|
||||||
#
|
|
||||||
# used in agent only
|
|
||||||
#
|
|
||||||
-AC_CACHE_CHECK([whether TCP timers depend on \`hz'],
|
|
||||||
+AC_CACHE_CHECK([whether TCP timers depend on hz],
|
|
||||||
ac_cv_TCPTV_NEEDS_HZ,
|
|
||||||
[AC_EGREP_CPP(hz,
|
|
||||||
[
|
|
||||||
Index: configure.d/config_project_manual
|
|
||||||
===================================================================
|
|
||||||
--- configure.d/config_project_manual
|
|
||||||
+++ configure.d/config_project_manual
|
|
||||||
@@ -35,7 +35,7 @@ fi
|
|
||||||
|
|
||||||
ME=`$WHOAMI`
|
|
||||||
if test -f /etc/resolv.conf; then
|
|
||||||
- LOC=`cat /etc/resolv.conf | $GREP '^domain' | tail -1 | awk '{print $NF}'`
|
|
||||||
+ LOC=`cat /etc/resolv.conf | $GREP '^domain' | tail -n 1 | awk '{print $NF}'`
|
|
||||||
else
|
|
||||||
LOC="@no.where"
|
|
||||||
fi
|
|
@ -1,38 +0,0 @@
|
|||||||
Index: agent/mibgroup/hardware/sensors/hw_sensors.c
|
|
||||||
===================================================================
|
|
||||||
--- agent/mibgroup/hardware/sensors/hw_sensors.c.orig
|
|
||||||
+++ agent/mibgroup/hardware/sensors/hw_sensors.c
|
|
||||||
@@ -107,6 +107,7 @@ static int
|
|
||||||
_sensor_load( void )
|
|
||||||
{
|
|
||||||
netsnmp_sensor_arch_load( NULL, NULL );
|
|
||||||
+ return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
Index: agent/mibgroup/ip-mib/data_access/defaultrouter_common.c
|
|
||||||
===================================================================
|
|
||||||
--- agent/mibgroup/ip-mib/data_access/defaultrouter_common.c.orig
|
|
||||||
+++ agent/mibgroup/ip-mib/data_access/defaultrouter_common.c
|
|
||||||
@@ -169,7 +169,7 @@ netsnmp_access_defaultrouter_entry_creat
|
|
||||||
|
|
||||||
rc = netsnmp_arch_defaultrouter_entry_init(entry);
|
|
||||||
if (SNMP_ERR_NOERROR != rc) {
|
|
||||||
- DEBUGMSGT(("access:defaultrouter:create","error %d in arch init\n"));
|
|
||||||
+ DEBUGMSGT(("access:defaultrouter:create","error %d in arch init\n", rc));
|
|
||||||
netsnmp_access_defaultrouter_entry_free(entry);
|
|
||||||
entry = NULL;
|
|
||||||
}
|
|
||||||
Index: agent/mibgroup/ucd-snmp/pass.c
|
|
||||||
===================================================================
|
|
||||||
--- agent/mibgroup/ucd-snmp/pass.c.orig
|
|
||||||
+++ agent/mibgroup/ucd-snmp/pass.c
|
|
||||||
@@ -588,7 +588,7 @@ setPass(int action,
|
|
||||||
buf[ sizeof(buf)-1 ] = 0;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
- strncat(passthru->command, buf, sizeof(passthru->command));
|
|
||||||
+ strncat(passthru->command, buf, sizeof(passthru->command)-strlen(passthru->command)-1);
|
|
||||||
passthru->command[ sizeof(passthru->command)-1 ] = 0;
|
|
||||||
DEBUGMSGTL(("ucd-snmp/pass", "pass-running: %s",
|
|
||||||
passthru->command));
|
|
3
net-snmp-5.5.0_upstream-20100405.patch.bz2
Normal file
3
net-snmp-5.5.0_upstream-20100405.patch.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:6a7da68a61e3a60ec4b100662c569f32bc63b43f0d24b82da7b0ebd55508ef92
|
||||||
|
size 164499
|
@ -1,3 +1,15 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Apr 5 15:58:58 UTC 2010 - lchiquitto@novell.com
|
||||||
|
|
||||||
|
- add net-snmp-5.5.0_upstream-20100405.patch:
|
||||||
|
merge all patches committed to upstream branch V5-5-patches
|
||||||
|
- remove patches that are now upstream:
|
||||||
|
net-snmp-5.4.2_audit.patch
|
||||||
|
net-snmp-5.5.0_autoconf.patch
|
||||||
|
net-snmp-5.4.2_overflow.patch
|
||||||
|
net-snmp-5.4.2.1-rpm4.7.patch
|
||||||
|
net-snmp-5.5.0_gcc45.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Mar 5 17:33:34 UTC 2010 - lchiquitto@novell.com
|
Fri Mar 5 17:33:34 UTC 2010 - lchiquitto@novell.com
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
Name: net-snmp
|
Name: net-snmp
|
||||||
Version: 5.5
|
Version: 5.5
|
||||||
Release: 4
|
Release: 5
|
||||||
#
|
#
|
||||||
License: BSD3c(or similar) ; MIT License (or similar)
|
License: BSD3c(or similar) ; MIT License (or similar)
|
||||||
Group: Productivity/Networking/Other
|
Group: Productivity/Networking/Other
|
||||||
@ -65,12 +65,10 @@ Source6: test_installed
|
|||||||
Source7: net-snmp.sysconfig
|
Source7: net-snmp.sysconfig
|
||||||
Source8: net-snmp-rpmlintrc
|
Source8: net-snmp-rpmlintrc
|
||||||
Source9: baselibs.conf
|
Source9: baselibs.conf
|
||||||
Patch: net-snmp-5.4.2_audit.patch
|
Patch0: net-snmp-5.5.0_upstream-20100405.patch.bz2
|
||||||
Patch1: net-snmp-5.5.0_autoconf.patch
|
|
||||||
# unused patch atm
|
# unused patch atm
|
||||||
Patch2: net-snmp-5.2.1-socket_path.diff
|
Patch2: net-snmp-5.2.1-socket_path.diff
|
||||||
Patch3: net-snmp-5.4.rc2-versinfo.diff
|
Patch3: net-snmp-5.4.rc2-versinfo.diff
|
||||||
Patch4: net-snmp-5.4.2_overflow.patch
|
|
||||||
Patch5: net-snmp-5.4.2_testing.empty_arptable.patch
|
Patch5: net-snmp-5.4.2_testing.empty_arptable.patch
|
||||||
Patch6: net-snmp-5.1.1-pie.patch
|
Patch6: net-snmp-5.1.1-pie.patch
|
||||||
Patch7: net-snmp-5.4.2_vendorperl.patch
|
Patch7: net-snmp-5.4.2_vendorperl.patch
|
||||||
@ -78,9 +76,7 @@ Patch8: net-snmp-5.4.2_net-snmp-config_headercheck.patch
|
|||||||
Patch9: net-snmp-5.4.2_perl_tk_warning.patch
|
Patch9: net-snmp-5.4.2_perl_tk_warning.patch
|
||||||
Patch10: net-snmp-5.4.2_snmpconf-selinux.patch
|
Patch10: net-snmp-5.4.2_snmpconf-selinux.patch
|
||||||
Patch11: net-snmp-5.4.2_velocity-mib.patch
|
Patch11: net-snmp-5.4.2_velocity-mib.patch
|
||||||
Patch12: net-snmp-5.4.2.1-rpm4.7.patch
|
|
||||||
Patch13: net-snmp-5.5.0_use_lmsensors_v3.patch
|
Patch13: net-snmp-5.5.0_use_lmsensors_v3.patch
|
||||||
Patch14: net-snmp-5.5.0_gcc45.patch
|
|
||||||
#
|
#
|
||||||
Summary: SNMP Daemon
|
Summary: SNMP Daemon
|
||||||
|
|
||||||
@ -216,11 +212,9 @@ Authors:
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{pkg_name}-%{version}
|
%setup -q -n %{pkg_name}-%{version}
|
||||||
%patch
|
%patch0 -p1
|
||||||
%patch1
|
|
||||||
%patch2
|
%patch2
|
||||||
%patch3
|
%patch3
|
||||||
%patch4
|
|
||||||
%patch5
|
%patch5
|
||||||
%patch6
|
%patch6
|
||||||
%patch7
|
%patch7
|
||||||
@ -228,9 +222,7 @@ Authors:
|
|||||||
%patch9
|
%patch9
|
||||||
%patch10
|
%patch10
|
||||||
%patch11
|
%patch11
|
||||||
%patch12
|
|
||||||
%patch13
|
%patch13
|
||||||
%patch14
|
|
||||||
find -name "CVS" -type d | xargs -r %{__rm} -rfv
|
find -name "CVS" -type d | xargs -r %{__rm} -rfv
|
||||||
find -name ".cvsignore" | xargs -r %{__rm} -fv
|
find -name ".cvsignore" | xargs -r %{__rm} -fv
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user