update to NUT 2.6.4 rolling in the patch for CVE 2012-2944 which we had locally,

adding new device support, better snmp support for various devices, and many
other fixes and improvements.
This commit is contained in:
sthen 2012-06-08 21:07:02 +00:00
parent ae33ed928d
commit 2e38342377
10 changed files with 45 additions and 66 deletions

View File

@ -1,23 +1,19 @@
# $OpenBSD: Makefile,v 1.61 2012/06/01 07:12:41 jasper Exp $
# $OpenBSD: Makefile,v 1.62 2012/06/08 21:07:02 sthen Exp $
COMMENT-main= UPS monitoring program supporting many brands
COMMENT-cgi= CGIs for monitoring Nut-based UPSs
COMMENT-snmp= driver for monitoring UPS via SNMP
COMMENT-xml= driver for monitoring UPS via XML/HTTP
DISTNAME= nut-2.6.3
REVISION-main= 5
REVISION-cgi= 4
REVISION-snmp= 4
REVISION-xml= 4
DISTNAME= nut-2.6.4
PKGNAME-main= ${DISTNAME}
PKGNAME-cgi= ${DISTNAME:S/-/-cgi-/}
PKGNAME-snmp= ${DISTNAME:S/-/-snmp-/}
PKGNAME-xml= ${DISTNAME:S/-/-xml-/}
SHARED_LIBS += upsclient 1.0 # 1.0
SHARED_LIBS += nutscan 0.0 # 1.0
SHARED_LIBS += upsclient 2.0 # 2.0
SHARED_LIBS += nutscan 1.0 # 1.0
CATEGORIES= sysutils
HOMEPAGE= http://www.networkupstools.org/

View File

@ -1,5 +1,5 @@
MD5 (nut-2.6.3.tar.gz) = jbAMIfi8A63W4U0V9jTsag==
RMD160 (nut-2.6.3.tar.gz) = yQZ9aLP7M0f6BYkzrwzZoyeiCD8=
SHA1 (nut-2.6.3.tar.gz) = 2XrqJ5vqZXFKDEktE/trLUtbQ98=
SHA256 (nut-2.6.3.tar.gz) = NJE7cp0gMvqvbzHoAKQAvNh08fTarK5v4NOIvSNbYzo=
SIZE (nut-2.6.3.tar.gz) = 1952115
MD5 (nut-2.6.4.tar.gz) = eNZy+7zZBoPknGZ2Zalfhw==
RMD160 (nut-2.6.4.tar.gz) = OJ4hXIyZ5K6/A+4xRnFCEB8zHIU=
SHA1 (nut-2.6.4.tar.gz) = VbfF6v5g3mQQc3TJDuIHmqM1CpQ=
SHA256 (nut-2.6.4.tar.gz) = SoRVynui4YtXo5IGrMWkluhV2EWCjpcIIr2Er9EXj+U=
SIZE (nut-2.6.4.tar.gz) = 1992488

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-clients_Makefile_in,v 1.15 2012/01/11 16:01:33 sthen Exp $
--- clients/Makefile.in.orig Tue Jan 3 13:36:07 2012
+++ clients/Makefile.in Wed Jan 11 15:13:10 2012
@@ -381,10 +381,12 @@ upsmon_SOURCES = upsmon.c upsmon.h upsclient.h
$OpenBSD: patch-clients_Makefile_in,v 1.16 2012/06/08 21:07:02 sthen Exp $
--- clients/Makefile.in.orig Thu May 31 11:38:07 2012
+++ clients/Makefile.in Fri Jun 8 01:38:28 2012
@@ -384,10 +384,12 @@ upsmon_SOURCES = upsmon.c upsmon.h upsclient.h
upssched_SOURCES = upssched.c upssched.h
upssched_LDADD = ../common/libcommon.la ../common/libparseconf.la $(NETLIBS)
upsimage_cgi_SOURCES = upsimage.c upsclient.h upsimagearg.h cgilib.c cgilib.h

View File

@ -1,21 +0,0 @@
$OpenBSD: patch-common_parseconf_c,v 1.1 2012/06/01 07:12:42 jasper Exp $
Security fix for CVE-2012-2944: upsd can be remotely crashed
Patch taken from http://trac.networkupstools.org/projects/nut/changeset/3633
--- common/parseconf.c.orig Fri Jun 1 09:03:34 2012
+++ common/parseconf.c Fri Jun 1 09:04:40 2012
@@ -171,6 +171,13 @@ static void addchar(PCONF_CTX_t *ctx)
wbuflen = strlen(ctx->wordbuf);
+ /* CVE-2012-2944: only allow the subset Ascii charset from Space to ~ */
+ if ((ctx->ch < 0x20) || (ctx->ch > 0x7f)) {
+ fprintf(stderr, "addchar: discarding invalid character (0x%02x)!\n",
+ ctx->ch);
+ return;
+ }
+
if (ctx->wordlen_limit != 0) {
if (wbuflen >= ctx->wordlen_limit) {

View File

@ -1,9 +1,12 @@
$OpenBSD: patch-conf_nut_conf_sample,v 1.1 2011/03/09 11:00:55 sthen Exp $
--- conf/nut.conf.sample.orig Sun Mar 6 01:33:18 2011
+++ conf/nut.conf.sample Sun Mar 6 01:33:23 2011
@@ -25,4 +25,4 @@
$OpenBSD: patch-conf_nut_conf_sample,v 1.2 2012/06/08 21:07:02 sthen Exp $
--- conf/nut.conf.sample.orig Wed May 2 22:35:36 2012
+++ conf/nut.conf.sample Fri Jun 8 01:38:28 2012
@@ -25,7 +25,7 @@
# to security concerns.
# - netclient: this mode only requires upsmon.
-MODE = none
#
-# IMPORTANT NOTE:
+MODE = standalone
# This file is intended to be sourced by shell scripts.
# You MUST NOT use spaces around the equal sign!

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-configure,v 1.18 2012/01/12 11:39:36 sthen Exp $
--- configure.orig Tue Jan 3 13:36:06 2012
+++ configure Wed Jan 11 15:30:24 2012
@@ -9396,7 +9396,8 @@ if test -z "${nut_have_libwrap_seen}"; then
$OpenBSD: patch-configure,v 1.19 2012/06/08 21:07:02 sthen Exp $
--- configure.orig Thu May 31 11:38:06 2012
+++ configure Fri Jun 8 01:38:28 2012
@@ -9407,7 +9407,8 @@ if test -z "${nut_have_libwrap_seen}"; then
for ac_header in tcpd.h
do :
@ -11,7 +11,7 @@ $OpenBSD: patch-configure,v 1.18 2012/01/12 11:39:36 sthen Exp $
"
if test "x$ac_cv_header_tcpd_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
@@ -9495,6 +9496,7 @@ else
@@ -9506,6 +9507,7 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-drivers_blazer_usb_c,v 1.3 2012/01/11 16:01:33 sthen Exp $
--- drivers/blazer_usb.c.orig Wed Jan 11 09:35:10 2012
+++ drivers/blazer_usb.c Wed Jan 11 13:21:37 2012
@@ -434,7 +434,9 @@ int blazer_command(const char *cmd, char *buf, size_t
$OpenBSD: patch-drivers_blazer_usb_c,v 1.4 2012/06/08 21:07:02 sthen Exp $
--- drivers/blazer_usb.c.orig Mon May 21 08:44:58 2012
+++ drivers/blazer_usb.c Fri Jun 8 01:38:28 2012
@@ -438,7 +438,9 @@ int blazer_command(const char *cmd, char *buf, size_t
case -ETIMEDOUT: /* Connection timed out */
case -EOVERFLOW: /* Value too large for defined data type */

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-drivers_usbhid-ups_c,v 1.3 2011/07/19 21:06:09 sthen Exp $
--- drivers/usbhid-ups.c.orig Tue May 31 11:36:49 2011
+++ drivers/usbhid-ups.c Tue Jul 19 21:53:33 2011
@@ -908,7 +908,7 @@ void upsdrv_initups(void)
$OpenBSD: patch-drivers_usbhid-ups_c,v 1.4 2012/06/08 21:07:02 sthen Exp $
--- drivers/usbhid-ups.c.orig Wed May 30 21:17:37 2012
+++ drivers/usbhid-ups.c Fri Jun 8 01:38:28 2012
@@ -928,7 +928,7 @@ void upsdrv_initups(void)
regular expression (USB) or device_path (SHUT) */
ret = comm_driver->open(&udev, &curDevice, subdriver_matcher, &callback);
if (ret < 1)
@ -10,7 +10,7 @@ $OpenBSD: patch-drivers_usbhid-ups_c,v 1.3 2011/07/19 21:06:09 sthen Exp $
hd = &curDevice;
@@ -1228,7 +1228,9 @@ static bool_t hid_ups_walk(walkmode_t mode)
@@ -1248,7 +1248,9 @@ static bool_t hid_ups_walk(walkmode_t mode)
case -ETIMEDOUT: /* Connection timed out */
case -EOVERFLOW: /* Value too large for defined data type */

View File

@ -1,15 +1,15 @@
$OpenBSD: patch-tools_nut-usbinfo_pl,v 1.1 2011/09/19 15:59:57 sthen Exp $
$OpenBSD: patch-tools_nut-usbinfo_pl,v 1.2 2012/06/08 21:07:02 sthen Exp $
skip backup copy of patched files
--- tools/nut-usbinfo.pl.orig Mon Sep 19 09:32:58 2011
+++ tools/nut-usbinfo.pl Mon Sep 19 09:34:32 2011
@@ -211,7 +211,7 @@ sub gen_usb_files
--- tools/nut-usbinfo.pl.orig Mon May 14 13:15:38 2012
+++ tools/nut-usbinfo.pl Fri Jun 8 10:56:20 2012
@@ -216,7 +216,7 @@ sub gen_usb_files
sub find_usbdevs
{
- return $File::Find::prune = 1 if $_ eq '.svn';
+ return $File::Find::prune = 1 if $_ eq '.svn' or m/.*\.orig/;
# maybe there's an option to turn off all .* files, but anyway this is stupid
- return $File::Find::prune = 1 if ($_ eq '.svn') || ($_ =~ /^\.#/);
+ return $File::Find::prune = 1 if ($_ eq '.svn') || ($_ =~ /^\.#/) || (m/.*\.orig/);
my $nameFile=$_;
my $lastComment="";

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST-main,v 1.16 2012/01/26 08:03:57 ajacoutot Exp $
@comment $OpenBSD: PLIST-main,v 1.17 2012/06/08 21:07:02 sthen Exp $
@conflict nut-<2.6.2p0
@conflict nut-scanner-*
@conflict upsd-*
@ -107,6 +107,7 @@ lib/libupsclient.la
@man man/man8/mge-utalk.8
@man man/man8/microdowell.8
@man man/man8/nut-scanner.8
@man man/man8/nut-recorder.8
@man man/man8/nutupsdrv.8
@man man/man8/oneac.8
@man man/man8/optiups.8