summaryrefslogtreecommitdiff
path: root/packages/iputils/files/iputils-retvals.patch
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2006-04-28 10:16:04 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2006-04-28 10:16:04 +0000
commit52cd1172a9c6c80c52d8f3099fac087ece07a40f (patch)
tree76e9f2ecd4c4b3774b6003256250150f041c904a /packages/iputils/files/iputils-retvals.patch
parent8b3e60e790a45fb4ce6be5399442e4c17835d2c1 (diff)
iputils: apply patch from #463
* this will need patching to work with glibc 2.4 due to the ipv6 changes
Diffstat (limited to 'packages/iputils/files/iputils-retvals.patch')
-rw-r--r--packages/iputils/files/iputils-retvals.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/packages/iputils/files/iputils-retvals.patch b/packages/iputils/files/iputils-retvals.patch
new file mode 100644
index 0000000000..73ef8a364e
--- /dev/null
+++ b/packages/iputils/files/iputils-retvals.patch
@@ -0,0 +1,49 @@
+From the fedora core SRPM. Outputs error message and exists if the
+command is not suid root or run as user root.
+
+--- iputils/traceroute6.c.old 2004-12-07 11:08:57.000000000 +0100
++++ iputils/traceroute6.c 2004-12-07 11:14:09.397575536 +0100
+@@ -352,8 +352,11 @@
+ icmp_sock = socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6);
+ socket_errno = errno;
+
+- setuid(getuid());
+-
++ if(setuid(getuid()) != 0)
++ {
++ perror("traceroute: setuid()");
++ exit(-1);
++ }
+ on = 1;
+ seq = tos = 0;
+ to = (struct sockaddr_in6 *)&whereto;
+--- iputils/ping6.c.old 2004-12-07 11:08:57.000000000 +0100
++++ iputils/ping6.c 2004-12-07 11:13:40.707937024 +0100
+@@ -223,7 +223,11 @@
+ socket_errno = errno;
+
+ uid = getuid();
+- setuid(uid);
++ if(setuid(uid) != 0)
++ {
++ perror("ping: setuid()");
++ exit(-1);
++ }
+
+ source.sin6_family = AF_INET6;
+ memset(&firsthop, 0, sizeof(firsthop));
+--- iputils/ping.c.old 2004-12-07 11:08:57.000000000 +0100
++++ iputils/ping.c 2004-12-07 11:13:27.523941296 +0100
+@@ -119,7 +119,11 @@
+ socket_errno = errno;
+
+ uid = getuid();
+- setuid(uid);
++ if(setuid(uid) != 0)
++ {
++ perror("ping: setuid()");
++ exit(-1);
++ }
+
+ source.sin_family = AF_INET;
+