iputils/iputils-sec-ping-unblock.diff
Petr Vorel 8eebf12ed0 Accepting request 705286 from home:pevik:branches:network:utilities
- Update to version s20190515 (includes changes s20190324)
  * s20190324: 189 commits since s20180629 that include changing build
    system from autotools to meson, added rarpd and rdisc systemd service
    files, many fixes
  * s20190515 bugfix release (6 commits)
- User visible change: arping and clockdiff are moved from /usr/sbin
  to /usr/bin (respect upstream path)
- Backport patch 0001-build-sys-doc-Fix-the-dependency-on-xsltproc.patch
  (fixing build system)
- Add workaround patch meson-remove-setcap-setuid.sh.patch
- Remove 0001-tracepath-Fix-copying-input-IPv6-address.patch
  (included in s20190324 release)
- Refresh old patches (iputils-ping-interrupt.diff, iputils-sec-ping-unblock.diff)
- Changes caused by upstream switching to meson build system (drop sed build dependency)
- Added locales
- Fix typos

OBS-URL: https://build.opensuse.org/request/show/705286
OBS-URL: https://build.opensuse.org/package/show/network:utilities/iputils?expand=0&rev=68
2019-05-24 17:12:38 +00:00

43 lines
1.1 KiB
Diff

From bf83678619dd0286f7a66f2ab02763751b0e8ca9 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Mon, 26 Aug 2013 13:02:36 +0200
Subject: Block SIGALRM in ping.c
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
ping depends on SIGALRM to exit eventually, so we need to mask
it with UNBLOCK.
Signed-off-by: Marcus Schäfer <ms@suse.de>
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
ping.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/ping.c b/ping.c
index 3debd82..06cc369 100644
--- a/ping.c
+++ b/ping.c
@@ -452,6 +452,17 @@ main(int argc, char **argv)
/* Create sockets */
enable_capability_raw();
+
+ /*
+ * ping depend on SIGALARM to exit sometimes,
+ * but to popen, system, fork carry on parent signal handler
+ * so we mask it ourself.
+ */
+ sigset_t s;
+ sigaddset(&s, SIGALRM);
+ sigprocmask(SIG_UNBLOCK, &s, NULL);
+ set_signal(SIGALRM, doexit);
+
if (hints.ai_family != AF_INET6)
create_socket(&sock4, AF_INET, hints.ai_socktype, IPPROTO_ICMP,
hints.ai_family == AF_INET);
--
2.17.1