From owner-freebsd-ports Thu Aug 22 8:40:16 2002 Delivered-To: freebsd-ports@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8B17E37B400 for ; Thu, 22 Aug 2002 08:40:04 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id A890343E7B for ; Thu, 22 Aug 2002 08:40:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g7MFe3JU060247 for ; Thu, 22 Aug 2002 08:40:03 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g7MFe3Tt060246; Thu, 22 Aug 2002 08:40:03 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A796737B400 for ; Thu, 22 Aug 2002 08:38:41 -0700 (PDT) Received: from fep1.012.net.il (fep1.goldenlines.net.il [212.117.129.200]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0DA6D43E72 for ; Thu, 22 Aug 2002 08:38:40 -0700 (PDT) (envelope-from mapc@alchemy.ath.cx) Received: from cerberus.oven.org ([80.178.65.3]) by fep1.012.net.il with ESMTP id <20020822153832.KJDC15655.fep1@cerberus.oven.org> for ; Thu, 22 Aug 2002 18:38:32 +0300 Received: from alchemy.oven.org (alchemy.oven.org [10.0.1.2]) by cerberus.oven.org (8.12.3/8.12.3) with ESMTP id g7MFrgcv070920 for ; Thu, 22 Aug 2002 18:53:42 +0300 (IDT) (envelope-from mapc@alchemy.ath.cx) Received: from alchemy.oven.org (localhost [127.0.0.1]) by alchemy.oven.org (8.12.5/8.12.5) with ESMTP id g7MFfBZx035773 for ; Thu, 22 Aug 2002 18:41:12 +0300 (IDT) (envelope-from mapc@alchemy.ath.cx) Received: (from mapc@localhost) by alchemy.oven.org (8.12.5/8.12.5/Submit) id g7MFf8PD035772; Thu, 22 Aug 2002 18:41:08 +0300 (IDT) Message-Id: <200208221541.g7MFf8PD035772@alchemy.oven.org> Date: Thu, 22 Aug 2002 18:41:08 +0300 (IDT) From: Roman Shterenzon To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/41898: Maintainer update of net/netsed, bugfix Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 41898 >Category: ports >Synopsis: Maintainer update of net/netsed, bugfix >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Thu Aug 22 08:40:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Roman Shterenzon >Release: FreeBSD 4.6-STABLE i386 >Organization: >Environment: System: FreeBSD alchemy.oven.org 4.6-STABLE FreeBSD 4.6-STABLE #0: Thu Aug 1 18:31:26 IDT 2002 root@alchemy.oven.org:/local/src/sys/compile/ALCHEMY i386 >Description: Thanks to Jerry Lundy the zombie prevention fix is here. >How-To-Repeat: >Fix: diff -urN /usr/ports/net/netsed/Makefile netsed/Makefile --- /usr/ports/net/netsed/Makefile Sat Mar 10 21:44:14 2001 +++ netsed/Makefile Thu Aug 22 18:37:35 2002 @@ -7,6 +7,7 @@ PORTNAME= netsed PORTVERSION= 0.01 +PORTREVISION= 1 CATEGORIES= net security MASTER_SITES= http://dione.ids.pl/~lcamtuf/ \ http://lcamtuf.na.export.pl/ diff -urN /usr/ports/net/netsed/files/patch-netsed.c netsed/files/patch-netsed.c --- /usr/ports/net/netsed/files/patch-netsed.c Sat Mar 10 21:44:15 2001 +++ netsed/files/patch-netsed.c Thu Aug 22 18:37:14 2002 @@ -1,6 +1,31 @@ ---- netsed.c.orig Tue Jan 9 11:30:40 2001 -+++ netsed.c Tue Jan 9 11:43:41 2001 -@@ -134,8 +134,10 @@ +--- netsed.c.orig Fri Jan 5 18:58:22 2001 ++++ netsed.c Sun Aug 11 14:32:29 2002 +@@ -2,6 +2,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -45,11 +46,11 @@ + ERR("This will replace all occurences of pat1 with pat2 in matching packets.\n"); + ERR("Additional parameter (count) can be used to expire rule after 'count'\n"); + ERR("succesful substitutions. Eight-bit characters, including NULL and '/', can\n"); +- ERR("be passed using HTTP-alike hex escape sequences (eg. %%0a%%0d). Single '%%'\n"); +- ERR("can be reached by using '%%%%'. Examples:\n\n"); +- ERR(" 's/anrew/mike/1' - replace 'andrew' with 'mike' (once)\n"); +- ERR(" 's/anrew/mike' - replace all occurences of 'andrew' with 'mike'\n"); +- ERR(" 's/anrew/mike%%00' - replace 'andrew' with 'mike\\x00' (to keep orig. size)\n"); ++ ERR("be passed using HTTP-alike hex escape sequences (eg. CRLF -> %%0a%%0d).\n"); ++ ERR("Single '%%' can be reached by using '%%%%'. Examples:\n\n"); ++ ERR(" 's/andrew/mike/1' - replace 'andrew' with 'mike' (once)\n"); ++ ERR(" 's/andrew/mike' - replace all occurences of 'andrew' with 'mike'\n"); ++ ERR(" 's/andrew/mike%%00' - replace 'andrew' with 'mike\\x00' (to keep orig. size)\n"); + ERR(" 's/%%%%/%%2f/20' - replace '%%' with '/' in first 20 packets\n\n"); + ERR("Rules are not working on cross-packet boundaries and are evaluated from\n"); + ERR("first to last not expired rule.\n"); +@@ -134,8 +135,10 @@ void bind_and_listen(int tcp,int port) { @@ -11,7 +36,7 @@ fcntl(lsock,F_SETFL,O_NONBLOCK); laddr.sin_family = PF_INET; laddr.sin_port = htons (port); -@@ -186,7 +188,6 @@ +@@ -186,7 +189,6 @@ rd=read(s1,buf,sizeof(buf)); if (rd<0 && errno!=EAGAIN) return 0; // s1 not connected if (rd>0) { @@ -19,7 +44,7 @@ printf("[+] Caught server -> client packet.\n"); rd=sed_the_buffer(rd); if (write(s2,b2,rd)<=0) return 0; // not able to send -@@ -195,7 +196,6 @@ +@@ -195,7 +197,6 @@ rd=read(s2,buf,sizeof(buf)); if (rd<0 && errno!=EAGAIN) return 0; // s2 not connected if (rd>0) { @@ -27,3 +52,27 @@ printf("[+] Caught client -> server packet.\n"); rd=sed_the_buffer(rd); if (write(s1,b2,rd)<=0) return 0; // not able to send +@@ -204,6 +205,14 @@ + return 1; + } + ++void sig_chld(int signo) ++{ ++ pid_t pid; ++ int stat; ++ while ( (pid = waitpid(-1, &stat, WNOHANG)) > 0) ++ printf("child %d terminated\n", pid); ++ return; ++} + + int main(int argc,char* argv[]) { + int i; +@@ -242,7 +251,7 @@ + if (fixedhost && fixedport) printf("[+] Using fixed forwarding to %s:%s.\n",argv[3],argv[4]); + else printf("[+] Using dynamic (transparent proxy) forwarding.\n"); + signal(SIGPIPE,SIG_IGN); +- signal(SIGCHLD,SIG_IGN); ++ signal(SIGCHLD,sig_chld); + + // Am I bad coder?;> + >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message