iputils s20190709
This commit is contained in:
@@ -5,14 +5,22 @@
|
||||
# See the file http://www.gnu.org/licenses/gpl.txt
|
||||
|
||||
from pisi.actionsapi import shelltools
|
||||
from pisi.actionsapi import mesontools
|
||||
from pisi.actionsapi import autotools
|
||||
from pisi.actionsapi import pisitools
|
||||
from pisi.actionsapi import get
|
||||
|
||||
def setup():
|
||||
mesontools.configure("-DBUILD_RARPD=true \
|
||||
-DBUILD_MANS=false \
|
||||
-DBUILD_HTML_MANS=false \
|
||||
-DBUILD_TRACEROUTE6=true")
|
||||
|
||||
def build():
|
||||
autotools.make("USE_NETTLE=no USE_GNUTLS=no CCOPT='%s -fpie' CC=%s" % (get.CFLAGS(), get.CC()))
|
||||
mesontools.build()
|
||||
|
||||
def install():
|
||||
shelltools.cd("build")
|
||||
pisitools.dobin("ping")
|
||||
|
||||
for app in ["clockdiff", "rarpd", "tftpd", "arping", "rdisc", "tracepath", "traceroute6"]:
|
||||
@@ -22,4 +30,4 @@ def install():
|
||||
shelltools.chmod("%s/usr/bin/ping" % get.installDIR(), 04711)
|
||||
#shelltools.chmod("%s/usr/bin/ping6" % get.installDIR(), 04711)
|
||||
|
||||
pisitools.dodoc("RELNOTES*")
|
||||
pisitools.dodoc("../README.md")
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
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));
|
||||
@@ -12,15 +12,16 @@
|
||||
<IsA>app:console</IsA>
|
||||
<Summary>Network monitoring tools including ping and ping6</Summary>
|
||||
<Description>iputils contains network monitoring tools including ping and ping6.</Description>
|
||||
<Archive sha1sum="353df20691bf027ad35fcaaf6894b122c39d8f2d" type="targz">https://github.com/iputils/iputils/archive/s20180629.tar.gz</Archive>
|
||||
<Archive sha1sum="9a2d85a6b2656ed3669f49e737588e3262f02ff8" type="targz">https://github.com/iputils/iputils/archive/s20190709.tar.gz</Archive>
|
||||
<BuildDependencies>
|
||||
<Dependency>openssl-devel</Dependency>
|
||||
<Dependency>libidn2-devel</Dependency>
|
||||
<Dependency>libcap-devel</Dependency>
|
||||
<!-- needed for generating man pages, see below
|
||||
<Dependency>docbook-utils</Dependency>
|
||||
-->
|
||||
<Dependency>docbook-xsl</Dependency>
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<Patch level="1">fix-setuid-redeclared.patch</Patch>
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
<Package>
|
||||
@@ -58,6 +59,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="5">
|
||||
<Date>2020-02-07</Date>
|
||||
<Version>20190709</Version>
|
||||
<Comment>Version bump.</Comment>
|
||||
<Name>İdris Kalp</Name>
|
||||
<Email>idriskalp@gmail.com</Email>
|
||||
</Update>
|
||||
<Update release="4">
|
||||
<Date>2018-08-13</Date>
|
||||
<Version>20180629</Version>
|
||||
|
||||
Reference in New Issue
Block a user