mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-26 19:00:34 +02:00
Zwischencommit fuer LFS.
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@324 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
150
src/patches/iputils-20020927-headers.patch
Normal file
150
src/patches/iputils-20020927-headers.patch
Normal file
@@ -0,0 +1,150 @@
|
||||
diff -urN iputils/clockdiff.c iputils.new/clockdiff.c
|
||||
--- iputils/clockdiff.c 2002-02-22 19:10:59.000000000 -0500
|
||||
+++ iputils.new/clockdiff.c 2003-09-10 09:20:28.000000000 -0400
|
||||
@@ -2,6 +2,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#include <stdio.h>
|
||||
+#include <linux/types.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
diff -urN iputils/ping6.c iputils.new/ping6.c
|
||||
--- iputils/ping6.c 2003-09-10 17:27:48.000000000 -0400
|
||||
+++ iputils.new/ping6.c 2003-09-10 17:22:43.000000000 -0400
|
||||
@@ -68,8 +68,44 @@
|
||||
*/
|
||||
#include "ping_common.h"
|
||||
|
||||
-#include <linux/in6.h>
|
||||
-#include <linux/ipv6.h>
|
||||
+struct ipv6_rt_hdr {
|
||||
+ __u8 nexthdr;
|
||||
+ __u8 hdrlen;
|
||||
+ __u8 type;
|
||||
+ __u8 segments_left;
|
||||
+
|
||||
+ /*
|
||||
+ * type specific data
|
||||
+ * variable length field
|
||||
+ */
|
||||
+};
|
||||
+
|
||||
+struct rt0_hdr {
|
||||
+ struct ipv6_rt_hdr rt_hdr;
|
||||
+ __u32 bitmap; /* strict/loose bit map */
|
||||
+ struct in6_addr addr[0];
|
||||
+
|
||||
+#define rt0_type rt_hdr.type;
|
||||
+};
|
||||
+#define IPV6_SRCRT_TYPE_0 0 /* IPv6 type 0 Routing Header */
|
||||
+struct ipv6hdr {
|
||||
+#if defined(__LITTLE_ENDIAN)
|
||||
+ __u8 priority:4,
|
||||
+ version:4;
|
||||
+#elif defined(__BIG_ENDIAN)
|
||||
+ __u8 version:4,
|
||||
+ priority:4;
|
||||
+#endif
|
||||
+ __u8 flow_lbl[3];
|
||||
+
|
||||
+ __u16 payload_len;
|
||||
+ __u8 nexthdr;
|
||||
+ __u8 hop_limit;
|
||||
+
|
||||
+ struct in6_addr saddr;
|
||||
+ struct in6_addr daddr;
|
||||
+};
|
||||
+
|
||||
#include <linux/icmpv6.h>
|
||||
|
||||
#define BIT_CLEAR(nr, addr) do { ((__u32 *)(addr))[(nr) >> 5] &= ~(1U << ((nr) & 31)); } while(0)
|
||||
diff -urN iputils/ping.c iputils.new/ping.c
|
||||
--- iputils/ping.c 2003-09-10 17:27:48.000000000 -0400
|
||||
+++ iputils.new/ping.c 2003-09-10 17:18:16.000000000 -0400
|
||||
@@ -60,8 +60,8 @@
|
||||
|
||||
#include "ping_common.h"
|
||||
|
||||
+#include <linux/icmp.h>
|
||||
#include <netinet/ip.h>
|
||||
-#include <netinet/ip_icmp.h>
|
||||
|
||||
|
||||
#define MAXIPLEN 60
|
||||
diff -urN iputils/ping_common.h iputils.new/ping_common.h
|
||||
--- iputils/ping_common.h 2002-09-20 11:08:11.000000000 -0400
|
||||
+++ iputils.new/ping_common.h 2003-09-10 17:16:16.000000000 -0400
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
+#include <linux/types.h>
|
||||
#include <linux/errqueue.h>
|
||||
|
||||
#include "SNAPSHOT.h"
|
||||
diff -urN iputils/tftpd.c iputils.new/tftpd.c
|
||||
--- iputils/tftpd.c 2002-01-23 19:31:41.000000000 -0500
|
||||
+++ iputils.new/tftpd.c 2003-09-10 09:39:45.000000000 -0400
|
||||
@@ -57,7 +57,6 @@
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
-#include <linux/in6.h>
|
||||
#include <netdb.h>
|
||||
|
||||
#include <setjmp.h>
|
||||
diff -urN iputils/tracepath6.c iputils.new/tracepath6.c
|
||||
--- iputils/tracepath6.c 2001-09-01 22:03:46.000000000 -0400
|
||||
+++ iputils.new/tracepath6.c 2003-09-10 09:40:18.000000000 -0400
|
||||
@@ -14,8 +14,7 @@
|
||||
#include <unistd.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
-
|
||||
-#include <linux/in6.h>
|
||||
+#include <linux/types.h>
|
||||
#include <linux/errqueue.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
diff -urN iputils/tracepath.c iputils.new/tracepath.c
|
||||
--- iputils/tracepath.c 2002-02-22 19:10:59.000000000 -0500
|
||||
+++ iputils.new/tracepath.c 2003-09-10 06:14:35.000000000 -0400
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/socket.h>
|
||||
+#include <linux/types.h>
|
||||
#include <linux/errqueue.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
diff -urN iputils/traceroute6.c iputils.new/traceroute6.c
|
||||
--- iputils/traceroute6.c 2002-09-20 11:44:22.000000000 -0400
|
||||
+++ iputils.new/traceroute6.c 2003-09-10 10:12:47.000000000 -0400
|
||||
@@ -246,9 +246,24 @@
|
||||
#include <netinet/ip_icmp.h>
|
||||
#include <netinet/udp.h>
|
||||
|
||||
-#include <linux/ipv6.h>
|
||||
-#include <linux/in6.h>
|
||||
+#include <linux/types.h>
|
||||
+struct ipv6hdr {
|
||||
+#if defined(__LITTLE_ENDIAN)
|
||||
+ __u8 priority:4,
|
||||
+ version:4;
|
||||
+#elif defined(__BIG_ENDIAN)
|
||||
+ __u8 version:4,
|
||||
+ priority:4;
|
||||
+#endif
|
||||
+ __u8 flow_lbl[3];
|
||||
+
|
||||
+ __u16 payload_len;
|
||||
+ __u8 nexthdr;
|
||||
+ __u8 hop_limit;
|
||||
|
||||
+ struct in6_addr saddr;
|
||||
+ struct in6_addr daddr;
|
||||
+};
|
||||
#include <linux/icmpv6.h>
|
||||
|
||||
#include <arpa/inet.h>
|
||||
31
src/patches/iputils-20020927-rh.patch
Normal file
31
src/patches/iputils-20020927-rh.patch
Normal file
@@ -0,0 +1,31 @@
|
||||
--- iputils/doc/Makefile.rh7 2002-02-23 01:17:57.000000000 +0100
|
||||
+++ iputils/doc/Makefile 2004-05-12 14:55:16.724448173 +0200
|
||||
@@ -2,7 +2,7 @@
|
||||
HTMLFILES=$(subst .sgml,.html,$(SGMLFILES)) index.html
|
||||
MANFILES=$(subst .sgml,.8,$(SGMLFILES))
|
||||
|
||||
-all: html
|
||||
+all:
|
||||
|
||||
html: $(HTMLFILES) iputils.html
|
||||
|
||||
--- iputils/Makefile.rh7 2002-09-20 20:23:55.000000000 +0200
|
||||
+++ iputils/Makefile 2004-05-12 15:08:25.638310270 +0200
|
||||
@@ -24,14 +24,14 @@
|
||||
CC=gcc
|
||||
# What a pity, all new gccs are buggy and -Werror does not work. Sigh.
|
||||
#CCOPT=-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g -Werror
|
||||
-CCOPT=-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g
|
||||
-CFLAGS=$(CCOPT) $(GLIBCFIX) -I$(KERNEL_INCLUDE) -I../include $(DEFINES)
|
||||
+#CCOPT=-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g
|
||||
+#CFLAGS=$(CCOPT) $(DEFINES)
|
||||
|
||||
IPV4_TARGETS=tracepath ping clockdiff rdisc arping tftpd rarpd
|
||||
IPV6_TARGETS=tracepath6 traceroute6 ping6
|
||||
TARGETS=$(IPV4_TARGETS) $(IPV6_TARGETS)
|
||||
|
||||
-all: check-kernel $(TARGETS)
|
||||
+all: $(TARGETS)
|
||||
|
||||
|
||||
tftpd: tftpd.o tftpsubs.o
|
||||
74
src/patches/iputils-glibckernheaders.patch
Normal file
74
src/patches/iputils-glibckernheaders.patch
Normal file
@@ -0,0 +1,74 @@
|
||||
diff -ru iputils/include-glibc/netinet/in.h iputils-clean/include-glibc/netinet/in.h
|
||||
--- iputils/include-glibc/netinet/in.h 2000-06-18 14:57:25.000000000 -0400
|
||||
+++ iputils-clean/include-glibc/netinet/in.h 2003-09-03 11:21:55.000000000 -0400
|
||||
@@ -8,4 +8,45 @@
|
||||
|
||||
#define SOL_IP 0
|
||||
|
||||
-#endif /* netinet/in.h */
|
||||
+/* Functions to convert between host and network byte order.
|
||||
+
|
||||
+ Please note that these functions normally take `unsigned long int' or
|
||||
+ `unsigned short int' values as arguments and also return them. But
|
||||
+ this was a short-sighted decision since on different systems the types
|
||||
+ may have different representations but the values are always the same. */
|
||||
+
|
||||
+extern u_int32_t ntohl (u_int32_t __netlong) __THROW __attribute__ ((__const__));
|
||||
+extern u_int16_t ntohs (u_int16_t __netshort)
|
||||
+ __THROW __attribute__ ((__const__));
|
||||
+extern u_int32_t htonl (u_int32_t __hostlong)
|
||||
+ __THROW __attribute__ ((__const__));
|
||||
+extern u_int16_t htons (u_int16_t __hostshort)
|
||||
+ __THROW __attribute__ ((__const__));
|
||||
+
|
||||
+#include <endian.h>
|
||||
+
|
||||
+/* Get machine dependent optimized versions of byte swapping functions. */
|
||||
+#include <bits/byteswap.h>
|
||||
+
|
||||
+#ifdef __OPTIMIZE__
|
||||
+/* We can optimize calls to the conversion functions. Either nothing has
|
||||
+ to be done or we are using directly the byte-swapping functions which
|
||||
+ often can be inlined. */
|
||||
+# if __BYTE_ORDER == __BIG_ENDIAN
|
||||
+/* The host byte order is the same as network byte order,
|
||||
+ so these functions are all just identity. */
|
||||
+# define ntohl(x) (x)
|
||||
+# define ntohs(x) (x)
|
||||
+# define htonl(x) (x)
|
||||
+# define htons(x) (x)
|
||||
+# else
|
||||
+# if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
+# define ntohl(x) __bswap_32 (x)
|
||||
+# define ntohs(x) __bswap_16 (x)
|
||||
+# define htonl(x) __bswap_32 (x)
|
||||
+# define htons(x) __bswap_16 (x)
|
||||
+# endif
|
||||
+# endif
|
||||
+#endif
|
||||
+
|
||||
+#endif /* netinet/in.h */
|
||||
diff -ru iputils/ping6.c iputils-clean/ping6.c
|
||||
--- iputils/ping6.c 2003-09-03 11:22:46.000000000 -0400
|
||||
+++ iputils-clean/ping6.c 2003-09-03 11:15:42.000000000 -0400
|
||||
@@ -879,7 +879,7 @@
|
||||
once = 1;
|
||||
|
||||
/* Patch bpflet for current identifier. */
|
||||
- insns[1] = (struct sock_filter)BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, __constant_htons(ident), 0, 1);
|
||||
+ insns[1] = (struct sock_filter)BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, htons(ident), 0, 1);
|
||||
|
||||
if (setsockopt(icmp_sock, SOL_SOCKET, SO_ATTACH_FILTER, &filter, sizeof(filter)))
|
||||
perror("WARNING: failed to install socket filter\n");
|
||||
diff -ru iputils/ping.c iputils-clean/ping.c
|
||||
--- iputils/ping.c 2003-09-03 11:22:46.000000000 -0400
|
||||
+++ iputils-clean/ping.c 2003-09-03 11:15:26.000000000 -0400
|
||||
@@ -1196,7 +1196,7 @@
|
||||
once = 1;
|
||||
|
||||
/* Patch bpflet for current identifier. */
|
||||
- insns[2] = (struct sock_filter)BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, __constant_htons(ident), 0, 1);
|
||||
+ insns[2] = (struct sock_filter)BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, htons(ident), 0, 1);
|
||||
|
||||
if (setsockopt(icmp_sock, SOL_SOCKET, SO_ATTACH_FILTER, &filter, sizeof(filter)))
|
||||
perror("WARNING: failed to install socket filter\n");
|
||||
21
src/patches/nasm-0.98.39-security_fix-1.patch
Normal file
21
src/patches/nasm-0.98.39-security_fix-1.patch
Normal file
@@ -0,0 +1,21 @@
|
||||
Submitted By: Ken Moffat <ken@kenmoffat.uklinux.net>
|
||||
Date: 2005-08-08
|
||||
Initial Package Version: 0.98.39
|
||||
Upstream Status: From upstream cvs
|
||||
Origin: Extracted by Ken Moffat
|
||||
Description: This is Jindrich Novy's patch to fix another buffer overrun
|
||||
in nasm, CAN-2005-1194 (users who can be persuaded to assemble and run a
|
||||
malicious source file can have arbitrary code executed via a buffer
|
||||
overflow).
|
||||
|
||||
--- nasm-0.98.39/output/outieee.c.orig 2005-01-15 22:16:08.000000000 +0000
|
||||
+++ nasm-0.98.39/output/outieee.c 2005-08-08 22:12:46.000000000 +0100
|
||||
@@ -1120,7 +1120,7 @@
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, format);
|
||||
- vsprintf(buffer, format, ap);
|
||||
+ vsnprintf(buffer, sizeof(buffer), format, ap);
|
||||
l = strlen(buffer);
|
||||
for (i = 0; i < l; i++)
|
||||
if ((buffer[i] & 0xff) > 31)
|
||||
Reference in New Issue
Block a user