From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Feb 6 14:10:00 2014 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B416C401 for ; Thu, 6 Feb 2014 14:10:00 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8D64018F0 for ; Thu, 6 Feb 2014 14:10:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id s16EA0Ye074648 for ; Thu, 6 Feb 2014 14:10:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s16EA0dq074647; Thu, 6 Feb 2014 14:10:00 GMT (envelope-from gnats) Resent-Date: Thu, 6 Feb 2014 14:10:00 GMT Resent-Message-Id: <201402061410.s16EA0dq074647@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Nikola Kolev Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CFD783D1 for ; Thu, 6 Feb 2014 14:08:50 +0000 (UTC) Received: from oldred.freebsd.org (oldred.freebsd.org [IPv6:2001:1900:2254:206a::50:4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AD16618DE for ; Thu, 6 Feb 2014 14:08:50 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id s16E8ncM025818 for ; Thu, 6 Feb 2014 14:08:50 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id s16E8nm7025817; Thu, 6 Feb 2014 14:08:49 GMT (envelope-from nobody) Message-Id: <201402061408.s16E8nm7025817@oldred.freebsd.org> Date: Thu, 6 Feb 2014 14:08:49 GMT From: Nikola Kolev To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/186511: [patch] net/netsed is unmaintained; take maintenance and update version X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Feb 2014 14:10:00 -0000 >Number: 186511 >Category: ports >Synopsis: [patch] net/netsed is unmaintained; take maintenance and update version >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Feb 06 14:10:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Nikola Kolev >Release: 10.0-RELEASE >Organization: >Environment: FreeBSD 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 >Description: >How-To-Repeat: >Fix: Patch attached with submission follows: diff -rupN netsed/Makefile netsed.new/Makefile --- netsed/Makefile 2014-01-22 19:00:46.000000000 +0200 +++ netsed.new/Makefile 2014-02-06 15:42:31.000000000 +0200 @@ -1,21 +1,16 @@ -# Created by: Roman Shterenzon -# $FreeBSD: head/net/netsed/Makefile 340722 2014-01-22 17:00:46Z mat $ +# $FreeBSD$ PORTNAME= netsed -PORTVERSION= 0.01 -PORTREVISION= 1 +PORTVERSION= 1.2 CATEGORIES= net security -MASTER_SITES= # no original distfile site available -DISTNAME= ${PORTNAME} -EXTRACT_SUFX= .tgz +MASTER_SITES= http://silicone.homelinux.org/release/netsed/ -MAINTAINER= ports@FreeBSD.org +MAINTAINER= koue@chaosophia.net COMMENT= Alters the contents of network packets in real time +USES= gmake MAKE_ARGS= CFLAGS="${CFLAGS}" -WRKSRC= ${WRKDIR} - PLIST_FILES= bin/${PORTNAME} PORTDOCS= README diff -rupN netsed/distinfo netsed.new/distinfo --- netsed/distinfo 2014-01-22 17:30:13.000000000 +0200 +++ netsed.new/distinfo 2014-02-06 15:45:04.000000000 +0200 @@ -1,2 +1,2 @@ -SHA256 (netsed.tgz) = a04f6b235d787b1efd96ecdb398e6c8456301dbf965840e6fcbad36c68372dce -SIZE (netsed.tgz) = 6352 +SHA256 (netsed-1.2.tar.gz) = 0a7f12bac83d02c6fc837055bf4ff02c1bdfc8ea478227afcc762e92d1661c80 +SIZE (netsed-1.2.tar.gz) = 28835 diff -rupN netsed/files/patch-netsed.c netsed.new/files/patch-netsed.c --- netsed/files/patch-netsed.c 2014-01-22 19:40:44.000000000 +0200 +++ netsed.new/files/patch-netsed.c 1970-01-01 02:00:00.000000000 +0200 @@ -1,78 +0,0 @@ ---- 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 occurrences 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) { -+ int on=1; - struct sockaddr_in laddr; - lsock=socket(PF_INET,tcp ? SOCK_STREAM:SOCK_DGRAM,0); -+ setsockopt(lsock, SOL_SOCKET, SO_REUSEADDR, (char *)&on, sizeof(on)); - fcntl(lsock,F_SETFL,O_NONBLOCK); - laddr.sin_family = PF_INET; - laddr.sin_port = htons (port); -@@ -186,7 +189,6 @@ - rd=read(s1,buf,sizeof(buf)); - if (rd<0 && errno!=EAGAIN) return 0; // s1 not connected - if (rd>0) { -- fcntl(s2,F_SETFL,O_SYNC); - 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 +197,6 @@ - rd=read(s2,buf,sizeof(buf)); - if (rd<0 && errno!=EAGAIN) return 0; // s2 not connected - if (rd>0) { -- fcntl(s1,F_SETFL,O_SYNC); - 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: