Skip to contentSkip to conversation

Add stdint.h for 'UINT16_MAX'

PATCH New Khem Raj 1 participant 13 messages Jun 28, 2017

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/13 Add stdint.h for 'UINT16_MAX'

---
 ...ude-stdint.h-system-header-for-UINT16_MAX.patch | 29 ++++++++++++++++++++++
 .../sblim-sfcb/sblim-sfcb_1.4.9.bb                 |  4 ++-
 2 files changed, 32 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb-1.4.9/0001-include-stdint.h-system-header-for-UINT16_MAX.patch
meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb-1.4.9/0001-include-stdint.h-system-header-for-UINT16_MAX.patch new file +29 -0
new file mode 100644
index 000000000..c2111a2c1
@@ -0,0 +1,29 @@
+From 446fb15f79499f52ce01ca759dbdcfe635519a82 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 27 Jun 2017 07:09:33 -0700
+Subject: [PATCH] include stdint.h system header for UINT16_MAX
+
+Fixes build error
+
+error: 'UINT16_MAX' undeclared (first use in this function)
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ interopServerProvider.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/interopServerProvider.c b/interopServerProvider.c
+index 23ae182..532febe 100644
+--- a/interopServerProvider.c
++++ b/interopServerProvider.c
+@@ -33,6 +33,7 @@
+ #include <sfcCommon/utilft.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <stdint.h>
+ #include <ctype.h>
+ #include <string.h>
+ #include <sys/types.h>
+-- 
+2.13.2
+
meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb +3 -1
index fa75fcc16..ddb1cba7f 100644
@@ -12,6 +12,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=f300afd598546add034364cd0a533261"
 DEPENDS = "curl libpam openssl sblim-sfc-common unzip-native"
 
 SRC_URI = "http://downloads.sourceforge.net/sblim/${BP}.tar.bz2 \
+           file://sfcb.service \
            file://sblim-sfcb-1.3.9-sfcbrepos-schema-location.patch \
            file://sblim-sfcb-1.3.15-fix-provider-debugging.patch \
            file://sblim-sfcb-1.3.16-maxMsgLen.patch \
@@ -19,7 +20,8 @@ SRC_URI = "http://downloads.sourceforge.net/sblim/${BP}.tar.bz2 \
            file://sblim-sfcb-1.3.16-multilib-man-cfg.patch \
            file://sblim-sfcb-1.4.8-default-ecdh-curve-name.patch \
            file://sblim-sfcb-1.4.9-fix-ftbfs.patch \
-           file://sfcb.service"
+           file://0001-include-stdint.h-system-header-for-UINT16_MAX.patch \
+"
 
 SRC_URI[md5sum] = "28021cdabc73690a94f4f9d57254ce30"
 SRC_URI[sha256sum] = "634a67b2f7ac3b386a79160eb44413d618e33e4e7fc74ae68b0240484af149dd"
Signature · 1 line
2.13.2
author
#1 lore raw

PATCH 2/13 networkmanager: Fix build with hardening

Drop using xlocale.h

---
 ...stemd-xlocale.h-is-dropped-by-newer-glibc.patch | 29 ++++++++++
 ...-string-in-g_dbus_message_new_method_erro.patch | 67 ++++++++++++++++++++++
 .../networkmanager/networkmanager_1.4.4.bb         |  2 +
 3 files changed, 98 insertions(+)
 create mode 100644 meta-oe/recipes-connectivity/networkmanager/networkmanager/0001-systemd-xlocale.h-is-dropped-by-newer-glibc.patch
 create mode 100644 meta-oe/recipes-connectivity/networkmanager/networkmanager/0002-user-format-string-in-g_dbus_message_new_method_erro.patch
meta-oe/recipes-connectivity/networkmanager/networkmanager/0001-systemd-xlocale.h-is-dropped-by-newer-glibc.patch new file +29 -0
new file mode 100644
index 000000000..4234e2be2
@@ -0,0 +1,29 @@
+From a9bfe6f2029d75caf28fcdf3e740843cf6359615 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 27 Jun 2017 07:31:25 -0700
+Subject: [PATCH 1/2] systemd: xlocale.h is dropped by newer glibc
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/systemd/src/basic/parse-util.c | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/src/systemd/src/basic/parse-util.c b/src/systemd/src/basic/parse-util.c
+index 9c21e5a..dd95d1f 100644
+--- a/src/systemd/src/basic/parse-util.c
++++ b/src/systemd/src/basic/parse-util.c
+@@ -25,11 +25,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#ifdef __GLIBC__
+-#include <xlocale.h>
+-#else
+ #include <locale.h>
+-#endif
+ #include "alloc-util.h"
+ #include "extract-word.h"
+ #include "macro.h"
+-- 
+2.13.2
+
meta-oe/recipes-connectivity/networkmanager/networkmanager/0002-user-format-string-in-g_dbus_message_new_method_erro.patch new file +67 -0

67 lines not on this page · raw message

meta-oe/recipes-connectivity/networkmanager/networkmanager_1.4.4.bb +2 -0
index 0de4383fb..e7dd4ef31 100644
@@ -34,6 +34,8 @@ SRC_URI = "${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManag
            file://0001-check-for-strndupa-before-using-it.patch \
            file://0001-dns-resolved-add-systemd-resolved-backend.patch \
            file://0001-dns-resolved-also-check-for-etc-resolv-conf.systemd.patch \
+           file://0001-systemd-xlocale.h-is-dropped-by-newer-glibc.patch \
+           file://0002-user-format-string-in-g_dbus_message_new_method_erro.patch \
            "
 SRC_URI[md5sum] = "63f1e0d6d7e9099499d062c84c927a75"
 SRC_URI[sha256sum] = "829378f318cc008d138a23ca6a9191928ce75344e7e47a2f2c35f4ac82133309"
Signature · 1 line
2.13.2
author
#2 lore raw

PATCH 3/13 strongswan: Include stdint.h for uintptr_t

In reply to Khem Raj
---
 ...1-memory.h-Include-stdint.h-for-uintptr_t.patch | 26 ++++++++++++++++++++++
 .../recipes-support/strongswan/strongswan_5.5.3.bb |  5 +++--
 2 files changed, 29 insertions(+), 2 deletions(-)
 create mode 100644 meta-networking/recipes-support/strongswan/files/0001-memory.h-Include-stdint.h-for-uintptr_t.patch
meta-networking/recipes-support/strongswan/files/0001-memory.h-Include-stdint.h-for-uintptr_t.patch new file +26 -0
new file mode 100644
index 000000000..7ebc39818
@@ -0,0 +1,26 @@
+From 2a3ab04bbdc4624792886aa51579eadb427ef99e Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 27 Jun 2017 07:42:11 -0700
+Subject: [PATCH] memory.h: Include stdint.h for uintptr_t
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/libstrongswan/utils/utils/memory.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/libstrongswan/utils/utils/memory.h b/src/libstrongswan/utils/utils/memory.h
+index b978e7c..55aaaf5 100644
+--- a/src/libstrongswan/utils/utils/memory.h
++++ b/src/libstrongswan/utils/utils/memory.h
+@@ -22,6 +22,8 @@
+ #ifndef MEMORY_H_
+ #define MEMORY_H_
+ 
++#include <stdint.h>
++
+ /**
+  * Helper function that compares two binary blobs for equality
+  */
+-- 
+2.13.2
+
meta-networking/recipes-support/strongswan/strongswan_5.5.3.bb +3 -2
index 9215233b1..3fb56bcfe 100644
@@ -8,8 +8,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 DEPENDS = "gmp openssl flex-native flex bison-native"
 
 SRC_URI = "http://download.strongswan.org/strongswan-${PV}.tar.bz2 \
-        file://fix-funtion-parameter.patch \
-"
+           file://fix-funtion-parameter.patch \
+           file://0001-memory.h-Include-stdint.h-for-uintptr_t.patch \
+           "
 
 SRC_URI[md5sum] = "4afffe3c219bb2e04f09510905af836b"
 SRC_URI[sha256sum] = "c5ea54b199174708de11af9b8f4ecf28b5b0743d4bc0e380e741f25b28c0f8d4"
Signature · 1 line
2.13.2
author
#3 lore raw

PATCH 4/13 umip: Fix buid with hardening

In reply to Khem Raj
---
 .../0001-Add-format-string-to-fprintf-call.patch   | 26 ++++++++++++++++++++++
 meta-oe/recipes-connectivity/umip/umip_1.0.bb      |  9 ++++----
 2 files changed, 31 insertions(+), 4 deletions(-)
 create mode 100644 meta-oe/recipes-connectivity/umip/files/0001-Add-format-string-to-fprintf-call.patch
meta-oe/recipes-connectivity/umip/files/0001-Add-format-string-to-fprintf-call.patch new file +26 -0
new file mode 100644
index 000000000..8e5f4da36
@@ -0,0 +1,26 @@
+From a0ad5128d14b022239445e251cf4a9826e86aa96 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 27 Jun 2017 07:48:31 -0700
+Subject: [PATCH] Add format string to fprintf() call
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/vt.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/vt.c b/src/vt.c
+index 795d393..a533d3d 100644
+--- a/src/vt.c
++++ b/src/vt.c
+@@ -499,7 +499,7 @@ static int vt_cmd_dump_candidates(const struct vt_handle *vh,
+ 		}
+ 		llen += cmdlen;
+ 
+-		ret = fprintf(vh->vh_stream, e->cmd);
++		ret = fprintf(vh->vh_stream, "%s", e->cmd);
+ 		if (ret < 0)
+ 			return ret;
+ 
+-- 
+2.13.2
+
meta-oe/recipes-connectivity/umip/umip_1.0.bb +5 -4
index a25056645..cbf306144 100644
@@ -10,10 +10,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=073dc31ccb2ebed70db54f1e8aeb4c33"
 DEPENDS = "rpm indent-native"
 
 SRC_URI = "git://git.umip.org/umip.git \
-    file://add-dependency-to-support-parallel-compilation.patch \
-    file://mip6d \
-    file://mip6d.service \
-"
+           file://add-dependency-to-support-parallel-compilation.patch \
+           file://mip6d \
+           file://mip6d.service \
+           file://0001-Add-format-string-to-fprintf-call.patch \
+           "
 SRCREV = "428974c2d0d8e75a2750a3ab0488708c5dfdd8e3"
 
 S = "${WORKDIR}/git"
Signature · 1 line
2.13.2
author
#4 lore raw

PATCH 5/13 gtkperf: Fix build with hardening flags

In reply to Khem Raj
---
 .../0001-Include-stdlib.h-for-exit-API.patch       | 34 ++++++++++++++++++
 .../0002-timing.c-Fix-format-security-errors.patch | 42 ++++++++++++++++++++++
 meta-oe/recipes-graphics/gtkperf/gtkperf_0.40.bb   |  5 ++-
 3 files changed, 80 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-graphics/gtkperf/gtkperf/0001-Include-stdlib.h-for-exit-API.patch
 create mode 100644 meta-oe/recipes-graphics/gtkperf/gtkperf/0002-timing.c-Fix-format-security-errors.patch
meta-oe/recipes-graphics/gtkperf/gtkperf/0001-Include-stdlib.h-for-exit-API.patch new file +34 -0
new file mode 100644
index 000000000..d529ddd23
@@ -0,0 +1,34 @@
+From f8ac48abded02353918b02db38629988bd111c46 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 27 Jun 2017 08:19:44 -0700
+Subject: [PATCH 1/2] Include stdlib.h for exit() API
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes
+main.c:81: warning: incompatible implicit declaration of built-in function ‘exit’
+
+Patch from Debian
+http://sources.debian.net/src/gtkperf/0.40%2Bds-2/debian/patches/01-include_stdlib.patch/
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/main.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/main.c b/src/main.c
+index 888eb36..c226799 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -11,6 +11,7 @@
+ #endif
+ 
+ #include <getopt.h>
++#include <stdlib.h>
+ 
+ #include "interface.h"
+ #include "support.h"
+-- 
+2.13.2
+
meta-oe/recipes-graphics/gtkperf/gtkperf/0002-timing.c-Fix-format-security-errors.patch new file +42 -0

42 lines not on this page · raw message

meta-oe/recipes-graphics/gtkperf/gtkperf_0.40.bb +4 -1
index e404a7a51..2db91904f 100644
@@ -4,7 +4,10 @@ LICENSE = "LGPLv2.1"
 LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
 
 SRC_URI = "http://prdownloads.sourceforge.net/${BPN}/${BPN}_${PV}.tar.gz \
-           file://Makevars"
+           file://Makevars \
+           file://0001-Include-stdlib.h-for-exit-API.patch \
+           file://0002-timing.c-Fix-format-security-errors.patch \
+           "
 
 SRC_URI[md5sum] = "4331dde4bb83865e15482885fcb0cc53"
 SRC_URI[sha256sum] = "9704344e732038eecbd007dd996a56293a6b027b5b76f3f036273a3fae1ab27b"
Signature · 1 line
2.13.2
author
#5 lore raw

PATCH 6/13 wmiconfig: Fix build with hardening flags

In reply to Khem Raj
---
 .../0001-makefile-Pass-CFLAGS-to-compile.patch     |  26 +
 .../0002-fix-err-API-to-have-format-string.patch   | 656 +++++++++++++++++++++
 meta-oe/recipes-support/wmiconfig/wmiconfig_svn.bb |   5 +-
 3 files changed, 686 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-support/wmiconfig/wmiconfig/0001-makefile-Pass-CFLAGS-to-compile.patch
 create mode 100644 meta-oe/recipes-support/wmiconfig/wmiconfig/0002-fix-err-API-to-have-format-string.patch
meta-oe/recipes-support/wmiconfig/wmiconfig/0001-makefile-Pass-CFLAGS-to-compile.patch new file +26 -0
new file mode 100644
index 000000000..90eff5bb0
@@ -0,0 +1,26 @@
+From 0378cbb323c662a565f7f3de2dee3d8a646e7bd1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 27 Jun 2017 09:32:42 -0700
+Subject: [PATCH 1/2] makefile: Pass CFLAGS to compile
+
+Set CC if not already set
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ host/tools/wmiconfig/Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/host/tools/wmiconfig/Makefile b/host/tools/wmiconfig/Makefile
+index c6738c5..3253a7e 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,4 +1,4 @@
+-CC :=$(ATH_CROSS_COMPILE_TYPE)gcc
++CC ?= $(ATH_CROSS_COMPILE_TYPE)gcc
+ 
+ all:
+-	$(CC) -Wall -DUSER_KEYS -g $(LDFLAGS) -I../../include -I../../../include -I../../wlan/include -I../../os/linux/include wmiconfig.c -o wmiconfig
++	$(CC) -Wall -DUSER_KEYS -g $(CFLAGS) $(LDFLAGS) -I../../include -I../../../include -I../../wlan/include -I../../os/linux/include wmiconfig.c -o wmiconfig
+-- 
+2.13.2
+
meta-oe/recipes-support/wmiconfig/wmiconfig/0002-fix-err-API-to-have-format-string.patch new file +656 -0

656 lines not on this page · raw message

meta-oe/recipes-support/wmiconfig/wmiconfig_svn.bb +4 -1
index 596a4e67e..c66572b1c 100644
@@ -6,7 +6,10 @@ SRCREV = "5394"
 PV = "0.0.0+svnr${SRCPV}"
 PR = "r2"
 
-SRC_URI = "svn://svn.openmoko.org/trunk/src/target;module=AR6kSDK.build_sw.18;protocol=http"
+SRC_URI = "svn://svn.openmoko.org/trunk/src/target;module=AR6kSDK.build_sw.18;protocol=http \
+           file://0001-makefile-Pass-CFLAGS-to-compile.patch \
+           file://0002-fix-err-API-to-have-format-string.patch \
+           "
 S = "${WORKDIR}/AR6kSDK.build_sw.18/host/tools/wmiconfig"
 
 CLEANBROKEN = "1"
Signature · 1 line
2.13.2
author
#6 lore raw

PATCH 7/13 netkit-rpc: Fix build with hardening flags

In reply to Khem Raj
---
 .../0001-rpcgen-Fix-printf-formats.patch           | 51 ++++++++++++++++++++++
 .../recipes-netkit/netkit-rpc/netkit-rpc_0.17.bb   |  4 +-
 2 files changed, 54 insertions(+), 1 deletion(-)
 create mode 100644 meta-networking/recipes-netkit/netkit-rpc/netkit-rpc/0001-rpcgen-Fix-printf-formats.patch
meta-networking/recipes-netkit/netkit-rpc/netkit-rpc/0001-rpcgen-Fix-printf-formats.patch new file +51 -0
new file mode 100644
index 000000000..8bd77d2e4
@@ -0,0 +1,51 @@
+From 439e3e35f7fcbff1abb782de4b19b31e43ae3449 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 27 Jun 2017 09:59:19 -0700
+Subject: [PATCH] rpcgen: Fix printf formats
+
+Fixes build with hardening flags
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ rpcgen/rpc_hout.c   | 2 +-
+ rpcgen/rpc_tblout.c | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/rpcgen/rpc_hout.c b/rpcgen/rpc_hout.c
+index 0ef52df..09a7b57 100644
+--- a/rpcgen/rpc_hout.c
++++ b/rpcgen/rpc_hout.c
+@@ -474,7 +474,7 @@ pdeclaration(const char *name, declaration *dec, int tab,
+ 			break;
+ 		}
+ 	}
+-	f_print(fout, separator );
++	f_print(fout, "%s", separator );
+ }
+ 
+ static int
+diff --git a/rpcgen/rpc_tblout.c b/rpcgen/rpc_tblout.c
+index d64bfde..fd62a52 100644
+--- a/rpcgen/rpc_tblout.c
++++ b/rpcgen/rpc_tblout.c
+@@ -99,7 +99,7 @@ write_table(const definition *def)
+ 		} 
+ 		else {
+ 			expected = 1;
+-			f_print(fout, null_entry);
++			f_print(fout, "%s", null_entry);
+ 		}
+ 		for (proc = vp->procs; proc != NULL; proc = proc->next) {
+ 			current = atoi(proc->proc_num);
+@@ -139,7 +139,7 @@ write_table(const definition *def)
+ 		}
+ 
+ 		/* print the table trailer */
+-		f_print(fout, tbl_end);
++		f_print(fout, "%s", tbl_end);
+ 		f_print(fout, tbl_nproc, progvers, progvers, progvers);
+ 	}
+ }
+-- 
+2.13.2
+
meta-networking/recipes-netkit/netkit-rpc/netkit-rpc_0.17.bb +3 -1
index abc9d88cb..75ec07cfe 100644
@@ -5,7 +5,9 @@ LICENSE = "SPL-1.0"
 LIC_FILES_CHKSUM = "file://rpcinfo/rpcinfo.c;beginline=2;endline=3;md5=3e6339e3ce266e1122c5ba293e04bc89"
 
 SRC_URI = "http://sources.openembedded.org/${BPN}-${PV}.tar.gz \
-           file://gcc4.patch"
+           file://gcc4.patch \
+           file://0001-rpcgen-Fix-printf-formats.patch \
+           "
 SRC_URI[md5sum] = "67212720482ea1aea9182a98653a9642"
 SRC_URI[sha256sum] = "421d63b414162237a72867061f1bd3e3752a0d962cd5d30b5e933ddad8a14d3b"
 
Signature · 1 line
2.13.2
author
#7 lore raw

PATCH 8/13 netkit-telnet: Fix build with hardening

In reply to Khem Raj
---
 ...1-telnet-telnetd-Fix-print-format-strings.patch | 66 ++++++++++++++++++++++
 .../netkit-telnet/netkit-telnet_0.17.bb            | 11 ++--
 2 files changed, 72 insertions(+), 5 deletions(-)
 create mode 100644 meta-networking/recipes-netkit/netkit-telnet/files/0001-telnet-telnetd-Fix-print-format-strings.patch
meta-networking/recipes-netkit/netkit-telnet/files/0001-telnet-telnetd-Fix-print-format-strings.patch new file +66 -0
new file mode 100644
index 000000000..f2f1b12e2
@@ -0,0 +1,66 @@
+From 7a3095d1e9b7c73f9dca56250f433bcfc7cb660e Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 27 Jun 2017 10:15:34 -0700
+Subject: [PATCH] telnet/telnetd: Fix print format strings
+
+Fixes build with hardening flags
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ telnet/utilities.cc | 6 +++---
+ telnetd/utility.c   | 6 +++---
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/telnet/utilities.cc b/telnet/utilities.cc
+index 66839ab..36f0731 100644
+--- a/telnet/utilities.cc
++++ b/telnet/utilities.cc
+@@ -583,17 +583,17 @@ void printsub(int direction, unsigned char *pointer, int length) {
+ 			case ENV_VAR:
+ 			    if (pointer[1] == TELQUAL_SEND)
+ 				goto def_case;
+-			    fprintf(NetTrace, "\" VAR " + noquote);
++			    fprintf(NetTrace, "%s", "\" VAR " + noquote);
+ 			    noquote = 2;
+ 			    break;
+ 
+ 			case ENV_VALUE:
+-			    fprintf(NetTrace, "\" VALUE " + noquote);
++			    fprintf(NetTrace, "%s", "\" VALUE " + noquote);
+ 			    noquote = 2;
+ 			    break;
+ 
+ 			case ENV_ESC:
+-			    fprintf(NetTrace, "\" ESC " + noquote);
++			    fprintf(NetTrace, "%s", "\" ESC " + noquote);
+ 			    noquote = 2;
+ 			    break;
+ 
+diff --git a/telnetd/utility.c b/telnetd/utility.c
+index 29b7da1..75314cb 100644
+--- a/telnetd/utility.c
++++ b/telnetd/utility.c
+@@ -909,17 +909,17 @@ printsub(char direction, unsigned char *pointer, int length)
+ 			case ENV_VAR:
+ 			    if (pointer[1] == TELQUAL_SEND)
+ 				goto def_case;
+-			    netoprintf("\" VAR " + noquote);
++			    netoprintf("%s", "\" VAR " + noquote);
+ 			    noquote = 2;
+ 			    break;
+ 
+ 			case ENV_VALUE:
+-			    netoprintf("\" VALUE " + noquote);
++			    netoprintf("%s", "\" VALUE " + noquote);
+ 			    noquote = 2;
+ 			    break;
+ 
+ 			case ENV_ESC:
+-			    netoprintf("\" ESC " + noquote);
++			    netoprintf("%s", "\" ESC " + noquote);
+ 			    noquote = 2;
+ 			    break;
+ 
+-- 
+2.13.2
+
meta-networking/recipes-netkit/netkit-telnet/netkit-telnet_0.17.bb +6 -5
index 9438adc0f..54a58c8a1 100644
@@ -5,11 +5,12 @@ LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://telnet/telnet.cc;beginline=2;endline=3;md5=780868e7b566313e70cb701560ca95ef"
 
 SRC_URI = "ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/${BP}.tar.gz \
-    file://To-aviod-buffer-overflow-in-telnet.patch \
-    file://Warning-fix-in-the-step-of-install.patch \
-    file://telnet-xinetd \
-    file://cross-compile.patch \
-"
+           file://To-aviod-buffer-overflow-in-telnet.patch \
+           file://Warning-fix-in-the-step-of-install.patch \
+           file://telnet-xinetd \
+           file://cross-compile.patch \
+           file://0001-telnet-telnetd-Fix-print-format-strings.patch \
+           "
 
 EXTRA_OEMAKE = "INSTALLROOT=${D} SBINDIR=${sbindir} DAEMONMODE=755 \
     MANMODE=644 MANDIR=${mandir}"
Signature · 1 line
2.13.2
author
#8 lore raw

PATCH 9/13 ncftp: Upgrade to 3.2.6

In reply to Khem Raj

Fix build with hardening flags

---
 .../recipes-daemons/ncftp/ncftp/unistd.patch       | 32 ++++++++++++++++++++++
 .../ncftp/{ncftp_3.2.5.bb => ncftp_3.2.6.bb}       | 16 ++++++++---
 2 files changed, 44 insertions(+), 4 deletions(-)
 create mode 100644 meta-networking/recipes-daemons/ncftp/ncftp/unistd.patch
 rename meta-networking/recipes-daemons/ncftp/{ncftp_3.2.5.bb => ncftp_3.2.6.bb} (53%)
meta-networking/recipes-daemons/ncftp/ncftp/unistd.patch new file +32 -0
new file mode 100644
index 000000000..1c8146eda
@@ -0,0 +1,32 @@
+This patch is needed to avoid double definitions of functions
+especially when building with security flags turned on. The double
+definitions causes the sed.sh script in configure to fail since it
+starts to spit out double outputs e.g.
+
+wi_cv_gethostname_size_t size_t size_t
+
+which then caused almost all subsequent compile time tests to fail since
+this gets into confdefs.h file
+
+removing this include causes only one definitions to be emitted into
+the genrated protos.h file and thus avoiding the above failure.
+
+Other solution would to fix sed.sh to ignore double definitions
+
+Upstream-Status: Pending
+
+Signed-of-by: Khem Raj <[email protected]>
+
+
+Index: ncftp-3.2.6/configure
+===================================================================
+--- ncftp-3.2.6.orig/configure
++++ ncftp-3.2.6/configure
+@@ -7859,7 +7859,6 @@ chmod 755 "$wi_tmpdir/prpp.pl"
+ cat << 'EOF' > "$wi_tmpdir/unistd.c"
+ #include <confdefs.h>
+ 
+-#include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
meta-networking/recipes-daemons/ncftp/ncftp_3.2.6.bb renamed from meta-networking/recipes-daemons/ncftp/ncftp_3.2.5.bb +12 -4
similarity index 53%
rename from meta-networking/recipes-daemons/ncftp/ncftp_3.2.5.bb
rename to meta-networking/recipes-daemons/ncftp/ncftp_3.2.6.bb
index 893eacb99..5f92f27fd 100644
@@ -2,21 +2,29 @@ DESCRIPTION = "A sophisticated console ftp client"
 HOMEPAGE = "http://ncftp.com/"
 SECTION = "net"
 LICENSE = "ClArtistic"
-LIC_FILES_CHKSUM = "file://ncftp/cmds.c;beginline=3;endline=4;md5=9de76faeaedc4f908082e3f8142715f4"
+LIC_FILES_CHKSUM = "file://ncftp/cmds.c;beginline=3;endline=4;md5=9c2390809f71465aa7ff76e03dc14d91"
 DEPENDS = "ncurses"
 
-SRC_URI = "${DEBIAN_MIRROR}/main/n/${BPN}/${BPN}_${PV}.orig.tar.gz \
+SRC_URI = "ftp://ftp.ncftp.com/${BPN}/${BP}-src.tar.xz \
            file://ncftp-configure-use-BUILD_CC-for-ccdv.patch \
+           file://unistd.patch \
 "
-SRC_URI[md5sum] = "685e45f60ac11c89442c572c28af4228"
-SRC_URI[sha256sum] = "ac111b71112382853b2835c42ebe7bd59acb7f85dd00d44b2c19fbd074a436c4"
+SRC_URI[md5sum] = "42d0f896d69a4d603ec097546444245f"
+SRC_URI[sha256sum] = "5f200687c05d0807690d9fb770327b226f02dd86155b49e750853fce4e31098d"
 
 inherit autotools-brokensep pkgconfig
 
+CFLAGS += "-DNO_SSLv2 -D_FILE_OFFSET_BITS=64 -Wall"
+
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[ccdv] = "--enable-ccdv,--disable-ccdv,,"
 
+EXTRA_OECONF = "--disable-precomp"
+TARGET_CC_ARCH_append = " ${SELECTED_OPTIMIZATION}"
+
 do_configure() {
+    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}
+    install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
     oe_runconf
 }
 do_install () {
Signature · 1 line
2.13.2
author
#9 lore raw

PATCH 10/13 lmbench: Fix build with hardening flags

In reply to Khem Raj
---
 .../0001-lat_http.c-Add-printf-format.patch        | 26 ++++++++++++++++++++++
 .../recipes-benchmark/lmbench/lmbench_3.0-a9.bb    |  3 ++-
 2 files changed, 28 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-lat_http.c-Add-printf-format.patch
meta-oe/recipes-benchmark/lmbench/lmbench-3.0-a9/0001-lat_http.c-Add-printf-format.patch new file +26 -0
new file mode 100644
index 000000000..18ed43d06
@@ -0,0 +1,26 @@
+From 6faa6acdf20aa6f738eed1483b7dceed94286adb Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 27 Jun 2017 14:39:10 -0700
+Subject: [PATCH] lat_http.c: Add printf format
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/lat_http.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/lat_http.c b/src/lat_http.c
+index c630d59..28d04f7 100644
+--- a/src/lat_http.c
++++ b/src/lat_http.c
+@@ -27,7 +27,7 @@ http(char *server, char *file, int prog)
+ 	sock = tcp_connect(server, prog, SOCKOPT_REUSE);
+ 	sprintf(buf, "GET /%s HTTP/1.0\r\n\r\n\n", file);
+ 	if (debug) {
+-		printf(buf);
++		printf("%s", buf);
+ 	}
+ 	write(sock, buf, strlen(buf));
+ 	while ((n = read(sock, buf, XFERSIZE)) > 0) {
+-- 
+2.13.2
+
meta-oe/recipes-benchmark/lmbench/lmbench_3.0-a9.bb +2 -1
index 62906fd68..43ac1d038 100644
@@ -19,7 +19,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/lmbench/lmbench-${PV}.tgz \
            file://lmbench_result_html_report.patch \
            file://fix-lmbench-memory-check-failure.patch \
            file://0001-avoid-gcc-optimize-away-the-loops.patch \
-"
+           file://0001-lat_http.c-Add-printf-format.patch \
+           "
 SRC_URI[md5sum] = "b3351a3294db66a72e2864a199d37cbf"
 SRC_URI[sha256sum] = "cbd5777d15f44eab7666dcac418054c3c09df99826961a397d9acf43d8a2a551"
 
Signature · 1 line
2.13.2
author
#10 lore raw

PATCH 11/13 wv: Fix build with hardening flags

In reply to Khem Raj
---
 ...vRTF.c-Specify-print-format-in-rtf_output.patch | 26 ++++++++++++++++++++++
 meta-gnome/recipes-gnome/wv/wv_1.2.4.bb            |  3 ++-
 2 files changed, 28 insertions(+), 1 deletion(-)
 create mode 100644 meta-gnome/recipes-gnome/wv/wv-1.2.4/0001-wvRTF.c-Specify-print-format-in-rtf_output.patch
meta-gnome/recipes-gnome/wv/wv-1.2.4/0001-wvRTF.c-Specify-print-format-in-rtf_output.patch new file +26 -0
new file mode 100644
index 000000000..2fc3f367f
@@ -0,0 +1,26 @@
+From 079529b8d5e339e2211fa2f8c15543a738a627bc Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 27 Jun 2017 14:50:51 -0700
+Subject: [PATCH] wvRTF.c: Specify print format in rtf_output()
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ wvRTF.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/wvRTF.c b/wvRTF.c
+index 361d258..4f24b30 100644
+--- a/wvRTF.c
++++ b/wvRTF.c
+@@ -192,7 +192,7 @@ output_rtfUserData (rtfUserData * ud)
+     rtf_output_char ('{');
+ 
+     /* font color */
+-    rtf_output (rtfColors[ud->cCol]);
++    rtf_output ("%s", rtfColors[ud->cCol]);
+ 
+     /* font face */
+     rtf_output ("\\f%d", ud->cFont);
+-- 
+2.13.2
+
meta-gnome/recipes-gnome/wv/wv_1.2.4.bb +2 -1
index 6489c6f19..8ed1fcd15 100644
@@ -8,7 +8,8 @@ DEPENDS = "libgsf glib-2.0 libpng"
 SRC_URI = "${SOURCEFORGE_MIRROR}/wvware/wv-${PV}.tar.gz \
            file://pkgconfig.patch \
            file://0001-configure-use-foreign-mode-to-avoid-errors-with-miss.patch \
-          "
+           file://0001-wvRTF.c-Specify-print-format-in-rtf_output.patch \
+           "
 
 SRC_URI[md5sum] = "c1861c560491f121e12917fa76970ac5"
 SRC_URI[sha256sum] = "673109910e22d4cf94cc8be4dcb9a0c41b5fbdb1736d4b7bdc7778894d57c2d6"
Signature · 1 line
2.13.2
author
#11 lore raw

PATCH 12/13 ippool: Fix build errors found with hardening flags

In reply to Khem Raj
---
 ...timer-Check-for-return-value-of-write-API.patch | 28 ++++++++++++++++++++++
 .../recipes-daemons/ippool/ippool_1.3.bb           | 22 ++++++++---------
 2 files changed, 39 insertions(+), 11 deletions(-)
 create mode 100644 meta-networking/recipes-daemons/ippool/ippool/0001-usl_timer-Check-for-return-value-of-write-API.patch
meta-networking/recipes-daemons/ippool/ippool/0001-usl_timer-Check-for-return-value-of-write-API.patch new file +28 -0
new file mode 100644
index 000000000..6fb7cc5c4
@@ -0,0 +1,28 @@
+From 5d7f20c045b3c74dad2c53d65e30bd4840250082 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 27 Jun 2017 15:17:19 -0700
+Subject: [PATCH] usl_timer: Check for return value of write() API
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ usl/usl_timer.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/usl/usl_timer.c b/usl/usl_timer.c
+index fda752b..d8414a6 100644
+--- a/usl/usl_timer.c
++++ b/usl/usl_timer.c
+@@ -94,7 +94,9 @@ void usl_timer_tick(void)
+ 
+ 	if (!usl_tick_pending) {
+ 		usl_tick_pending = 1;
+-		write(usl_tick_pipe[1], &msg, sizeof(msg));
++		if (write(usl_tick_pipe[1], &msg, sizeof(msg)) != sizeof(msg)) {
++			fprintf(stderr, "write to fd %i failed: %s\n", usl_tick_pipe[1], strerror(errno));
++		}
+ 	}
+ }
+ 
+-- 
+2.13.2
+
meta-networking/recipes-daemons/ippool/ippool_1.3.bb +11 -11
index 969f434cc..e1c9215ca 100644
@@ -11,16 +11,16 @@ HOMEPAGE = "http://www.openl2tp.org/"
 SECTION = "console/network"
 LICENSE = "GPLv2+"
 
-SRC_URI = "\
-        https://sourceforge.net/projects/openl2tp/files/${BPN}/${PV}/${BPN}-${PV}.tar.gz \
-        file://ippool_usl_timer.patch \
-        file://ippool_parallel_make_and_pic.patch \
-        file://ippool_init.d.patch \
-        file://always_syslog.patch \
-        file://makefile-add-ldflags.patch \
-        file://runtest.sh \
-        file://ippool.service \
-        "
+SRC_URI = "https://sourceforge.net/projects/openl2tp/files/${BPN}/${PV}/${BPN}-${PV}.tar.gz \
+           file://runtest.sh \
+           file://ippool.service \
+           file://ippool_usl_timer.patch \
+           file://ippool_parallel_make_and_pic.patch \
+           file://ippool_init.d.patch \
+           file://always_syslog.patch \
+           file://makefile-add-ldflags.patch \
+           file://0001-usl_timer-Check-for-return-value-of-write-API.patch \
+           "
 
 LIC_FILES_CHKSUM = "file://LICENSE;md5=4c59283b82fc2b166455e0fc23c71c6f"
 SRC_URI[md5sum] = "e2401e65db26a3764585b97212888fae"
@@ -50,7 +50,7 @@ do_compile_prepend() {
 
     # ignore the OPT_CFLAGS?= in Makefile,
     # it should be in CFLAGS from env
-    export OPT_CFLAGS=
+    export OPT_CFLAGS="${SELECTED_OPTIMIZATION}"
 }
 
 
Signature · 1 line
2.13.2
author
#12 lore raw

PATCH 13/13 aufs-util: Upgrade to 3.18

In reply to Khem Raj

Fix out of tree build, helps building with devtool

---
 meta-filesystems/recipes-utils/aufs-util/aufs-util_git.bb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
meta-filesystems/recipes-utils/aufs-util/aufs-util_git.bb +3 -3
index 50d8b909a..1e8677574 100644
@@ -7,8 +7,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=892f569a555ba9c07a568a7c0c4fa63a"
 DEPENDS = "aufs-util-native"
 DEPENDS_class-native = ""
 
-SRCREV = "b59a2167a135ceea37581ee33997de278cf8a30a"
-SRC_URI = "git://git.code.sf.net/p/aufs/aufs-util;protocol=git;branch=aufs3.14 \
+SRCREV = "bdfcc0dcfc6113146e928f85145dbd2cf9b0e080"
+SRC_URI = "git://git.code.sf.net/p/aufs/aufs-util;protocol=git;branch=aufs3.18 \
            file://aufs-util-don-t-strip-executables.patch \
            file://aufs-util-add-tool-concept-to-Makefile-for-cross-com.patch \
            file://aufs_type.h \
@@ -34,7 +34,7 @@ do_configure_append () {
 
 do_configure_append_class-target () {
     for i in ver c2sh c2tmac; do
-        cp ${STAGING_BINDIR_NATIVE}/aufs-util-${PV}/$i ./
+        cp ${STAGING_BINDIR_NATIVE}/aufs-util-*/$i ${B}
     done
 }
 
Signature · 1 line
2.13.2