summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/iptraf/iptraf-ng
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-devtools/iptraf/iptraf-ng')
-rw-r--r--meta-oe/recipes-devtools/iptraf/iptraf-ng/0001-Fix-printd-formatting-strings.patch54
-rw-r--r--meta-oe/recipes-devtools/iptraf/iptraf-ng/ncurses-config.patch81
2 files changed, 135 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/iptraf/iptraf-ng/0001-Fix-printd-formatting-strings.patch b/meta-oe/recipes-devtools/iptraf/iptraf-ng/0001-Fix-printd-formatting-strings.patch
new file mode 100644
index 000000000..5b9afd961
--- /dev/null
+++ b/meta-oe/recipes-devtools/iptraf/iptraf-ng/0001-Fix-printd-formatting-strings.patch
@@ -0,0 +1,54 @@
1From 86b4d398dbb95e2437b70eba3b30e995ec9be505 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 31 Aug 2017 20:47:50 -0700
4Subject: [PATCH] Fix printd formatting strings
5
6Fixes
7error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
8
9Upstream-Status: Pending
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 src/ipfilter.c | 2 +-
14 src/othptab.c | 4 ++--
15 2 files changed, 3 insertions(+), 3 deletions(-)
16
17diff --git a/src/ipfilter.c b/src/ipfilter.c
18index eb17ec7..8c76e4c 100644
19--- a/src/ipfilter.c
20+++ b/src/ipfilter.c
21@@ -146,7 +146,7 @@ void gethostparams(struct hostparams *data, char *init_saddr, char *init_smask,
22 snprintf(msgstr, 60,
23 "Invalid protocol input at or near token \"%s\"",
24 bptr);
25- tui_error(ANYKEY_MSG, msgstr);
26+ tui_error(ANYKEY_MSG, "%s", msgstr);
27 doagain = 1;
28 } else
29 doagain = 0;
30diff --git a/src/othptab.c b/src/othptab.c
31index 142c9c2..fe395c2 100644
32--- a/src/othptab.c
33+++ b/src/othptab.c
34@@ -410,7 +410,7 @@ void printothpentry(struct othptable *table, struct othptabent *entry,
35 break;
36 }
37
38- sprintf(scratchpad, rarp_mac_addr);
39+ sprintf(scratchpad, "%s", rarp_mac_addr);
40 strcat(msgstring, scratchpad);
41 wattrset(table->othpwin, ARPATTR);
42 break;
43@@ -485,7 +485,7 @@ void printothpentry(struct othptable *table, struct othptabent *entry,
44 wattrset(table->othpwin, UNKNIPATTR);
45 protptr = getprotobynumber(entry->protocol);
46 if (protptr != NULL) {
47- sprintf(protname, protptr->p_aliases[0]);
48+ sprintf(protname, "%s", protptr->p_aliases[0]);
49 } else {
50 sprintf(protname, "IP protocol");
51 unknown = 1;
52--
532.14.1
54
diff --git a/meta-oe/recipes-devtools/iptraf/iptraf-ng/ncurses-config.patch b/meta-oe/recipes-devtools/iptraf/iptraf-ng/ncurses-config.patch
new file mode 100644
index 000000000..65b92dade
--- /dev/null
+++ b/meta-oe/recipes-devtools/iptraf/iptraf-ng/ncurses-config.patch
@@ -0,0 +1,81 @@
1Use pkg-config to search for ncurses libraries
2
3Signed-off-by: Khem Raj <raj.khem@gmail.com>
4Upstream-Status: Pending
5Index: iptraf-ng-1.1.4/Makefile
6===================================================================
7--- iptraf-ng-1.1.4.orig/Makefile
8+++ iptraf-ng-1.1.4/Makefile
9@@ -205,8 +205,8 @@ endif
10
11 ifndef NCURSES_LDFLAGS
12 ifdef NEEDS_NCURSES5
13- NCURSES_CFLAGS := $(shell ncurses5-config --cflags 2>/dev/null)
14- NCURSES_LDFLAGS := $(shell ncurses5-config --libs 2>/dev/null)
15+ NCURSES_CFLAGS := $(shell pkg-config ncurses --cflags 2>/dev/null)
16+ NCURSES_LDFLAGS := $(shell pkg-config ncurses --libs 2>/dev/null)
17 ifndef NO_PANEL
18 NCURSES_LDFLAGS += -lpanel
19 endif
20@@ -215,8 +215,8 @@ endif
21
22 ifndef NCURSES_LDFLAGS
23 ifdef NEEDS_NCURSESW5
24- NCURSES_CFLAGS := $(shell ncursesw5-config --cflags 2>/dev/null)
25- NCURSES_LDFLAGS := $(shell ncursesw5-config --libs 2>/dev/null)
26+ NCURSES_CFLAGS := $(shell p[k-config ncursesw --cflags 2>/dev/null)
27+ NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null)
28 ifndef NO_PANEL
29 NCURSES_LDFLAGS += -lpanel
30 endif
31@@ -225,8 +225,8 @@ endif
32
33 ifndef NCURSES_LDFLAGS
34 ifdef NEEDS_NCURSES6
35- NCURSES_CFLAGS := $(shell ncurses6-config --cflags 2>/dev/null)
36- NCURSES_LDFLAGS := $(shell ncurses6-config --libs 2>/dev/null)
37+ NCURSES_CFLAGS := $(shell pkg-config ncurses6 --cflags 2>/dev/null)
38+ NCURSES_LDFLAGS := $(shell pkg-config ncurses6 --libs 2>/dev/null)
39 ifndef NO_PANEL
40 NCURSES_LDFLAGS += -lpanel
41 endif
42@@ -235,8 +235,8 @@ endif
43
44 ifndef NCURSES_LDFLAGS
45 ifdef NEEDS_NCURSESW6
46- NCURSES_CFLAGS := $(shell ncursesw6-config --cflags 2>/dev/null)
47- NCURSES_LDFLAGS := $(shell ncursesw6-config --libs 2>/dev/null)
48+ NCURSES_CFLAGS := $(shell pkg-config ncursesw --cflags 2>/dev/null)
49+ NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null)
50 ifndef NO_PANEL
51 NCURSES_LDFLAGS += -lpanel
52 endif
53@@ -246,17 +246,17 @@ endif
54 # try find ncuses by autodetect
55 ifndef NCURSES_LDFLAGS
56 ifneq ($(shell ncursesw6-config --libs 2>/dev/null),)
57- NCURSES_CFLAGS := $(shell ncursesw6-config --cflags 2>/dev/null)
58- NCURSES_LDFLAGS := $(shell ncursesw6-config --libs 2>/dev/null)
59- else ifneq ($(shell ncurses6-config --libs 2>/dev/null),)
60- NCURSES_CFLAGS := $(shell ncurses6-config --cflags 2>/dev/null)
61- NCURSES_LDFLAGS := $(shell ncurses6-config --libs 2>/dev/null)
62- else ifneq ($(shell ncursesw5-config --libs 2>/dev/null),)
63- NCURSES_CFLAGS := $(shell ncursesw5-config --cflags 2>/dev/null)
64- NCURSES_LDFLAGS := $(shell ncursesw5-config --libs 2>/dev/null)
65- else ifneq ($(shell ncurses5-config --libs 2>/dev/null),)
66- NCURSES_CFLAGS := $(shell ncurses5-config --cflags 2>/dev/null)
67- NCURSES_LDFLAGS := $(shell ncurses5-config --libs 2>/dev/null)
68+ NCURSES_CFLAGS := $(shell pkg-config ncursesw --cflags 2>/dev/null)
69+ NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null)
70+ else ifneq ($(shell pkg-config ncurses --libs 2>/dev/null),)
71+ NCURSES_CFLAGS := $(shell pkg-config ncurses --cflags 2>/dev/null)
72+ NCURSES_LDFLAGS := $(shell pkg-config ncurses --libs 2>/dev/null)
73+ else ifneq ($(shell pkg-config ncursesw --libs 2>/dev/null),)
74+ NCURSES_CFLAGS := $(shell pkg-config ncursesw --cflags 2>/dev/null)
75+ NCURSES_LDFLAGS := $(shell pkg-config ncursesw --libs 2>/dev/null)
76+ else ifneq ($(shell pkg-config ncurses --libs 2>/dev/null),)
77+ NCURSES_CFLAGS := $(shell pkg-config ncurses --cflags 2>/dev/null)
78+ NCURSES_LDFLAGS := $(shell pkg-config ncurses --libs 2>/dev/null)
79 endif
80
81 ifneq ($(NCURSES_LDFLAGS),)