From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Mar 26 09:00:16 2007 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7DACC16A407 for ; Mon, 26 Mar 2007 09:00:16 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 57A8313C44C for ; Mon, 26 Mar 2007 09:00:16 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l2Q90GIY030095 for ; Mon, 26 Mar 2007 09:00:16 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l2Q90Gsf030094; Mon, 26 Mar 2007 09:00:16 GMT (envelope-from gnats) Resent-Date: Mon, 26 Mar 2007 09:00:16 GMT Resent-Message-Id: <200703260900.l2Q90Gsf030094@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, Brad Huntting Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BBBE916A401 for ; Mon, 26 Mar 2007 08:52:06 +0000 (UTC) (envelope-from huntting@glarp.com) Received: from refuge.cryptolect.com (refuge.cryptolect.com [63.231.80.17]) by mx1.freebsd.org (Postfix) with ESMTP id 659D613C469 for ; Mon, 26 Mar 2007 08:52:06 +0000 (UTC) (envelope-from huntting@glarp.com) Received: from antediluvian.glarp.com (71-212-186-241.hlrn.qwest.net [71.212.186.241]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by refuge.cryptolect.com (Postfix) with ESMTP id 9C2995088E for ; Mon, 26 Mar 2007 02:19:48 -0600 (MDT) Received: from antediluvian.glarp.com (localhost [127.0.0.1]) by antediluvian.glarp.com (8.14.0/8.13.6) with ESMTP id l2Q8Jj3d017408 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NOT) for ; Mon, 26 Mar 2007 02:19:46 -0600 (MDT) (envelope-from huntting@antediluvian.glarp.com) Received: (from huntting@localhost) by antediluvian.glarp.com (8.14.0/8.13.6/Submit) id l2Q8Ji2v017407; Mon, 26 Mar 2007 02:19:44 -0600 (MDT) (envelope-from huntting) Message-Id: <200703260819.l2Q8Ji2v017407@antediluvian.glarp.com> Date: Mon, 26 Mar 2007 02:19:44 -0600 (MDT) From: Brad Huntting To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/110842: proposed patch for blocksshd port X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Brad Huntting List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Mar 2007 09:00:16 -0000 >Number: 110842 >Category: ports >Synopsis: proposed patch for blocksshd port >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Mar 26 09:00:15 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Brad Huntting >Release: FreeBSD 6.1-RELEASE i386 >Organization: >Environment: System: FreeBSD antediluvian.glarp.com 6.1-RELEASE FreeBSD 6.1-RELEASE #0: Sun May 7 04:32:43 UTC 2006 root@opus.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >Description: The security/blocksshd port install a perl script with DOS-like CRLF weirdness and fails to install an rc script. >How-To-Repeat: install, observe >Fix: diff -Pru /usr/ports/security/blocksshd/Makefile /tmp/blocksshd/Makefile --- /usr/ports/security/blocksshd/Makefile Thu Dec 14 03:29:13 2006 +++ /tmp/blocksshd/Makefile Mon Mar 26 02:09:03 2007 @@ -7,7 +7,7 @@ PORTNAME= blocksshd PORTVERSION= 1.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= security sysutils MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= blocksshd @@ -22,8 +22,17 @@ MAKE_ARGS= PREFIX="${PREFIX}" SYSCONFDIR="${PREFIX}/etc" NO_BUILD= yes USE_PERL5_RUN= yes +USE_RC_SUBR= blocksshd MAN1= blocksshd.1 + +pre-patch: + cd ${WRKSRC} && \ + for f in blocksshd blocksshd.conf blocksshd.man; \ + do \ + ${MV} $${f} $${f}.bak && \ + ${TR} -d '\r' <$${f}.bak >$${f}; \ + done post-patch: @${CHMOD} 755 ${WRKSRC}/init Binary files /usr/ports/security/blocksshd/blocksshd-1.0_3.tbz and /tmp/blocksshd/blocksshd-1.0_3.tbz differ diff -Pru /usr/ports/security/blocksshd/files/blocksshd.in /tmp/blocksshd/files/blocksshd.in --- /usr/ports/security/blocksshd/files/blocksshd.in Wed Dec 31 17:00:00 1969 +++ /tmp/blocksshd/files/blocksshd.in Mon Mar 26 01:40:13 2007 @@ -0,0 +1,24 @@ +#!/bin/sh +# + +# PROVIDE: blocksshd +# REQUIRE: NETWORKING +# BEFORE: securelevel +# KEYWORD: shutdown + +. %%RC_SUBR%% + +name="blocksshd" +rcvar="`set_rcvar`" +command="%%PREFIX%%/bin/${name}" +command_interpreter="/usr/bin/perl" +pidfile="/var/run/${name}.pid" +blocksshd_flags="--start" +stop_precmd=blocksshd_stop + +blocksshd_stop () { + ${command} --stop +} + +load_rc_config $name +run_rc_command "$1" diff -Pru /usr/ports/security/blocksshd/files/patch-blocksshd.conf /tmp/blocksshd/files/patch-blocksshd.conf --- /usr/ports/security/blocksshd/files/patch-blocksshd.conf Thu Nov 23 03:17:51 2006 +++ /tmp/blocksshd/files/patch-blocksshd.conf Mon Mar 26 02:02:09 2007 @@ -1,23 +1,23 @@ --- blocksshd.conf.orig Mon Nov 20 05:36:42 2006 +++ blocksshd.conf Thu Nov 23 13:12:35 2006 @@ -1,9 +1,9 @@ - # vim: syntax=perl - - $cfg = { -- os => 'linux', # Target OS - either linux or bsd -+ os => 'bsd', # Target OS - either linux or bsd - chain => 'blocksshd', # Name of iptables or pf chain -- logfile => '/var/log/secure', # Log file to monitor -+ logfile => '/var/log/auth.log', # Log file to monitor - logcheck => '10', # How often to check the log file - max_attempts => '4', # Max number of failures - timeout => '360', # Reset IP count if no activity after time out in seconds + # vim: syntax=perl + + $cfg = { +- os => 'linux', # Target OS - either linux or bsd ++ os => 'bsd', # Target OS - either linux or bsd + chain => 'blocksshd', # Name of iptables or pf chain +- logfile => '/var/log/secure', # Log file to monitor ++ logfile => '/var/log/auth.log', # Log file to monitor + logcheck => '10', # How often to check the log file + max_attempts => '4', # Max number of failures + timeout => '360', # Reset IP count if no activity after time out in seconds @@ -14,7 +14,7 @@ - pid_file => '/var/run/blocksshd.pid', # Location of PID file - send_email => '1', # Enable the sending of email notifications - email => 'root', # Email address to send notifications -- mail => '/bin/mail', # Location of mail binary -+ mail => '/usr/bin/mail', # Location of mail binary - iptables => '/sbin/iptables', # Location of iptables binary - only for Linux - pfctl => '/sbin/pfctl', # Location of pfctl binary - only for BSD - whitelist => [qw{ + pid_file => '/var/run/blocksshd.pid', # Location of PID file + send_email => '1', # Enable the sending of email notifications + email => 'root', # Email address to send notifications +- mail => '/bin/mail', # Location of mail binary ++ mail => '/usr/bin/mail', # Location of mail binary + iptables => '/sbin/iptables', # Location of iptables binary - only for Linux + pfctl => '/sbin/pfctl', # Location of pfctl binary - only for BSD + whitelist => [qw{ >Release-Note: >Audit-Trail: >Unformatted: