From e431350f5171d1a8ea5e7100adc93568d646d1d6 Mon Sep 17 00:00:00 2001 From: dugsong Date: Mon, 21 Jun 1999 19:41:32 +0000 Subject: [PATCH] new xip port --- net/xip/Makefile | 36 ++++++++++++++++ net/xip/files/md5 | 3 ++ net/xip/patches/patch-aa | 11 +++++ net/xip/patches/patch-ab | 12 ++++++ net/xip/patches/patch-ac | 13 ++++++ net/xip/patches/patch-ad | 35 +++++++++++++++ net/xip/pkg/COMMENT | 1 + net/xip/pkg/DESCR | 30 +++++++++++++ net/xip/pkg/PLIST | 92 ++++++++++++++++++++++++++++++++++++++++ net/xip/pkg/SECURITY | 7 +++ 10 files changed, 240 insertions(+) create mode 100644 net/xip/Makefile create mode 100644 net/xip/files/md5 create mode 100644 net/xip/patches/patch-aa create mode 100644 net/xip/patches/patch-ab create mode 100644 net/xip/patches/patch-ac create mode 100644 net/xip/patches/patch-ad create mode 100644 net/xip/pkg/COMMENT create mode 100644 net/xip/pkg/DESCR create mode 100644 net/xip/pkg/PLIST create mode 100644 net/xip/pkg/SECURITY diff --git a/net/xip/Makefile b/net/xip/Makefile new file mode 100644 index 00000000000..cb737c7bdef --- /dev/null +++ b/net/xip/Makefile @@ -0,0 +1,36 @@ +# Makefile for: xip +# Version required: 1.3.1 +# Date created: 21 Jun 1999 +# Whom: dugsong@monkey.org +# +# $OpenBSD: Makefile,v 1.1.1.1 1999/06/21 19:41:32 dugsong Exp $ + +DISTNAME= xip-1.3.1 + +CATEGORIES= net + +MASTER_SITES= http://www.capmedia.fr/mgall/xip/ + +MAINTAINER= dugsong@monkey.org + +USE_AUTOCONF= yes + +CONFIGURE_ENV= INCLUDES="-I${X11BASE}/include" \ + LIBS="-L${X11BASE}/lib -lX11 -lXext -lXt -lXaw -lXmu" + +USE_X11= yes + +post-build: + @echo "(this use of mktemp has been made safe in this OpenBSD port)" + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/xip/xip ${PREFIX}/bin + ${INSTALL_MAN} ${WRKSRC}/doc/xip.1 ${PREFIX}/man/man1 + ${INSTALL_DATA} ${WRKSRC}/xip/Xip.ad ${PREFIX}/lib/X11/app-defaults + ${INSTALL_DATA_DIR} ${PREFIX}/lib/xip + for dir in pkb pkc pkt ; do \ + ${INSTALL_DATA_DIR} ${PREFIX}/lib/xip/$$dir ; \ + ${INSTALL_DATA} ${WRKSRC}/lib/$$dir/* ${PREFIX}/lib/xip/$$dir ; \ + done + +.include diff --git a/net/xip/files/md5 b/net/xip/files/md5 new file mode 100644 index 00000000000..92926fb1a59 --- /dev/null +++ b/net/xip/files/md5 @@ -0,0 +1,3 @@ +SHA1 (xip-1.3.1.tar.gz) = 9cae6c69fcccb2e1438c1a1aaf658b36c81d0eef +RMD160 (xip-1.3.1.tar.gz) = 9c9171537afa33ad488787b7db8d9e155093272f +MD5 (xip-1.3.1.tar.gz) = 86ad928eb727026faa3c14da20aad3c5 diff --git a/net/xip/patches/patch-aa b/net/xip/patches/patch-aa new file mode 100644 index 00000000000..73944c99a00 --- /dev/null +++ b/net/xip/patches/patch-aa @@ -0,0 +1,11 @@ +--- configure.in-orig Sun Jun 20 11:43:38 1999 ++++ configure.in Mon Jun 21 15:11:46 1999 +@@ -61,7 +61,7 @@ + dnl library functions + dnl + +-AC_CHECK_FUNCS(bzero bcopy bcmp strdup qsort snprintf usleep strerror strtol strtoul dlopen) ++AC_CHECK_FUNCS(bzero bcopy bcmp strdup qsort snprintf usleep strerror strtol strtoul dlopen mkdtemp) + MG_LIBPCAP(PCAP_DEP,PCAP_INCLPATH,PCAP_LIBPATH) + AC_SUBST(PCAP_DEP) + AC_SUBST(PCAP_INCLPATH) diff --git a/net/xip/patches/patch-ab b/net/xip/patches/patch-ab new file mode 100644 index 00000000000..83bedf8d4ef --- /dev/null +++ b/net/xip/patches/patch-ab @@ -0,0 +1,12 @@ +--- config.h.in-orig Thu May 13 11:49:54 1999 ++++ config.h.in Mon Jun 21 15:14:01 1999 +@@ -64,6 +64,9 @@ + /* Define if you have the dlopen function. */ + #undef HAVE_DLOPEN + ++/* Define if you have the mkdtemp function. */ ++#undef HAVE_MKDTEMP ++ + /* Define if you have the qsort function. */ + #undef HAVE_QSORT + diff --git a/net/xip/patches/patch-ac b/net/xip/patches/patch-ac new file mode 100644 index 00000000000..e2516e7c27c --- /dev/null +++ b/net/xip/patches/patch-ac @@ -0,0 +1,13 @@ +--- xip/xipvar.c-orig Mon Jun 21 11:53:08 1999 ++++ xip/xipvar.c Mon Jun 21 11:55:11 1999 +@@ -54,6 +54,10 @@ + # include + #endif + ++#ifndef RTLD_NOW ++#define RTLD_NOW DL_LAZY ++#endif ++ + extern Widget toplevel; + extern t_boolean verbose; + extern Pixmap xipicon_pixmap; diff --git a/net/xip/patches/patch-ad b/net/xip/patches/patch-ad new file mode 100644 index 00000000000..eb4a698e78f --- /dev/null +++ b/net/xip/patches/patch-ad @@ -0,0 +1,35 @@ +*** xip/xippkt.c-orig Mon Jun 21 13:37:43 1999 +--- xip/xippkt.c Mon Jun 21 13:51:12 1999 +*************** +*** 962,967 **** +--- 962,979 ---- + #define TMP_TEMPLATE "/tmp/xipXXXXXX" + + strcpy(fnamebuf,TMP_TEMPLATE); ++ ++ #ifdef HAVE_MKDTEMP ++ #define TMP_FILENAME "XXXXXXXXXX" ++ ++ /* Wrap the unsafe mktemp() below. */ ++ if ((fname = mkdtemp(fnamebuf)) == NULL) ++ return (-ERR_XIP_SUBROUTINE); ++ ++ strcat(fnamebuf, "/"); ++ strcat(fnamebuf, TMP_FILENAME); ++ #endif ++ + if ((fname = mktemp(fnamebuf)) == NULL) + return (-ERR_XIP_SUBROUTINE); + if ((status = pkt_save_raw(xmd->xp->pkt, +*************** +*** 1023,1028 **** +--- 1035,1043 ---- + status = 0; + end: + unlink(fname); ++ #ifdef HAVE_MKDTEMP ++ rmdir(dirname(fname)); ++ #endif + return (status); + } + diff --git a/net/xip/pkg/COMMENT b/net/xip/pkg/COMMENT new file mode 100644 index 00000000000..336c94a5f81 --- /dev/null +++ b/net/xip/pkg/COMMENT @@ -0,0 +1 @@ +X11-based network packet inspection / manipulation diff --git a/net/xip/pkg/DESCR b/net/xip/pkg/DESCR new file mode 100644 index 00000000000..103d0d34f6a --- /dev/null +++ b/net/xip/pkg/DESCR @@ -0,0 +1,30 @@ + +Xip-1.3.1 released +------------------ + +Xip is a human ip stack. + +Features: + +* Tutorware. +* High speed datagram display (designed entirely in C and X11). +* Hability to change datagram values, re-checksum and re-send them. +* Possibility to implement new patterns. + +* Ether, ieee802 support. +* Full arp, rarp, ip, udp, tcp, icmp, igmp support (options, etc). +* Rip, dns, bootp, tftp, rpc support. +* Hundred of network patterns... + +New: + +* Partial token ring support. +* Full bootp/rfc1048/rfc2132/dhcp support. +* More and more patterns... + +Location: + +http://www.capmedia.net/mgall/xip + +M.Gall + diff --git a/net/xip/pkg/PLIST b/net/xip/pkg/PLIST new file mode 100644 index 00000000000..e7d06916131 --- /dev/null +++ b/net/xip/pkg/PLIST @@ -0,0 +1,92 @@ +bin/xip +man/man1/xip.1 +lib/X11/app-defaults/Xip.ad +lib/xip/pkb/dummy.pkb +@dirrm lib/xip/pkb +lib/xip/pkc/arp.pkc +lib/xip/pkc/arp_0.pkt +lib/xip/pkc/arp_1.pkt +lib/xip/pkc/arp_2.pkt +lib/xip/pkc/arp_3.pkt +lib/xip/pkc/arp_4.pkt +lib/xip/pkc/icmp.pkc +lib/xip/pkc/icmp_0.pkt +lib/xip/pkc/icmp_1.pkt +lib/xip/pkc/icmp_2.pkt +lib/xip/pkc/icmp_3.pkt +lib/xip/pkc/icmp_4.pkt +lib/xip/pkc/nfs.pkc +lib/xip/pkc/nfs_0.pkt +lib/xip/pkc/nfs_1.pkt +lib/xip/pkc/nfs_10.pkt +lib/xip/pkc/nfs_11.pkt +lib/xip/pkc/nfs_12.pkt +lib/xip/pkc/nfs_13.pkt +lib/xip/pkc/nfs_2.pkt +lib/xip/pkc/nfs_3.pkt +lib/xip/pkc/nfs_4.pkt +lib/xip/pkc/nfs_5.pkt +lib/xip/pkc/nfs_6.pkt +lib/xip/pkc/nfs_7.pkt +lib/xip/pkc/nfs_8.pkt +lib/xip/pkc/nfs_9.pkt +lib/xip/pkc/ping_rr.pkc +lib/xip/pkc/ping_rr_0.pkt +lib/xip/pkc/ping_rr_1.pkt +lib/xip/pkc/ping_rr_2.pkt +lib/xip/pkc/ping_rr_3.pkt +lib/xip/pkc/ping_rr_4.pkt +lib/xip/pkc/ping_rr_5.pkt +lib/xip/pkc/telnet.pkc +lib/xip/pkc/telnet_0.pkt +lib/xip/pkc/telnet_1.pkt +lib/xip/pkc/telnet_10.pkt +lib/xip/pkc/telnet_11.pkt +lib/xip/pkc/telnet_12.pkt +lib/xip/pkc/telnet_13.pkt +lib/xip/pkc/telnet_14.pkt +lib/xip/pkc/telnet_15.pkt +lib/xip/pkc/telnet_16.pkt +lib/xip/pkc/telnet_17.pkt +lib/xip/pkc/telnet_2.pkt +lib/xip/pkc/telnet_3.pkt +lib/xip/pkc/telnet_4.pkt +lib/xip/pkc/telnet_5.pkt +lib/xip/pkc/telnet_6.pkt +lib/xip/pkc/telnet_7.pkt +lib/xip/pkc/telnet_8.pkt +lib/xip/pkc/telnet_9.pkt +lib/xip/pkc/traceroute.pkc +lib/xip/pkc/traceroute_0.pkt +lib/xip/pkc/traceroute_1.pkt +@dirrm lib/xip/pkc +lib/xip/pkt/all.pkc +lib/xip/pkt/arp.pkt +lib/xip/pkt/arp_reply.pkt +lib/xip/pkt/ascii.pkt +lib/xip/pkt/big_tcp.pkt +lib/xip/pkt/dns_misc.pkt +lib/xip/pkt/dns_query.pkt +lib/xip/pkt/dns_response.pkt +lib/xip/pkt/ebcdic.pkt +lib/xip/pkt/echo_request.pkt +lib/xip/pkt/ether.pkt +lib/xip/pkt/ieee802.pkt +lib/xip/pkt/igmp.pkt +lib/xip/pkt/mkall +lib/xip/pkt/nastygram.pkt +lib/xip/pkt/ping_reply_rr.pkt +lib/xip/pkt/ping_reply_unable_rr.pkt +lib/xip/pkt/ping_request_rr.pkt +lib/xip/pkt/port_unreach.pkt +lib/xip/pkt/rfc2132.pkt +lib/xip/pkt/route.pkt +lib/xip/pkt/tcp_ack.pkt +lib/xip/pkt/tcp_syn.pkt +lib/xip/pkt/tftp.pkt +lib/xip/pkt/udp137.pkt +lib/xip/pkt/udp137_2.pkt +lib/xip/pkt/udp138.pkt +lib/xip/pkt/udp138_2.pkt +@dirrm lib/xip/pkt +@dirrm lib/xip diff --git a/net/xip/pkg/SECURITY b/net/xip/pkg/SECURITY new file mode 100644 index 00000000000..2005e3779fc --- /dev/null +++ b/net/xip/pkg/SECURITY @@ -0,0 +1,7 @@ + +fixed unsafe use of mktemp() in xip/xippkt.c + +there may be other issues in the packet decoding routines. + +-d. +