diff options
| -rw-r--r-- | meta/recipes-extended/iputils/iputils/0001-ninfod-change-variable-name-to-avoid-colliding-with-.patch | 51 | ||||
| -rw-r--r-- | meta/recipes-extended/iputils/iputils_s20190709.bb | 4 |
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 @@ | |||
| 1 | From ab1aa2eb0097a7ef05ffccac058b06812deb2695 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Sami Kerola <kerolasa@iki.fi> | ||
| 3 | Date: Sat, 28 Dec 2019 17:16:27 +0000 | ||
| 4 | Subject: [PATCH] ninfod: change variable name to avoid colliding with function | ||
| 5 | name | ||
| 6 | |||
| 7 | The sys/capability.h header has 'extern int cap_setuid(uid_t uid);' | ||
| 8 | function prototype. | ||
| 9 | |||
| 10 | Addresses: https://github.com/iputils/iputils/issues/246 | ||
| 11 | |||
| 12 | Upstream-Status: Backport [https://github.com/iputils/iputils/commit/18f9a84e0e702841d6cc4d5f593de4fbd1348e83] | ||
| 13 | Signed-off-by: Sami Kerola <kerolasa@iki.fi> | ||
| 14 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
| 15 | --- | ||
| 16 | ninfod/ninfod.c | 8 ++++---- | ||
| 17 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
| 18 | |||
| 19 | diff --git a/ninfod/ninfod.c b/ninfod/ninfod.c | ||
| 20 | index 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 | ||
| 11 | DEPENDS = "gnutls" | 11 | DEPENDS = "gnutls" |
| 12 | 12 | ||
| 13 | SRC_URI = "git://github.com/iputils/iputils" | 13 | SRC_URI = "git://github.com/iputils/iputils \ |
| 14 | file://0001-ninfod-change-variable-name-to-avoid-colliding-with-.patch \ | ||
| 15 | " | ||
| 14 | SRCREV = "13e00847176aa23683d68fce1d17ffb523510946" | 16 | SRCREV = "13e00847176aa23683d68fce1d17ffb523510946" |
| 15 | 17 | ||
| 16 | S = "${WORKDIR}/git" | 18 | S = "${WORKDIR}/git" |
