summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-06-26 22:57:09 -0700
committerJoe MacDonald <joe_macdonald@mentor.com>2017-09-08 16:38:00 -0400
commit2d6e1909cdeb983869b7ff7ebd53b37b95d3e4ee (patch)
tree367a91834bc90f85eb9feb7094f970d62e11f684
parentd9f7ef40d74659a0348248841efadaf120d52c30 (diff)
downloadmeta-openembedded-2d6e1909cdeb983869b7ff7ebd53b37b95d3e4ee.tar.gz
rdate: Fix build with hardening
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
-rw-r--r--meta-networking/recipes-connectivity/rdate/rdate/0001-src-rdate-Fix-printf-format-errors.patch33
-rw-r--r--meta-networking/recipes-connectivity/rdate/rdate_1.5.bb4
2 files changed, 36 insertions, 1 deletions
diff --git a/meta-networking/recipes-connectivity/rdate/rdate/0001-src-rdate-Fix-printf-format-errors.patch b/meta-networking/recipes-connectivity/rdate/rdate/0001-src-rdate-Fix-printf-format-errors.patch
new file mode 100644
index 000000000..2f6518984
--- /dev/null
+++ b/meta-networking/recipes-connectivity/rdate/rdate/0001-src-rdate-Fix-printf-format-errors.patch
@@ -0,0 +1,33 @@
1From f58bcb43c31d08de58853b088681cbe4df36cbf9 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 26 Jun 2017 22:50:56 -0700
4Subject: [PATCH] src/rdate: Fix printf format errors
5
6Fixes
7
8rdate.c:85:41: error: format not a string literal and no format arguments [-Werror=format-security]
9| syslog(is_error?LOG_WARNING:LOG_INFO, buf);
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13Upstream-Status: Submitted
14
15 src/rdate.c | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18diff --git a/src/rdate.c b/src/rdate.c
19index 5c3e829..943d481 100644
20--- a/src/rdate.c
21+++ b/src/rdate.c
22@@ -82,7 +82,7 @@ write_log(int is_error, char *format, ...)
23 return; /* Error, which we can't report because this _is_ the error
24 reporting mechanism */
25 if(log_mode)
26- syslog(is_error?LOG_WARNING:LOG_INFO, buf);
27+ syslog(is_error?LOG_WARNING:LOG_INFO, "%s", buf);
28 if(is_error || print_mode)
29 fprintf(is_error?stderr:stdout, "%s: %s\n", argv0, buf);
30 }
31--
322.13.2
33
diff --git a/meta-networking/recipes-connectivity/rdate/rdate_1.5.bb b/meta-networking/recipes-connectivity/rdate/rdate_1.5.bb
index 818f16a52..b3af9275e 100644
--- a/meta-networking/recipes-connectivity/rdate/rdate_1.5.bb
+++ b/meta-networking/recipes-connectivity/rdate/rdate_1.5.bb
@@ -11,7 +11,9 @@ SECTION = "Applications/System"
11LICENSE = "GPLv2" 11LICENSE = "GPLv2"
12LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" 12LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
13 13
14SRC_URI= "https://www.aelius.com/njh/${BPN}/${BP}.tar.gz" 14SRC_URI = "https://www.aelius.com/njh/${BPN}/${BP}.tar.gz \
15 file://0001-src-rdate-Fix-printf-format-errors.patch \
16 "
15SRC_URI[md5sum] = "0a4f612480777fdf25264ac03c57eae6" 17SRC_URI[md5sum] = "0a4f612480777fdf25264ac03c57eae6"
16SRC_URI[sha256sum] = "6e800053eaac2b21ff4486ec42f0aca7214941c7e5fceedd593fa0be99b9227d" 18SRC_URI[sha256sum] = "6e800053eaac2b21ff4486ec42f0aca7214941c7e5fceedd593fa0be99b9227d"
17 19