Accepting request 184929 from network:utilities

Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/184929
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/iputils?expand=0&rev=29
This commit is contained in:
Stephan Kulow 2013-08-01 15:13:48 +00:00 committed by Git OBS Bridge
commit f61bc4afe3
4 changed files with 57 additions and 0 deletions

View File

@ -0,0 +1,29 @@
--- ping.c 2013-07-23 11:15:15.851715020 +0200
+++ ping.c 2013-07-23 11:15:28.075824028 +0200
@@ -103,6 +103,7 @@
static u_short in_cksum(const u_short *addr, int len, u_short salt);
static void pr_icmph(__u8 type, __u8 code, __u32 info, struct icmphdr *icp);
static int parsetos(char *str);
+static void doexit (int);
static struct {
struct cmsghdr cm;
@@ -266,6 +267,8 @@
options |= F_SOURCEROUTE;
}
}
+ set_signal(SIGINT, doexit);
+
while (argc > 0) {
target = *argv;
@@ -1273,3 +1276,9 @@
" [-T tstamp-options] [-Q tos] [hop1 ...] destination\n");
exit(2);
}
+
+static void doexit(int signo)
+{
+ exit (1);
+}
+

View File

@ -0,0 +1,19 @@
--- ping.c 2013-07-23 11:02:26.364843595 +0200
+++ ping.c 2013-07-23 11:02:32.740900627 +0200
@@ -129,6 +129,16 @@
cap_t caps;
#endif
+ /*
+ * 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);
+
icmp_sock = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);
socket_errno = errno;

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Jul 23 11:04:46 CEST 2013 - ms@suse.de
- ping denpend on SIGALRM to exit sometime, so we mask it UNBLOCK (bnc #674304)
-------------------------------------------------------------------
Fri Mar 8 03:27:28 UTC 2013 - crrodriguez@opensuse.org

View File

@ -42,6 +42,8 @@ Patch2: iputils-traceroute6-stdint.diff
Patch3: iputils-ifenslave.diff
Patch6: iputils-s20101006-capabilities.diff
Patch7: iputils-pingtypo.diff
Patch8: iputils-s20101006-sec-ping-unblock.diff
Patch9: iputils-s20101006-ping-interrupt.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: permissions
@ -59,6 +61,8 @@ cp -a %SOURCE1 .
#patch5
%patch6 -p1
%patch7
%patch8
%patch9
mkdir linux
touch linux/autoconf.h