Date: Mon, 26 Mar 2007 02:19:44 -0600 (MDT) From: Brad Huntting <huntting@glarp.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/110842: proposed patch for blocksshd port Message-ID: <200703260819.l2Q8Ji2v017407@antediluvian.glarp.com> Resent-Message-ID: <200703260900.l2Q90Gsf030094@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200703260819.l2Q8Ji2v017407>