Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix string formatting issue in console-tools
@ 2017-02-08  6:30 Chen Qi
  2017-02-08  6:30 ` [PATCH 1/2] console-tools: fix string formatting issue Chen Qi
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chen Qi @ 2017-02-08  6:30 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit a624cf7f95c8cf4ff764cc997fd1db4601b97dcc:

  oeqa/selftest/pkgdata: use m4 instead of bash (2017-02-07 14:50:10 +0000)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib ChenQi/BUG9540
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/BUG9540

Chen Qi (2):
  console-tools: fix string formatting issue
  security_flags: enable string formatting check for console tools

 meta/conf/distro/include/security_flags.inc        |  1 -
 ...001-Fix-format-security-compilation-error.patch | 57 ++++++++++++++++++++++
 .../console-tools/console-tools_0.3.2.bb           |  1 +
 3 files changed, 58 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-core/console-tools/console-tools-0.3.2/0001-Fix-format-security-compilation-error.patch

-- 
1.9.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] console-tools: fix string formatting issue
  2017-02-08  6:30 [PATCH 0/2] Fix string formatting issue in console-tools Chen Qi
@ 2017-02-08  6:30 ` Chen Qi
  2017-02-08  6:30 ` [PATCH 2/2] security_flags: enable string formatting check for console tools Chen Qi
  2017-02-08  6:59 ` ✗ patchtest: failure for Fix string formatting issue in console-tools Patchwork
  2 siblings, 0 replies; 4+ messages in thread
From: Chen Qi @ 2017-02-08  6:30 UTC (permalink / raw)
  To: openembedded-core

Fix string formatting issue in console-tools. Otherwise, when compiling with
'-Wformat -Wformat-security -Werror=format-security', we would have compilation
error.

[YOCTO #9540]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 ...001-Fix-format-security-compilation-error.patch | 57 ++++++++++++++++++++++
 .../console-tools/console-tools_0.3.2.bb           |  1 +
 2 files changed, 58 insertions(+)
 create mode 100644 meta/recipes-core/console-tools/console-tools-0.3.2/0001-Fix-format-security-compilation-error.patch

diff --git a/meta/recipes-core/console-tools/console-tools-0.3.2/0001-Fix-format-security-compilation-error.patch b/meta/recipes-core/console-tools/console-tools-0.3.2/0001-Fix-format-security-compilation-error.patch
new file mode 100644
index 0000000..a283302
--- /dev/null
+++ b/meta/recipes-core/console-tools/console-tools-0.3.2/0001-Fix-format-security-compilation-error.patch
@@ -0,0 +1,57 @@
+Subject: Fix 'format-security' compilation error.
+
+Upstream-Status: pending
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ kbdtools/kbd_mode.c    | 6 +++---
+ kbdtools/setmetamode.c | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/kbdtools/kbd_mode.c b/kbdtools/kbd_mode.c
+index 02dca38..8dbcd39 100644
+--- a/kbdtools/kbd_mode.c
++++ b/kbdtools/kbd_mode.c
+@@ -120,7 +120,7 @@ int main(int argc, char *argv[])
+       /* report mode */
+       if (ioctl(fd, KDGKBMODE, &mode)) 
+ 	{
+-	  fprintf(stderr, progname);
++	  fprintf(stderr, "%s", progname);
+ 	  perror(_(": error reading keyboard mode\n"));
+ 	  exit(1);
+ 	}
+@@ -151,7 +151,7 @@ int main(int argc, char *argv[])
+     kbd_rep.period = rate;
+     if (ioctl(fd, KDKBDREP, &kbd_rep))
+       {
+-	fprintf(stderr, progname);
++	fprintf(stderr, "%s", progname);
+ 	perror(_(": error setting keyboard repeat mode\n"));
+ 	exit(1);
+       }
+@@ -160,7 +160,7 @@ int main(int argc, char *argv[])
+   
+   if (ioctl(fd, KDSKBMODE, mode))
+     {
+-      fprintf(stderr, progname);
++      fprintf(stderr, "%s", progname);
+       perror(_(": error setting keyboard mode\n"));
+       exit(1);
+     }
+diff --git a/kbdtools/setmetamode.c b/kbdtools/setmetamode.c
+index 5bed945..0ba7676 100644
+--- a/kbdtools/setmetamode.c
++++ b/kbdtools/setmetamode.c
+@@ -42,7 +42,7 @@ void report(int meta)
+     default:
+       s = N_("Strange mode for Meta key?\n");
+     }
+-  printf(_(s));
++  printf("%s", _(s));
+ }
+ 
+ struct meta 
+-- 
+2.8.3
+
diff --git a/meta/recipes-core/console-tools/console-tools_0.3.2.bb b/meta/recipes-core/console-tools/console-tools_0.3.2.bb
index 1db8414..286c2a4 100644
--- a/meta/recipes-core/console-tools/console-tools_0.3.2.bb
+++ b/meta/recipes-core/console-tools/console-tools_0.3.2.bb
@@ -16,6 +16,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/lct/console-tools-${PV}.tar.gz \
            file://no-dep-on-libfl.patch \
            file://0001-kbdtools-Include-sys-types.h-for-u_char-and-u_short-.patch \
            file://0001-Cover-the-else-with-__GLIBC__.patch \
+           file://0001-Fix-format-security-compilation-error.patch \
            file://lcmessage.m4 \
            file://Makevars"
 
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] security_flags: enable string formatting check for console tools
  2017-02-08  6:30 [PATCH 0/2] Fix string formatting issue in console-tools Chen Qi
  2017-02-08  6:30 ` [PATCH 1/2] console-tools: fix string formatting issue Chen Qi
@ 2017-02-08  6:30 ` Chen Qi
  2017-02-08  6:59 ` ✗ patchtest: failure for Fix string formatting issue in console-tools Patchwork
  2 siblings, 0 replies; 4+ messages in thread
From: Chen Qi @ 2017-02-08  6:30 UTC (permalink / raw)
  To: openembedded-core

As we've fixed the string formatting issue in console-tools, we don't
need to override SECURITY_STRINGFORMAT for console-tools any more.

[YOCTO #9540]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/conf/distro/include/security_flags.inc | 1 -
 1 file changed, 1 deletion(-)

diff --git a/meta/conf/distro/include/security_flags.inc b/meta/conf/distro/include/security_flags.inc
index eca835e..28e11bd 100644
--- a/meta/conf/distro/include/security_flags.inc
+++ b/meta/conf/distro/include/security_flags.inc
@@ -91,7 +91,6 @@ SECURITY_CFLAGS_pn-zlib = "${SECURITY_NO_PIE_CFLAGS}"
 
 # Recipes which fail to compile when elevating -Wformat-security to an error
 SECURITY_STRINGFORMAT_pn-busybox = ""
-SECURITY_STRINGFORMAT_pn-console-tools = ""
 SECURITY_STRINGFORMAT_pn-cmake = ""
 SECURITY_STRINGFORMAT_pn-expect = ""
 SECURITY_STRINGFORMAT_pn-gcc = ""
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* ✗ patchtest: failure for Fix string formatting issue in console-tools
  2017-02-08  6:30 [PATCH 0/2] Fix string formatting issue in console-tools Chen Qi
  2017-02-08  6:30 ` [PATCH 1/2] console-tools: fix string formatting issue Chen Qi
  2017-02-08  6:30 ` [PATCH 2/2] security_flags: enable string formatting check for console tools Chen Qi
@ 2017-02-08  6:59 ` Patchwork
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2017-02-08  6:59 UTC (permalink / raw)
  To: Qi.Chen; +Cc: openembedded-core

== Series Details ==

Series: Fix string formatting issue in console-tools
Revision: 1
URL   : https://patchwork.openembedded.org/series/5203/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             Upstream-Status is in incorrect format [test_upstream_status_format] 
  Suggested fix    Fix Upstream-Status format in meta/recipes-core/console-tools/console-tools-0.3.2/0001-Fix-format-security-compilation-error.patch so it is one of: Pending, Submitted, Accepted, Backport, Denied, Inappropriate



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-02-08  6:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-08  6:30 [PATCH 0/2] Fix string formatting issue in console-tools Chen Qi
2017-02-08  6:30 ` [PATCH 1/2] console-tools: fix string formatting issue Chen Qi
2017-02-08  6:30 ` [PATCH 2/2] security_flags: enable string formatting check for console tools Chen Qi
2017-02-08  6:59 ` ✗ patchtest: failure for Fix string formatting issue in console-tools Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox