iputils/iputils-sec-ping-unblock.diff

43 lines
1.1 KiB
Diff
Raw Normal View History

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>
---
Accepting request 619908 from home:pevik:branches:network:utilities - Update to version s20180629 * ping: Fix signed overflow/conversion warning * ping: Fix ping name encoded using ACE on C locale * fix checksum always success in IPv4 ping. * ping6: Fix device binding * Ping: Correct rounding of timing displays * docs: Tiny fixes in README.md * doc/ping: Update Interface section * doc/ping: Replace deprecated commands in "SEE ALSO" section * Revert "correctly initialize first hop" * tracepath: Support calling `tracepath` as `tracepath4` or `tracepath6` * ping: remove spurious error message * tracepath: fix heap-buffer-overflow [asan] * arping: do not use libsysfs to read from /sys * .travis.yml: corrected variable values in matrix * .travis.yml: install libidn2 * ping: use libidn2 instead of libidn * ping: Remove workaround for bug in IP_RECVERR on raw sockets * ping6: simplified IDNA usage * traceroute6: use getaddrinfo IDNA conversion * arping,tracepath: removed unused idna header * cleanup: really old code, simplify little bit * licenses: fill missing clockdiff.c and ping_common.c license * LICENSE: convert BSD4 to BSD3 license * doc: ping - document mdev behaviour * LICENSE: add information about licenses * ping: fix incorrect packet loss calculation * doc: convert from converting SGML to XML * travis-ci: cleanup and switch to Ubuntu 14.04 build * RELNOTES: deprecated in favor of git history & github * remove iputils.spec * ping: fix conflicting defines * ping: flowinfo: fixup checks for flowinfo and also add decimal numbers support * ping: parsetos verification is enough, allow decimal values * ping: fix typo in error tos error message * meson: add experimental meson buildsystem support * gitignore: prepare for Meson * ping: read from error queue when POLLERR is set * ping_common.c: POLLERRR is ignored in events * ping: fix pmtu discovery for ipv6 * traceroute6: Fix traceroute to IPv6 address * traceroute6: Fix leaking the idn memory * traceroute6: Fix use after free for hostname * tracepath,doc: Added -4, -6 Parameter in doc and void usage(void) * fix multicast setsockopt calls on big endian * arping: exit if network disappears while running * ping: prevent possible double free after cap_free() * Add strict pattern matching on response when pattern was provided * traceroute6: Fix udp packet port specification. - Removed patches (taken from upstream, now in tree) * iputils-add-license-info.diff * iputils-ping-fix-pmtu-for-ipv6.patch * iputils-remove-bogus-check-required-for-2.4.9-kernels.patch - Rebased patches * iputils-ping-interrupt.diff * iputils-sec-ping-unblock.diff - Add build dependency docbook-xsl-stylesheets (required by man pages) - Add tracepath6 man page, updated list of unwanted man enties (ipg, pgset) - Removed RELNOTES (upstream removed it) OBS-URL: https://build.opensuse.org/request/show/619908 OBS-URL: https://build.opensuse.org/package/show/network:utilities/iputils?expand=0&rev=64
2018-07-04 00:02:17 +02:00
ping.c | 11 +++++++++++
1 file changed, 11 insertions(+)
Accepting request 522166 from home:pevik:branches:network:utilities - Update to version s20161105 (Changes taken from the RELNOTES file) * ping: eliminate deadcode & simplify * ping: do not allow oversized packets to root * correctly initialize first hop * ping: fix ping -6 -I * arping,doc: fix documentation of -I * ping: fix error message when getting EACCES from connect() * renamed INSTALL to INSTALL.md * (re)structured INSTALL.md and transformed into markdown; added hint that installation into prefix has to be done with DESTDIR make variable and that there's no prefix support in configure, close #21 * ping: Silence GCC warnings when building with -fstrict-aliasing * tftpd: Drop supplementary groups for root * libgcrypt: fix static linking * doc: Inserted a missing word * tracepath6: avoid redundant family variable * tracepath: borrow everything good from tracepath6 * tracepath: switch to dual-stack operation * tracepath: remove now redundant tracepath6 * docs: fix parallel build of manpages * ping: remove assignments of values that are never read * docs: remove references to ping6 and traceroute6 * ping: work with older kernels that don't support ping sockets * Revert "ping_common.c: fix message flood when EPERM is encountered in ping" * reorder -I option parsing (boo#1057664) * ping: also bind the ICMP socket to the specific device - tracepath6 is now symlink to tracepath. OBS-URL: https://build.opensuse.org/request/show/522166 OBS-URL: https://build.opensuse.org/package/show/network:utilities/iputils?expand=0&rev=48
2017-09-12 15:53:00 +02:00
diff --git a/ping.c b/ping.c
index 3debd82..06cc369 100644
Accepting request 522166 from home:pevik:branches:network:utilities - Update to version s20161105 (Changes taken from the RELNOTES file) * ping: eliminate deadcode & simplify * ping: do not allow oversized packets to root * correctly initialize first hop * ping: fix ping -6 -I * arping,doc: fix documentation of -I * ping: fix error message when getting EACCES from connect() * renamed INSTALL to INSTALL.md * (re)structured INSTALL.md and transformed into markdown; added hint that installation into prefix has to be done with DESTDIR make variable and that there's no prefix support in configure, close #21 * ping: Silence GCC warnings when building with -fstrict-aliasing * tftpd: Drop supplementary groups for root * libgcrypt: fix static linking * doc: Inserted a missing word * tracepath6: avoid redundant family variable * tracepath: borrow everything good from tracepath6 * tracepath: switch to dual-stack operation * tracepath: remove now redundant tracepath6 * docs: fix parallel build of manpages * ping: remove assignments of values that are never read * docs: remove references to ping6 and traceroute6 * ping: work with older kernels that don't support ping sockets * Revert "ping_common.c: fix message flood when EPERM is encountered in ping" * reorder -I option parsing (boo#1057664) * ping: also bind the ICMP socket to the specific device - tracepath6 is now symlink to tracepath. OBS-URL: https://build.opensuse.org/request/show/522166 OBS-URL: https://build.opensuse.org/package/show/network:utilities/iputils?expand=0&rev=48
2017-09-12 15:53:00 +02:00
--- 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);
Accepting request 619908 from home:pevik:branches:network:utilities - Update to version s20180629 * ping: Fix signed overflow/conversion warning * ping: Fix ping name encoded using ACE on C locale * fix checksum always success in IPv4 ping. * ping6: Fix device binding * Ping: Correct rounding of timing displays * docs: Tiny fixes in README.md * doc/ping: Update Interface section * doc/ping: Replace deprecated commands in "SEE ALSO" section * Revert "correctly initialize first hop" * tracepath: Support calling `tracepath` as `tracepath4` or `tracepath6` * ping: remove spurious error message * tracepath: fix heap-buffer-overflow [asan] * arping: do not use libsysfs to read from /sys * .travis.yml: corrected variable values in matrix * .travis.yml: install libidn2 * ping: use libidn2 instead of libidn * ping: Remove workaround for bug in IP_RECVERR on raw sockets * ping6: simplified IDNA usage * traceroute6: use getaddrinfo IDNA conversion * arping,tracepath: removed unused idna header * cleanup: really old code, simplify little bit * licenses: fill missing clockdiff.c and ping_common.c license * LICENSE: convert BSD4 to BSD3 license * doc: ping - document mdev behaviour * LICENSE: add information about licenses * ping: fix incorrect packet loss calculation * doc: convert from converting SGML to XML * travis-ci: cleanup and switch to Ubuntu 14.04 build * RELNOTES: deprecated in favor of git history & github * remove iputils.spec * ping: fix conflicting defines * ping: flowinfo: fixup checks for flowinfo and also add decimal numbers support * ping: parsetos verification is enough, allow decimal values * ping: fix typo in error tos error message * meson: add experimental meson buildsystem support * gitignore: prepare for Meson * ping: read from error queue when POLLERR is set * ping_common.c: POLLERRR is ignored in events * ping: fix pmtu discovery for ipv6 * traceroute6: Fix traceroute to IPv6 address * traceroute6: Fix leaking the idn memory * traceroute6: Fix use after free for hostname * tracepath,doc: Added -4, -6 Parameter in doc and void usage(void) * fix multicast setsockopt calls on big endian * arping: exit if network disappears while running * ping: prevent possible double free after cap_free() * Add strict pattern matching on response when pattern was provided * traceroute6: Fix udp packet port specification. - Removed patches (taken from upstream, now in tree) * iputils-add-license-info.diff * iputils-ping-fix-pmtu-for-ipv6.patch * iputils-remove-bogus-check-required-for-2.4.9-kernels.patch - Rebased patches * iputils-ping-interrupt.diff * iputils-sec-ping-unblock.diff - Add build dependency docbook-xsl-stylesheets (required by man pages) - Add tracepath6 man page, updated list of unwanted man enties (ipg, pgset) - Removed RELNOTES (upstream removed it) OBS-URL: https://build.opensuse.org/request/show/619908 OBS-URL: https://build.opensuse.org/package/show/network:utilities/iputils?expand=0&rev=64
2018-07-04 00:02:17 +02:00
--
2.17.1