mirror of
git://slackware.nl/current.git
synced 2024-12-28 09:59:53 +01:00
82beba8248
d/ccache-3.7.7-x86_64-1.txz: Upgraded. l/libpsl-0.21.0-x86_64-2.txz: Rebuilt. Patched for new gtk-doc. Thanks to Matteo Bernardini. l/pyparsing-2.4.6-x86_64-1.txz: Upgraded. l/python-packaging-20.0-x86_64-1.txz: Upgraded. l/python-pygments-2.5.2-x86_64-1.txz: Added. This is needed by gtk-doc. n/iputils-20190709-x86_64-2.txz: Rebuilt. Patched for new libcap. Thanks to Matteo Bernardini. x/fonttosfnt-1.1.0-x86_64-1.txz: Upgraded. xap/mozilla-firefox-68.4.0esr-x86_64-1.txz: Upgraded. This release contains security fixes and improvements. For more information, see: https://www.mozilla.org/en-US/firefox/68.4.0/releasenotes/ https://www.mozilla.org/security/known-vulnerabilities/firefoxESR.html (* Security fix *)
49 lines
1.7 KiB
Diff
49 lines
1.7 KiB
Diff
From 18f9a84e0e702841d6cc4d5f593de4fbd1348e83 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
|
|
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
---
|
|
ninfod/ninfod.c | 8 ++++----
|
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/ninfod/ninfod.c b/ninfod/ninfod.c
|
|
index 26112d0..95583de 100644
|
|
--- a/ninfod/ninfod.c
|
|
+++ b/ninfod/ninfod.c
|
|
@@ -455,7 +455,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;
|
|
@@ -487,7 +487,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));
|
|
@@ -520,8 +520,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));
|
|
|