[netdump-server] Resolves: bz 1037214
Neil Horman
nhorman at fedoraproject.org
Tue Dec 3 18:30:26 UTC 2013
commit 717c094a08b24532158375c5f985b7802e4ddd78
Author: Neil Horman <nhorman at tuxdriver.com>
Date: Tue Dec 3 13:30:06 2013 -0500
Resolves: bz 1037214
netdump-server-format-security.patch | 44 ++++++++++++++++++++++++++++++++++
netdump-server-offsetof.patch | 11 ++++++++
netdump-server.spec | 10 +++++++-
3 files changed, 64 insertions(+), 1 deletions(-)
---
diff --git a/netdump-server-format-security.patch b/netdump-server-format-security.patch
new file mode 100644
index 0000000..d3641e7
--- /dev/null
+++ b/netdump-server-format-security.patch
@@ -0,0 +1,44 @@
+diff -up ./server.c.orig ./server.c
+--- ./server.c.orig 2013-12-03 13:09:47.503514123 -0500
++++ ./server.c 2013-12-03 13:09:42.419477970 -0500
+@@ -102,9 +102,8 @@ get_dir_from_ip (guint32 ip, gboolean cr
+ res = mkdir(dir->path, S_IRWXU);
+ if (res)
+ {
+- char *msg = g_strdup_printf ("Error making crashdump directory %s", dir->path);
+- syslog (LOG_ERR, msg);
+- g_free (msg);
++ syslog (LOG_ERR, "Error making crashdump directory %s",
++ dir->path);
+ g_free (dir->path);
+ g_free (dir);
+ return NULL;
+@@ -245,11 +244,10 @@ handle_new_client (guint32 ip, guint16 p
+ if (!just_reboot &&
+ (g_hash_table_size (clients) > config.max_concurrent_dumps))
+ {
+- char *msg = g_strdup_printf ("Too many concurrent netdumps, ignoring dump request from %d.%d.%d.%d\n",
+- (ip >> 24) & 0xff, (ip >> 16) & 0xff,
+- (ip >> 8) & 0xff, (ip >> 0) & 0xff);
+- syslog (LOG_WARNING, msg);
+- g_free (msg);
++ syslog (LOG_WARNING, "Too many concurrent netdumps, ignoring dump "
++ "from %d.%d.%d.%d\n",
++ (ip >> 24) & 0xff, (ip >> 16) & 0xff,
++ (ip >> 8) & 0xff, (ip >> 0) & 0xff);
+ just_reboot = TRUE;
+ }
+
+@@ -490,10 +488,8 @@ main (int argc, char *argv[])
+ (struct sockaddr *) &saddr,
+ sizeof (saddr)) < 0)
+ {
+- str = g_strdup_printf ("Couldn't bind master socket to %s:%d",
+- !config.addr ? "any" : config.addr, config.port);
+- syslog (LOG_ERR, str);
+- g_free (str);
++ syslog (LOG_ERR, "Couldn't bind master socket to %s:%d",
++ !config.addr ? "any" : config.addr, config.port);
+ exit (1);
+ }
+
diff --git a/netdump-server-offsetof.patch b/netdump-server-offsetof.patch
new file mode 100644
index 0000000..39d6b7d
--- /dev/null
+++ b/netdump-server-offsetof.patch
@@ -0,0 +1,11 @@
+diff -up ./configuration.c.orig ./configuration.c
+--- ./configuration.c.orig 2013-12-03 13:23:07.978157640 -0500
++++ ./configuration.c 2013-12-03 13:27:28.541048858 -0500
+@@ -20,6 +20,7 @@
+ * Elliot Le
+ * Neil Horman
+ ******************************************************************************/
++#include <stddef.h>
+ #include <glib.h>
+ #include <string.h>
+ #include <unistd.h>
diff --git a/netdump-server.spec b/netdump-server.spec
index 750bdb7..5b248bb 100644
--- a/netdump-server.spec
+++ b/netdump-server.spec
@@ -1,7 +1,7 @@
Summary: Server for network kernel message logging and crash dumps
Name: netdump-server
Version: 0.7.16
-Release: 34%{dist}
+Release: 35%{dist}
# This is a Red Hat maintained package which is specific to
# our distribution. Thus the source is only available from
# within this srpm.
@@ -33,6 +33,8 @@ Patch9: netdump-clientport.patch
Patch10: netdump-server-use-ip-cmd.patch
Patch11: netdump-server-default-dir.patch
Patch12: netdump-ldflags.patch
+Patch13: netdump-server-format-security.patch
+Patch14: netdump-server-offsetof.patch
Group: System Environment/Daemons
@@ -56,6 +58,8 @@ contact it and then writes the oops log and a memory dump to
%patch10 -p1
%patch11 -p1
%patch12 -p1
+%patch13 -p1
+%patch14 -p1
%build
export CFLAGS="%{optflags} `glib-config --cflags` -fPIE"
@@ -108,6 +112,10 @@ exit 0
%doc COPYING
%changelog
+* Tue Dec 03 2013 Neil Horman <nhorman at redhat.com> - 0.7.16-35
+- Fix build breaks with -Werror=format-security flag (bz 1037214)
+- Fix missing offsetof definition
+
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.7.16-34
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
More information about the scm-commits
mailing list