summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2020-01-14 15:00:03 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-16 22:33:09 +0000
commit9383294cbc4f8799e04c305ea780c852a276daca (patch)
tree77f06fda33b32d6648e4ad320411d6ebbbdb5e14 /meta/recipes-extended
parent015c13ed832dccbfa731bace240da7ddf0697ede (diff)
downloadpoky-9383294cbc4f8799e04c305ea780c852a276daca.tar.gz
iputils: resolve a name clash with latest libcap
(From OE-Core rev: cb1b5afb51806212b1b73a2432c596af0374b6a5) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/iputils/iputils/0001-ninfod-change-variable-name-to-avoid-colliding-with-.patch51
-rw-r--r--meta/recipes-extended/iputils/iputils_s20190709.bb4
2 files changed, 54 insertions, 1 deletions
diff --git a/meta/recipes-extended/iputils/iputils/0001-ninfod-change-variable-name-to-avoid-colliding-with-.patch b/meta/recipes-extended/iputils/iputils/0001-ninfod-change-variable-name-to-avoid-colliding-with-.patch
new file mode 100644
index 0000000000..e106a0cf73
--- /dev/null
+++ b/meta/recipes-extended/iputils/iputils/0001-ninfod-change-variable-name-to-avoid-colliding-with-.patch
@@ -0,0 +1,51 @@
1From ab1aa2eb0097a7ef05ffccac058b06812deb2695 Mon Sep 17 00:00:00 2001
2From: Sami Kerola <kerolasa@iki.fi>
3Date: Sat, 28 Dec 2019 17:16:27 +0000
4Subject: [PATCH] ninfod: change variable name to avoid colliding with function
5 name
6
7The sys/capability.h header has 'extern int cap_setuid(uid_t uid);'
8function prototype.
9
10Addresses: https://github.com/iputils/iputils/issues/246
11
12Upstream-Status: Backport [https://github.com/iputils/iputils/commit/18f9a84e0e702841d6cc4d5f593de4fbd1348e83]
13Signed-off-by: Sami Kerola <kerolasa@iki.fi>
14Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
15---
16 ninfod/ninfod.c | 8 ++++----
17 1 file changed, 4 insertions(+), 4 deletions(-)
18
19diff --git a/ninfod/ninfod.c b/ninfod/ninfod.c
20index badbf80..28f03af 100644
21--- a/ninfod/ninfod.c
22+++ b/ninfod/ninfod.c
23@@ -454,7 +454,7 @@ static void do_daemonize(void)
24 /* --------- */
25 #ifdef HAVE_LIBCAP
26 static const cap_value_t cap_net_raw = CAP_NET_RAW;
27-static const cap_value_t cap_setuid = CAP_SETUID;
28+static const cap_value_t cap_setuserid = CAP_SETUID;
29 static cap_flag_value_t cap_ok;
30 #else
31 static uid_t euid;
32@@ -486,7 +486,7 @@ static void limit_capabilities(void)
33
34 cap_get_flag(cap_cur_p, CAP_SETUID, CAP_PERMITTED, &cap_ok);
35 if (cap_ok != CAP_CLEAR)
36- cap_set_flag(cap_p, CAP_PERMITTED, 1, &cap_setuid, CAP_SET);
37+ cap_set_flag(cap_p, CAP_PERMITTED, 1, &cap_setuserid, CAP_SET);
38
39 if (cap_set_proc(cap_p) < 0) {
40 DEBUG(LOG_ERR, "cap_set_proc: %s\n", strerror(errno));
41@@ -519,8 +519,8 @@ static void drop_capabilities(void)
42
43 /* setuid / setuid */
44 if (cap_ok != CAP_CLEAR) {
45- cap_set_flag(cap_p, CAP_PERMITTED, 1, &cap_setuid, CAP_SET);
46- cap_set_flag(cap_p, CAP_EFFECTIVE, 1, &cap_setuid, CAP_SET);
47+ cap_set_flag(cap_p, CAP_PERMITTED, 1, &cap_setuserid, CAP_SET);
48+ cap_set_flag(cap_p, CAP_EFFECTIVE, 1, &cap_setuserid, CAP_SET);
49
50 if (cap_set_proc(cap_p) < 0) {
51 DEBUG(LOG_ERR, "cap_set_proc: %s\n", strerror(errno));
diff --git a/meta/recipes-extended/iputils/iputils_s20190709.bb b/meta/recipes-extended/iputils/iputils_s20190709.bb
index 3f9e9917f0..a672ccdb7c 100644
--- a/meta/recipes-extended/iputils/iputils_s20190709.bb
+++ b/meta/recipes-extended/iputils/iputils_s20190709.bb
@@ -10,7 +10,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=55aa8c9fcad0691cef0ecd420361e390"
10 10
11DEPENDS = "gnutls" 11DEPENDS = "gnutls"
12 12
13SRC_URI = "git://github.com/iputils/iputils" 13SRC_URI = "git://github.com/iputils/iputils \
14 file://0001-ninfod-change-variable-name-to-avoid-colliding-with-.patch \
15 "
14SRCREV = "13e00847176aa23683d68fce1d17ffb523510946" 16SRCREV = "13e00847176aa23683d68fce1d17ffb523510946"
15 17
16S = "${WORKDIR}/git" 18S = "${WORKDIR}/git"