--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock
Please unblock package net-tools.
This upload fixes quite annoying bug #680204, and also #656130, which is
important to fix release goal regarding hardening flags. To fix #656130
minor changes were needed to the source, as printf-like functions were
misused few times, causing FTBFS with hardening flags. Debdiff of the
NMU is attached for the review.
unblock net-tools/1.60-24.2
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 3.5-trunk-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_GB.UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -u net-tools-1.60/debian/rules net-tools-1.60/debian/rules
--- net-tools-1.60/debian/rules
+++ net-tools-1.60/debian/rules
@@ -19,6 +19,9 @@
CROSS=
endif
+COPTS := -D_GNU_SOURCE -Wall $(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)
+LOPTS := $(shell dpkg-buildflags --get LDFLAGS)
+
configure: configure-stamp
configure-stamp: $(QUILT_STAMPFN)
[ ! -f config.make ] || mv config.make debian/config.make.bk
@@ -31,7 +34,7 @@
build: build-stamp
build-stamp: configure-stamp
dh_testdir
- $(MAKE) $(CROSS) PROGS="ifconfig arp netstat route rarp slattach plipconfig \
+ $(MAKE) $(CROSS) COPTS="$(COPTS)" LOPTS="$(LOPTS)" PROGS="ifconfig arp netstat route rarp slattach plipconfig \
nameif iptunnel ipmaddr mii-tool"
touch $@
diff -u net-tools-1.60/debian/changelog net-tools-1.60/debian/changelog
--- net-tools-1.60/debian/changelog
+++ net-tools-1.60/debian/changelog
@@ -1,3 +1,14 @@
+net-tools (1.60-24.2) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Parse Linux version correctly (Closes: #680204).
+ * Build with hardening flags (Closes: #656130):
+ - Fix improper format function usage: use fputs instead of fprintf or pass
+ "%s" format string where necessary (-Werror=format-security treats those
+ as errors).
+
+ -- Andrew O. Shadura <bugzilla@tut.by> Tue, 04 Sep 2012 10:51:20 +0200
+
net-tools (1.60-24.1) unstable; urgency=low
* Non-maintainer upload.
diff -u net-tools-1.60/debian/patches/series net-tools-1.60/debian/patches/series
--- net-tools-1.60/debian/patches/series
+++ net-tools-1.60/debian/patches/series
@@ -24,0 +25,2 @@
+proper-uts-check.patch
+fix-fprintf.patch
only in patch2:
unchanged:
--- net-tools-1.60.orig/debian/patches/proper-uts-check.patch
+++ net-tools-1.60/debian/patches/proper-uts-check.patch
@@ -0,0 +1,18 @@
+Subject: Linux version now can be two-component.
+
+--- a/lib/util.c
++++ b/lib/util.c
+@@ -33,11 +33,11 @@
+ int kernel_version(void)
+ {
+ struct utsname uts;
+- int major, minor, patch;
++ int major = 0, minor = 0, patch = 0;
+
+ if (uname(&uts) < 0)
+ return -1;
+- if (sscanf(uts.release, "%d.%d.%d", &major, &minor, &patch) != 3)
++ if (sscanf(uts.release, "%d.%d.%d", &major, &minor, &patch) < 2)
+ return -1;
+ return KRELEASE(major, minor, patch);
+ }
only in patch2:
unchanged:
--- net-tools-1.60.orig/debian/patches/fix-fprintf.patch
+++ net-tools-1.60/debian/patches/fix-fprintf.patch
@@ -0,0 +1,47 @@
+Subject: Fix improper format function usage.
+
+--- a/rarp.c
++++ b/rarp.c
+@@ -44,7 +44,7 @@
+
+ static char no_rarp_message[] = N_("This kernel does not support RARP.\n");
+
+-static char version_string[] = RELEASE "\nrarp 1.03 (2001-04-04)\n";
++static char version_string[] = RELEASE "\nrarp 1.03 (2001-04-04)";
+
+ static struct hwtype *hardware = NULL;
+
+@@ -226,7 +226,7 @@
+ case 'h':
+ usage();
+ case 'V':
+- fprintf(stderr, version_string);
++ fputs(version_string, stderr);
+ exit(E_VERSION);
+ break;
+ case 'v':
+--- a/slattach.c
++++ b/slattach.c
+@@ -565,9 +565,9 @@
+ "[-o outfill] "
+ #endif
+ "[-c cmd] [-s speed] [-p protocol] tty | -\n"
+- " slattach -V | --version\n";
++ " slattach -V | --version";
+
+- fprintf(stderr, usage_msg);
++ fputs(usage_msg, stderr);
+ exit(1);
+ }
+
+--- a/mii-tool.c
++++ b/mii-tool.c
+@@ -271,7 +271,7 @@
+
+ if (opt_watch) {
+ if (opt_log) {
+- syslog(LOG_INFO, buf);
++ syslog(LOG_INFO, "%s", buf);
+ } else {
+ char s[20];
+ time_t t = time(NULL);
--- End Message ---