From 84596f9c46fee0fff4f0732ee0456435caa4cba5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Tue, 3 Dec 2013 15:19:08 +0100 Subject: [PATCH] - fix build with -Werror=format-security (#1037228) --- opencryptoki-3.0-format.patch | 30 ++++++++++++++++++++++++++++++ opencryptoki.spec | 8 +++++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 opencryptoki-3.0-format.patch diff --git a/opencryptoki-3.0-format.patch b/opencryptoki-3.0-format.patch new file mode 100644 index 0000000..d2114cf --- /dev/null +++ b/opencryptoki-3.0-format.patch @@ -0,0 +1,30 @@ +From 02d46e95acfca2ac3ca85a3f1c3d271a04e29206 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dan=20Hor=C3=A1k?= +Date: Tue, 3 Dec 2013 14:44:36 +0100 +Subject: [PATCH] fix build with -Werror=format-security +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + + +Signed-off-by: Dan Horák +--- + usr/sbin/pkcsslotd/log.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/usr/sbin/pkcsslotd/log.c b/usr/sbin/pkcsslotd/log.c +index 949d95d..a2292ac 100755 +--- a/usr/sbin/pkcsslotd/log.c ++++ b/usr/sbin/pkcsslotd/log.c +@@ -823,7 +823,7 @@ BOOL PKCS_Log ( pLogHandle phLog, char *Format, va_list ap ) { + + /* Always log to syslog, if we're using it */ + if ( pInfo->UseSyslog ) { +- syslog(pInfo->LogLevel, Buffer); ++ syslog(pInfo->LogLevel, "%s", Buffer); + } + + return TRUE; +-- +1.8.1.4 + diff --git a/opencryptoki.spec b/opencryptoki.spec index aae6fa7..5ef28c6 100644 --- a/opencryptoki.spec +++ b/opencryptoki.spec @@ -3,7 +3,7 @@ Name: opencryptoki Summary: Implementation of the PKCS#11 (Cryptoki) specification v2.11 Version: 3.0 -Release: 6%{?dist} +Release: 7%{?dist} License: CPL Group: System Environment/Base URL: http://sourceforge.net/projects/opencryptoki @@ -23,6 +23,8 @@ Patch3: opencryptoki-3.0-opencryptoki-man.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1033284 # post-3.0 upstream fixes Patch4: opencryptoki-3.0-bz1033284.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1037228 +Patch5: opencryptoki-3.0-format.patch Requires(pre): shadow-utils coreutils sed BuildRequires: openssl-devel BuildRequires: trousers-devel @@ -167,6 +169,7 @@ cryptographic hardware such as IBM 4764 or 4765 that uses the %patch2 -p1 -b .unit %patch3 -p1 -b .opencryptoki-man %patch4 -p1 -b .bz1033284 +%patch5 -p1 -b .format # Upstream tarball has unnecessary executable perms set on the sources find . -name '*.[ch]' -print0 | xargs -0 chmod -x @@ -297,6 +300,9 @@ exit 0 %changelog +* Tue Dec 03 2013 Dan Horák - 3.0-7 +- fix build with -Werror=format-security (#1037228) + * Fri Nov 22 2013 Dan Horák - 3.0-6 - apply post-3.0 fixes (#1033284)