aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/iputils-libcap-compat.patch
blob: dc6da310ce9e7dee0ffe3e658b56ff67f09a47f0 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Fix name clash with libcap 2.29.

Taken from upstream:
https://github.com/iputils/iputils/commit/18f9a84e0e702841d6cc4d5f593de4fbd1348e83

diff --git a/ninfod/ninfod.c b/ninfod/ninfod.c
--- 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));
lators.scm?id=53cd301b080d3c840d9754dceab0bc85e7ccbed6'>gnu: scummvm: Update source URL....* gnu/packages/emulators.scm (scummvm)[source]: Use HTTPS & new subdomain. Reported by Matthew Brooks <matthewfbrooks@mailbox.org>. Tobias Geerinckx-Rice 2020-11-29Merge remote-tracking branch 'origin/master' into core-updatesChristopher Baines 2020-11-11gnu: mgba: Remove unused input....* gnu/packages/emulators.scm (mgba)[inputs]: Remove IMAGEMAGICK. Marius Bakke 2020-11-11gnu: mednafen: Update to 1.26.1....* gnu/packages/emulators.scm (mednafen): Update to 1.26.1. Nicolas Goaziou 2020-11-03gnu: mame: Update to 0.226....* gnu/packages/emulators.scm (mame): Update to 0.226. Nicolas Goaziou 2020-11-02gnu: mgba: Update to 0.8.4....* gnu/packages/emulators.scm (mgba): Update to 0.8.4. Nicolas Goaziou 2020-10-19Merge branch 'staging'...Conflicts: gnu/packages/admin.scm gnu/packages/commencement.scm gnu/packages/gdb.scm gnu/packages/llvm.scm gnu/packages/package-management.scm gnu/packages/tls.scm Maxim Cournoyer 2020-10-03gnu: mame: Update to 0.225....* gnu/packages/emulators.scm (mame): Update to 0.225. Tobias Geerinckx-Rice 2020-09-29gnu: ppsspp: Update to 1.10.3....* gnu/packages/emulators.scm (ppsspp): Update to 1.10.3. [snippet]: Update the snippet, that strips glslang from build. [inputs]: Update lang. Signed-off-by: Efraim Flashner <efraim@flashner.co.il> Leo Prikler 2020-09-28gnu: Add missing module....* gnu/packages/emulators.scm: Add missing module. Nicolas Goaziou 2020-09-28gnu: scummvm: Update to 2.2.0....* gnu/packages/emulators.scm (scummvm): Update to 2.2.0. [arguments]: Remove unnecessary phase. [inputs]: Add fribidi. Nicolas Goaziou