diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-05-02 22:02:57 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-05-02 22:02:57 +0000 |
commit | b92d38f075907727dacabbc7d22c66b795a2cbf8 (patch) | |
tree | e9e85b55fec98a88e4afd47147bd41665070fd5d /net-misc/iputils/files | |
parent | Add a bunch of patches from Redhat, break up the Debian patch we used, and ad... (diff) | |
download | historical-b92d38f075907727dacabbc7d22c66b795a2cbf8.tar.gz historical-b92d38f075907727dacabbc7d22c66b795a2cbf8.tar.bz2 historical-b92d38f075907727dacabbc7d22c66b795a2cbf8.zip |
Update the gcc-inline patch by Dave Stahl #80969 and fix lazy bindings for setuid apps #77526.
Package-Manager: portage-2.0.51.21
Diffstat (limited to 'net-misc/iputils/files')
-rw-r--r-- | net-misc/iputils/files/021109-gcc34.patch | 20 | ||||
-rw-r--r-- | net-misc/iputils/files/iputils-021109-bindnow.patch | 16 | ||||
-rw-r--r-- | net-misc/iputils/files/iputils-021109-gcc34.patch | 134 |
3 files changed, 150 insertions, 20 deletions
diff --git a/net-misc/iputils/files/021109-gcc34.patch b/net-misc/iputils/files/021109-gcc34.patch deleted file mode 100644 index 6803da142523..000000000000 --- a/net-misc/iputils/files/021109-gcc34.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- tracepath.c.old 2004-04-24 01:28:35.380572520 +0100 -+++ tracepath.c 2004-04-24 01:44:07.649846048 +0100 -@@ -227,7 +227,6 @@ - - memset(sndbuf,0,mtu); - --restart: - for (i=0; i<10; i++) { - int res; - -@@ -243,7 +242,8 @@ - if (res==0) - return 0; - if (res > 0) -- goto restart; -+ i = 0; -+ continue; - } - hisptr = (hisptr + 1)&63; - diff --git a/net-misc/iputils/files/iputils-021109-bindnow.patch b/net-misc/iputils/files/iputils-021109-bindnow.patch new file mode 100644 index 000000000000..469418b2036a --- /dev/null +++ b/net-misc/iputils/files/iputils-021109-bindnow.patch @@ -0,0 +1,16 @@ +Since these binaries are going to be setuid root, we want +don't want to allow lazy bindings, otherwise we allow some +information leakage. + +http://bugs.gentoo.org/77526 + +--- Makefile ++++ Makefile +@@ -39,3 +39,7 @@ + ping: ping.o ping_common.o ++ $(LINK.o) $^ $(LDLIBS) -o $@ -Wl,-z,now -Wl,-z,relro + ping6: ping6.o ping_common.o ++ $(LINK.o) $^ $(LDLIBS) -o $@ -Wl,-z,now -Wl,-z,relro ++traceroute6: traceroute6.o ++ $(LINK.o) $^ $(LDLIBS) -o $@ -Wl,-z,now -Wl,-z,relro + ping.o ping6.o ping_common.o: ping_common.h diff --git a/net-misc/iputils/files/iputils-021109-gcc34.patch b/net-misc/iputils/files/iputils-021109-gcc34.patch new file mode 100644 index 000000000000..98e1c6eb960f --- /dev/null +++ b/net-misc/iputils/files/iputils-021109-gcc34.patch @@ -0,0 +1,134 @@ +iputils has a lot of ugly goto's that break when using +large gcc inline-limits. + +Fixes by Robert Moss and Dave Stahl +http://bugs.gentoo.org/49241 +http://bugs.gentoo.org/80969 + +--- iputils/tracepath.c ++++ iputils/tracepath.c +@@ -76,7 +76,7 @@ + int progress = -1; + int broken_router; + +-restart: ++ while (1) { + memset(&rcvbuf, -1, sizeof(rcvbuf)); + iov.iov_base = &rcvbuf; + iov.iov_len = sizeof(rcvbuf); +@@ -93,7 +93,7 @@ + if (res < 0) { + if (errno == EAGAIN) + return progress; +- goto restart; ++ continue; + } + + progress = mtu; +@@ -216,7 +216,7 @@ + perror("NET ERROR"); + return 0; + } +- goto restart; ++ } + } + + int probe_ttl(int fd, int ttl) +@@ -227,7 +227,6 @@ + + memset(sndbuf,0,mtu); + +-restart: + for (i=0; i<10; i++) { + int res; + +@@ -243,7 +242,8 @@ + if (res==0) + return 0; + if (res > 0) +- goto restart; ++ i = 0; ++ continue; + } + hisptr = (hisptr + 1)&63; + +--- iputils/tracepath6.c ++++ iputils/tracepath6.c +@@ -66,7 +66,7 @@ + int progress = -1; + int broken_router; + +-restart: ++ while (1) { + memset(&rcvbuf, -1, sizeof(rcvbuf)); + iov.iov_base = &rcvbuf; + iov.iov_len = sizeof(rcvbuf); +@@ -83,7 +83,7 @@ + if (res < 0) { + if (errno == EAGAIN) + return progress; +- goto restart; ++ continue; + } + + progress = 2; +@@ -222,34 +222,29 @@ + perror("NET ERROR"); + return 0; + } +- goto restart; ++ } + } + + int probe_ttl(int fd, int ttl) + { +- int i; ++ int i=0, res; + char sndbuf[mtu]; + struct probehdr *hdr = (struct probehdr*)sndbuf; + +-restart: +- +- for (i=0; i<10; i++) { +- int res; +- +- hdr->ttl = ttl; +- gettimeofday(&hdr->tv, NULL); +- if (send(fd, sndbuf, mtu-overhead, 0) > 0) +- break; +- res = recverr(fd, ttl); +- if (res==0) +- return 0; +- if (res > 0) +- goto restart; +- } +- +- if (i<10) { +- int res; +- ++ while (i<10) { ++ for (i=0; i<10; i++) { ++ hdr->ttl = ttl; ++ gettimeofday(&hdr->tv, NULL); ++ if (send(fd, sndbuf, mtu-overhead, 0) > 0) ++ break; ++ res = recverr(fd, ttl); ++ if (res==0) ++ return 0; ++ if (res > 0) { ++ i = 0; ++ continue; ++ } ++ } + data_wait(fd); + if (recv(fd, sndbuf, sizeof(sndbuf), MSG_DONTWAIT) > 0) { + printf("%2d?: reply received 8)\n", ttl); +@@ -257,7 +252,7 @@ + } + res = recverr(fd, ttl); + if (res == 1) +- goto restart; ++ continue; + return res; + } + |