aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Kjellerstedt <pkj@axis.com>2018-04-26 02:32:32 +0200
committerPeter Kjellerstedt <pkj@axis.com>2018-04-26 02:32:32 +0200
commitf7a0bb4e7916989bffc697c964aaf932e37095bd (patch)
treef901cf744d16fb42e92596e26ce2c726ef3688a6
parent6093e80932f72c8eec364cc03851a2386a0a2a39 (diff)
downloadmeta-gplv2-f7a0bb4e7916989bffc697c964aaf932e37095bd.tar.gz
meta-gplv2-f7a0bb4e7916989bffc697c964aaf932e37095bd.tar.bz2
meta-gplv2-f7a0bb4e7916989bffc697c964aaf932e37095bd.zip
rsync: Make it build with compile time hardening enabled
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
-rw-r--r--recipes-devtools/rsync/rsync-2.6.9/0001-Make-it-build-with-compile-time-hardening-enabled.patch32
-rw-r--r--recipes-devtools/rsync/rsync_2.6.9.bb1
2 files changed, 33 insertions, 0 deletions
diff --git a/recipes-devtools/rsync/rsync-2.6.9/0001-Make-it-build-with-compile-time-hardening-enabled.patch b/recipes-devtools/rsync/rsync-2.6.9/0001-Make-it-build-with-compile-time-hardening-enabled.patch
new file mode 100644
index 0000000..e368024
--- /dev/null
+++ b/recipes-devtools/rsync/rsync-2.6.9/0001-Make-it-build-with-compile-time-hardening-enabled.patch
@@ -0,0 +1,32 @@
+From 8b032db07981a88141984201736c9c6d4fffeb9a Mon Sep 17 00:00:00 2001
+From: Peter Kjellerstedt <pkj@axis.com>
+Date: Thu, 26 Apr 2018 02:29:22 +0200
+Subject: [PATCH] Make it build with compile time hardening enabled
+
+This avoids the following error:
+
+ clientserver.c: In function 'rsync_module':
+ clientserver.c:681:4: error: format not a string literal and no
+ format arguments [-Werror=format-security]
+ rprintf(FERROR, err_msg);
+ ^~~~~~~
+
+Upstream-Status: Inappropriate [legacy version]
+Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
+---
+ clientserver.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/clientserver.c b/clientserver.c
+index 1cb6a09..0aafb8b 100644
+--- a/clientserver.c
++++ b/clientserver.c
+@@ -678,7 +678,7 @@ static int rsync_module(int f_in, int f_out, int i, char *addr, char *host)
+
+ if (!ret || err_msg) {
+ if (err_msg)
+- rprintf(FERROR, err_msg);
++ rprintf(FERROR, "%s", err_msg);
+ else
+ option_error();
+ msleep(400);
diff --git a/recipes-devtools/rsync/rsync_2.6.9.bb b/recipes-devtools/rsync/rsync_2.6.9.bb
index 17f1d31..5c6c9d9 100644
--- a/recipes-devtools/rsync/rsync_2.6.9.bb
+++ b/recipes-devtools/rsync/rsync_2.6.9.bb
@@ -1,6 +1,7 @@
require rsync.inc
SRC_URI += "file://rsync-2.6.9-fname-obo.patch \
+ file://0001-Make-it-build-with-compile-time-hardening-enabled.patch \
file://rsyncd.conf \
"