All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Kanavin <alex.kanavin@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 16/20] iputils: resolve a name clash with latest libcap
Date: Tue, 14 Jan 2020 15:00:03 +0100	[thread overview]
Message-ID: <20200114140007.36622-16-alex.kanavin@gmail.com> (raw)
In-Reply-To: <20200114140007.36622-1-alex.kanavin@gmail.com>

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 ...riable-name-to-avoid-colliding-with-.patch | 51 +++++++++++++++++++
 .../iputils/iputils_s20190709.bb              |  4 +-
 2 files changed, 54 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-extended/iputils/iputils/0001-ninfod-change-variable-name-to-avoid-colliding-with-.patch

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 00000000000..e106a0cf738
--- /dev/null
+++ b/meta/recipes-extended/iputils/iputils/0001-ninfod-change-variable-name-to-avoid-colliding-with-.patch
@@ -0,0 +1,51 @@
+From ab1aa2eb0097a7ef05ffccac058b06812deb2695 Mon Sep 17 00:00:00 2001
+From: Sami Kerola <kerolasa@iki.fi>
+Date: Sat, 28 Dec 2019 17:16:27 +0000
+Subject: [PATCH] ninfod: change variable name to avoid colliding with function
+ name
+
+The sys/capability.h header has 'extern int cap_setuid(uid_t uid);'
+function prototype.
+
+Addresses: https://github.com/iputils/iputils/issues/246
+
+Upstream-Status: Backport [https://github.com/iputils/iputils/commit/18f9a84e0e702841d6cc4d5f593de4fbd1348e83]
+Signed-off-by: Sami Kerola <kerolasa@iki.fi>
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ ninfod/ninfod.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/ninfod/ninfod.c b/ninfod/ninfod.c
+index badbf80..28f03af 100644
+--- a/ninfod/ninfod.c
++++ b/ninfod/ninfod.c
+@@ -454,7 +454,7 @@ static void do_daemonize(void)
+ /* --------- */
+ #ifdef HAVE_LIBCAP
+ static const cap_value_t cap_net_raw = CAP_NET_RAW;
+-static const cap_value_t cap_setuid =  CAP_SETUID; 
++static const cap_value_t cap_setuserid = CAP_SETUID;
+ static cap_flag_value_t cap_ok;
+ #else
+ static uid_t euid;
+@@ -486,7 +486,7 @@ static void limit_capabilities(void)
+ 
+ 	cap_get_flag(cap_cur_p, CAP_SETUID, CAP_PERMITTED, &cap_ok);
+ 	if (cap_ok != CAP_CLEAR)
+-		cap_set_flag(cap_p, CAP_PERMITTED, 1, &cap_setuid, CAP_SET);
++		cap_set_flag(cap_p, CAP_PERMITTED, 1, &cap_setuserid, CAP_SET);
+ 
+ 	if (cap_set_proc(cap_p) < 0) {
+ 		DEBUG(LOG_ERR, "cap_set_proc: %s\n", strerror(errno));
+@@ -519,8 +519,8 @@ static void drop_capabilities(void)
+ 
+ 	/* setuid / setuid */
+ 	if (cap_ok != CAP_CLEAR) {
+-		cap_set_flag(cap_p, CAP_PERMITTED, 1, &cap_setuid, CAP_SET);
+-		cap_set_flag(cap_p, CAP_EFFECTIVE, 1, &cap_setuid, CAP_SET);
++		cap_set_flag(cap_p, CAP_PERMITTED, 1, &cap_setuserid, CAP_SET);
++		cap_set_flag(cap_p, CAP_EFFECTIVE, 1, &cap_setuserid, CAP_SET);
+ 
+ 		if (cap_set_proc(cap_p) < 0) {
+ 			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 3f9e9917f0b..a672ccdb7c0 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"
 
 DEPENDS = "gnutls"
 
-SRC_URI = "git://github.com/iputils/iputils"
+SRC_URI = "git://github.com/iputils/iputils \
+           file://0001-ninfod-change-variable-name-to-avoid-colliding-with-.patch \
+           "
 SRCREV = "13e00847176aa23683d68fce1d17ffb523510946"
 
 S = "${WORKDIR}/git"
-- 
2.17.1



  parent reply	other threads:[~2020-01-14 14:00 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-14 13:59 [PATCH 01/20] rpm: switch to openssl from nss Alexander Kanavin
2020-01-14 13:59 ` [PATCH 02/20] rpm: fix with musl and latest elfutils Alexander Kanavin
2020-01-14 13:59 ` [PATCH 03/20] nss: update to 3.49.1 Alexander Kanavin
2020-01-14 21:22   ` Richard Purdie
2020-01-14 13:59 ` [PATCH 04/20] python3: update to 3.8.1 Alexander Kanavin
2020-01-15 13:39   ` Richard Purdie
2020-01-14 13:59 ` [PATCH 05/20] gstreamer1.0-python: add a patch to fix python 3.8 builds Alexander Kanavin
2020-01-14 13:59 ` [PATCH 06/20] acl/attr: update to latest upstream releases Alexander Kanavin
2020-01-14 13:59 ` [PATCH 07/20] pseudo: adjust for attr 2.4.48 Alexander Kanavin
2020-01-14 13:59 ` [PATCH 08/20] ltp: update to 20190930 Alexander Kanavin
2020-01-14 13:59 ` [PATCH 09/20] ifupdown: update 0.8.22 -> 0.8.35 Alexander Kanavin
2020-01-14 13:59 ` [PATCH 10/20] elfutils: upgrade 0.177 -> 0.178 Alexander Kanavin
2020-01-14 13:59 ` [PATCH 11/20] libcap: update to 2.31 Alexander Kanavin
2020-01-14 21:23   ` Richard Purdie
2020-01-14 13:59 ` [PATCH 12/20] busybox: fix failing ptests Alexander Kanavin
2020-01-14 14:00 ` [PATCH 13/20] dbus: fix failing ptest (by disabling as it needs X) Alexander Kanavin
2020-01-14 14:00 ` [PATCH 14/20] glib: disable a failing ptest Alexander Kanavin
2020-01-14 14:00 ` [PATCH 15/20] libevent: disable ptests that require a DNS and an intenet connection Alexander Kanavin
2020-01-14 14:00 ` Alexander Kanavin [this message]
2020-01-14 14:00 ` [PATCH 17/20] perl: fix failing ptests Alexander Kanavin
2020-01-14 14:00 ` [PATCH 18/20] bash: exclude from ptests Alexander Kanavin
2020-01-14 14:00 ` [PATCH 19/20] strace: fix failing ptests Alexander Kanavin
2020-01-14 14:00 ` [PATCH 20/20] valgrind: partially fix ptests Alexander Kanavin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200114140007.36622-16-alex.kanavin@gmail.com \
    --to=alex.kanavin@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.