From patchwork Fri Mar 6 20:10:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Seiderer X-Patchwork-Id: 1250589 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gmx.net Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.a=rsa-sha256 header.s=badeba3b8450 header.b=iqIjqGu2; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48YzJz6NrJz9sPk for ; Sat, 7 Mar 2020 07:11:15 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 65583824FC; Fri, 6 Mar 2020 20:11:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZEtWpvA9yrBZ; Fri, 6 Mar 2020 20:11:07 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 7BC8285C56; Fri, 6 Mar 2020 20:11:07 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 729BA1BF5DD for ; Fri, 6 Mar 2020 20:11:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 6E8BE876DD for ; Fri, 6 Mar 2020 20:11:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bt4dDOKZI-5g for ; Fri, 6 Mar 2020 20:11:05 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by whitealder.osuosl.org (Postfix) with ESMTPS id 57535876B3 for ; Fri, 6 Mar 2020 20:11:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1583525423; bh=E5NoLoEXhV8o/lmh+hQoq3C0tAF5pl33iZoa+Rz2mcY=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=iqIjqGu2+FJTpR8SaYUqbEiCze/2UluE0mLKgFG2aPWNvr46gRbGZWp8Op4KknsPX Zjq+nnpuacn3ZAtr86rY6VLmZIayK+v06mVwh7tV4ltPSmgOBSeTtILW4Izgemehb7 VaK4f9zjy93/1Q71RpbJuQmrZE5Evim6knYg2SKk= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.fritz.box ([62.216.209.187]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MK3Rs-1ivW090HOw-00LVB5; Fri, 06 Mar 2020 21:10:23 +0100 From: Peter Seiderer To: buildroot@busybox.net Date: Fri, 6 Mar 2020 21:10:20 +0100 Message-Id: <20200306201022.22382-1-ps.report@gmx.net> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Provags-ID: V03:K1:ImoyF3P7wRKBAjGPUmvS/IYDlNnH9EqIQ7E2bgrpm4wKOZbKfhO pEDaJq/41/HoGPtl7aRF2pbwhSEzi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5SC5le6Q7q2w 3Mxz/xwNcQHx19qZI+jhuz127Oph47MOi6IDnxkG3oVeCI3hdfyUYkbnqKe/WYMY9HUFr25pc wnZVPlndFCn8U+HXMflX/Bal7KA4IG2YvhUmUdIC7183L+sm92Gw2+QRE3soj5eNSLnOQ2xRq GZLW9Rxo4fx593JUdZuNuz9A9+NAuBblNB/n/+4+eQ5MLmOTnUX/Gmwz33+2yuZ2ahjhXxOAl utaY79OLZXziljZVUGkazLAKdjwxlj8Q/QnYq3DqkF2I2xzczr/f29cxlXXcSe+tssCEpo7l4 LJMK7Sl0G/C5/1GABrj6WfiTwIaA7m+UDuMJkQTYLSAMBsl/B2vRoh+AegLj6SUk7lrG7rx9c 9uuhC01sf5OcTsTyU Subject: [Buildroot] [PATCH v1 1/3] package/liboping: add patch to fix gcc-8/gcc-9 snprintf truncation compile failure X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fabrice Fontaine , Maik Brenke Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Add patch from upstream merge request ([1]) to fix fix gcc-8/gcc-9 snprintf truncation related compile failure (-Wall/-Werror), reported on the mailing list ([2]). Fixes: liboping.c: In function ‘ping_set_ttl’: liboping.c:207:9: error: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 242 [-Werror=format-truncation=] 207 | "%s: %s", function, message); | ^~ [1] https://github.com/octo/liboping/pull/50 [2] http://lists.busybox.net/pipermail/buildroot/2020-March/275861.html Reported-by: Maik Brenke Signed-off-by: Peter Seiderer --- ...d-snprintf-truncation-warning-wError.patch | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 package/liboping/0002-Mitigated-snprintf-truncation-warning-wError.patch diff --git a/package/liboping/0002-Mitigated-snprintf-truncation-warning-wError.patch b/package/liboping/0002-Mitigated-snprintf-truncation-warning-wError.patch new file mode 100644 index 0000000000..929d25e22d --- /dev/null +++ b/package/liboping/0002-Mitigated-snprintf-truncation-warning-wError.patch @@ -0,0 +1,31 @@ +From 215003b58c9214c4a3ff5ef44f361887cdbec348 Mon Sep 17 00:00:00 2001 +From: Guillaume Picquet +Date: Mon, 9 Sep 2019 17:30:47 +0200 +Subject: [PATCH] Mitigated snprintf truncation warning (-wError) + +[Upstream: https://github.com/octo/liboping/pull/50/commits/664414123a3fe89984abfa0917946c513bf47163] +Signed-off-by: Peter Seiderer +--- + src/liboping.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/liboping.c b/src/liboping.c +index a2dfa19..39b0041 100644 +--- a/src/liboping.c ++++ b/src/liboping.c +@@ -203,9 +203,9 @@ static char *sstrerror (int errnum, char *buf, size_t buflen) + static void ping_set_error (pingobj_t *obj, const char *function, + const char *message) + { +- snprintf (obj->errmsg, sizeof (obj->errmsg), +- "%s: %s", function, message); +- obj->errmsg[sizeof (obj->errmsg) - 1] = 0; ++ if (snprintf (obj->errmsg, sizeof (obj->errmsg), ++ "%s: %s", function, message) >= sizeof (obj->errmsg)) ++ obj->errmsg[sizeof (obj->errmsg) - 1] = 0; + } + + static void ping_set_errno (pingobj_t *obj, int error_number) +-- +2.25.1 + From patchwork Fri Mar 6 20:10:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Seiderer X-Patchwork-Id: 1250588 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gmx.net Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.a=rsa-sha256 header.s=badeba3b8450 header.b=F4nWi18N; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48YzJK6C35z9sPK for ; Sat, 7 Mar 2020 07:10:40 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 02C1F227FA; Fri, 6 Mar 2020 20:10:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UjB22WbJDDpS; Fri, 6 Mar 2020 20:10:31 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 282FC203E6; Fri, 6 Mar 2020 20:10:31 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id A1C2E1BF5DD for ; Fri, 6 Mar 2020 20:10:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 9EC5A876F7 for ; Fri, 6 Mar 2020 20:10:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id awaVxZPU8qtV for ; Fri, 6 Mar 2020 20:10:27 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) by whitealder.osuosl.org (Postfix) with ESMTPS id D6514876B3 for ; Fri, 6 Mar 2020 20:10:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1583525423; bh=oIJmNbEp0ZnKpb1S7B8mxcyg4hxKgvLeZVkeC+Kw5XU=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=F4nWi18NQSl7rcMYe6gnmq37oOROZofF13CashzBG+sY895eqfnB9AMSI7xli0p61 R3uYqFJxlFblQRJt43eEf5Z/B6rmEl79oTLr0KqZq02nSMCCy2FaQT0CP1Dsh9CetZ CFbsMjqxuavOqWKFBdLEUKC82lHa7sf5hjj7uaa0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.fritz.box ([62.216.209.187]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MkHQh-1jd0Ks14VV-00khTY; Fri, 06 Mar 2020 21:10:23 +0100 From: Peter Seiderer To: buildroot@busybox.net Date: Fri, 6 Mar 2020 21:10:21 +0100 Message-Id: <20200306201022.22382-2-ps.report@gmx.net> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200306201022.22382-1-ps.report@gmx.net> References: <20200306201022.22382-1-ps.report@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K1:bg3Bx1QOvF8sKGooCvy+TV5bCZV3uZDUzX9dHXZjp5MIelZ52JE bi2xJZ0Ujz/6GKHFo50zKb9lhAqy90kPks4UfyWXo2bUsePIQ8Rn9LGcpEPS55lK72oVnr6 LAOTSYI6DCvsDY9rPbikxqbDVkagFpn++8KHKcvFa7Trbjwlk/7+goAxb3odmh03XFL4E5H U+pwPcY2LCprjj1slMGRg== X-UI-Out-Filterresults: notjunk:1; V03:K0:0Q/eMuJpzeQ=:BsSXomHq6Xeo9xbe0lgVaf pRRNN0+6T5uvVjlnnsamg9Odsd+Vvx4a1MIpkp25FxO+/hNq3iSpVL4c8APiSTpnoErCs709I 0scxrrc80iIq9hsg7nU/qazfMQzzICf+qe+drbAMFcvZi+uA96gViFz5tsTytOYOyKIkdIYa/ rxl4Kv6e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TJUtg68cFl V+WBQysxK6ZSnIq3K Subject: [Buildroot] [PATCH v1 2/3] package/liboping: add patch to fix utf8 ncurses support X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fabrice Fontaine Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Add patch from upstream merge request [1] to fix fix utf8 ncurses support. [1] https://github.com/octo/liboping/issues/36 Signed-off-by: Peter Seiderer --- package/liboping/0003-fix-utf8-support.patch | 29 ++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 package/liboping/0003-fix-utf8-support.patch diff --git a/package/liboping/0003-fix-utf8-support.patch b/package/liboping/0003-fix-utf8-support.patch new file mode 100644 index 0000000000..8a9792b619 --- /dev/null +++ b/package/liboping/0003-fix-utf8-support.patch @@ -0,0 +1,29 @@ +From dfbdd324769f542b6b89499c1b7f0f4322100bc6 Mon Sep 17 00:00:00 2001 +From: wfaulk +Date: Wed, 7 Aug 2019 18:57:43 -0400 +Subject: [PATCH 3/4] fix utf8 support + +https://github.com/octo/liboping/issues/36 + +[Upstream: https://github.com/octo/liboping/pull/49/commits/a313923ec12d11daa8e70497c6b7b5d50965821b] +Signed-off-by: Peter Seiderer +--- + src/oping.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/oping.c b/src/oping.c +index 87ca81a..62dbb67 100644 +--- a/src/oping.c ++++ b/src/oping.c +@@ -903,7 +903,7 @@ static void time_calc (struct timespec *ts_dest, /* {{{ */ + #if USE_NCURSES + static _Bool has_utf8() /* {{{ */ + { +-# if HAVE_NCURSESW_NCURSES_H ++# if HAVE_NCURSESW_CURSES_H + if (!opt_utf8) + { + /* Automatically determine */ +-- +2.25.1 + From patchwork Fri Mar 6 20:10:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Seiderer X-Patchwork-Id: 1250587 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gmx.net Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.a=rsa-sha256 header.s=badeba3b8450 header.b=F6GWQEjF; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48YzJH67Nbz9sNg for ; Sat, 7 Mar 2020 07:10:35 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 5D8B58770C; Fri, 6 Mar 2020 20:10:33 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oyWAzr++nu-q; Fri, 6 Mar 2020 20:10:32 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 70FDA876DD; Fri, 6 Mar 2020 20:10:32 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 292AA1BF5DD for ; Fri, 6 Mar 2020 20:10:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 264B6876B3 for ; Fri, 6 Mar 2020 20:10:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KvklpP7dlBpY for ; Fri, 6 Mar 2020 20:10:27 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) by whitealder.osuosl.org (Postfix) with ESMTPS id DAB96876DD for ; Fri, 6 Mar 2020 20:10:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1583525423; bh=0eqqwZhlD05dCegjYYFvulEtvmiCt/GM29+XiRz54g8=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=F6GWQEjFrZcC89CSlpqsNqgU8duQz8cR8t6FCO+GBwYHl0nU8UI50OFiOCkH+HxDw PtJwtDf2DeedxVc4UdlOTKZp9J9g5HCEIQTHmbnEghGA2QcM9JKhQuw1feHyujDPbX yUto0PXB82Mne6EvCOmGZcQOfHHo/973j+zopGJc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.fritz.box ([62.216.209.187]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MGz1V-1j5cKa1sl1-00E6ow; Fri, 06 Mar 2020 21:10:23 +0100 From: Peter Seiderer To: buildroot@busybox.net Date: Fri, 6 Mar 2020 21:10:22 +0100 Message-Id: <20200306201022.22382-3-ps.report@gmx.net> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200306201022.22382-1-ps.report@gmx.net> References: <20200306201022.22382-1-ps.report@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K1:HEwaXs3cO4nvxFwjTgxMQXgEZ+HvYEvwK3bYggRtfcwRUmgIESD rbNWAxlvSmWIy40Q40EeG64s8EanUFWX0dyNKKM9GU6SL2a8ntgOK9Qr1cZ8Z2S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O0gxxYFm6BihbBL/4JwoZgupunuKtmXVEOop335g3FluRWAt47 Fc1IED9jaq+L7tnBW9ezVhx2OjcgqknF3AwbQpO2l8AboeV+bSQundUuBIqYyEpUrRJJHhoMm yxTNYVFCslzmqJMAYvPBnevdTMHBhi6QJcVfWRvcaTaFS12Y8iif1FtY7BZb+sax9MIXgXR66 HlIypkDSnDAYyGV+sG2T5H5cQPwccOXmtnELtZk9RC39fLmGtMedg9/jqa1qbwwBk7W1LY0Ld fqdRHfBtflGSPdKuF9Sg8Fhzea/KVRyH+TmNuBZAoYZLmeTIl8r3oWkQRlZ3qaP/x1uCWrC/Y TZXb8k9sZE4eEBKgW Subject: [Buildroot] [PATCH v1 3/3] package/liboping: add patch to fix suid root feature X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fabrice Fontaine Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Add patch from upstream merge quest [1] to fix suid root feature. [1] https://github.com/octo/liboping/pull/35 Signed-off-by: Peter Seiderer --- ...-when-adding-hosts-not-when-doing-th.patch | 91 +++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 package/liboping/0004-Open-raw-sockets-when-adding-hosts-not-when-doing-th.patch diff --git a/package/liboping/0004-Open-raw-sockets-when-adding-hosts-not-when-doing-th.patch b/package/liboping/0004-Open-raw-sockets-when-adding-hosts-not-when-doing-th.patch new file mode 100644 index 0000000000..bdfb3d3f08 --- /dev/null +++ b/package/liboping/0004-Open-raw-sockets-when-adding-hosts-not-when-doing-th.patch @@ -0,0 +1,91 @@ +From ac878566eb935fd3ebfb804e6bd9e1690d4a65e3 Mon Sep 17 00:00:00 2001 +From: Tollef Fog Heen +Date: Tue, 20 Mar 2018 22:40:32 +0100 +Subject: [PATCH 4/4] Open raw sockets when adding hosts, not when doing the + pinging + +This allows this to run as non-root again, without this, oping will +have dropped privileges before trying to ping, which then fails to +open the necessary raw sockets. + +Fixes: #34 + +[Upstream: https://github.com/octo/liboping/pull/35/commits/a88c51f38dafa1fba9118045176754bec05d3c94] +Signed-off-by: Peter Seiderer +--- + src/liboping.c | 48 +++++++++++++++++------------------------------- + 1 file changed, 17 insertions(+), 31 deletions(-) + +diff --git a/src/liboping.c b/src/liboping.c +index 39b0041..f98e810 100644 +--- a/src/liboping.c ++++ b/src/liboping.c +@@ -1344,41 +1344,10 @@ int ping_send (pingobj_t *obj) + struct timeval nowtime; + struct timeval timeout; + +- _Bool need_ipv4_socket = 0; +- _Bool need_ipv6_socket = 0; +- + for (ptr = obj->head; ptr != NULL; ptr = ptr->next) + { + ptr->latency = -1.0; + ptr->recv_ttl = -1; +- +- if (ptr->addrfamily == AF_INET) +- need_ipv4_socket = 1; +- else if (ptr->addrfamily == AF_INET6) +- need_ipv6_socket = 1; +- } +- +- if (!need_ipv4_socket && !need_ipv6_socket) +- { +- ping_set_error (obj, "ping_send", "No hosts to ping"); +- return (-1); +- } +- +- if (need_ipv4_socket && obj->fd4 == -1) +- { +- obj->fd4 = ping_open_socket(obj, AF_INET); +- if (obj->fd4 == -1) +- return (-1); +- ping_set_ttl (obj, obj->ttl); +- ping_set_qos (obj, obj->qos); +- } +- if (need_ipv6_socket && obj->fd6 == -1) +- { +- obj->fd6 = ping_open_socket(obj, AF_INET6); +- if (obj->fd6 == -1) +- return (-1); +- ping_set_ttl (obj, obj->ttl); +- ping_set_qos (obj, obj->qos); + } + + if (gettimeofday (&nowtime, NULL) == -1) +@@ -1698,6 +1667,23 @@ int ping_host_add (pingobj_t *obj, const char *host) + ph->table_next = obj->table[ph->ident % PING_TABLE_LEN]; + obj->table[ph->ident % PING_TABLE_LEN] = ph; + ++ if (ph->addrfamily == AF_INET && obj->fd4 == -1) ++ { ++ obj->fd4 = ping_open_socket(obj, AF_INET); ++ if (obj->fd4 == -1) ++ return (-1); ++ ping_set_ttl (obj, obj->ttl); ++ ping_set_qos (obj, obj->qos); ++ } ++ if (ph->addrfamily == AF_INET6 && obj->fd6 == -1) ++ { ++ obj->fd6 = ping_open_socket(obj, AF_INET6); ++ if (obj->fd6 == -1) ++ return (-1); ++ ping_set_ttl (obj, obj->ttl); ++ ping_set_qos (obj, obj->qos); ++ } ++ + return (0); + } /* int ping_host_add */ + +-- +2.25.1 +