From owner-freebsd-ports@FreeBSD.ORG Mon Apr 14 10:59:44 2014 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E73A3AFA; Mon, 14 Apr 2014 10:59:43 +0000 (UTC) Received: from mailout11.t-online.de (mailout11.t-online.de [194.25.134.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailout00.t-online.de", Issuer "VeriSign Class 3 International Server CA - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1B34F14E1; Mon, 14 Apr 2014 10:59:43 +0000 (UTC) Received: from fwd03.aul.t-online.de (fwd03.aul.t-online.de [172.20.27.148]) by mailout11.t-online.de (Postfix) with SMTP id 519B050701D; Mon, 14 Apr 2014 12:59:17 +0200 (CEST) Received: from [192.168.119.11] (VOaYJ-ZUYhy0ZSMeOUtmnXqY+UdINfUX2EfzZ38gPDJjVTIlbA7A7Yr1udfO1TdQ-u@[84.154.124.31]) by fwd03.t-online.de with esmtp id 1WZebr-0iKisS0; Mon, 14 Apr 2014 12:59:31 +0200 Message-ID: <534BBF89.90802@freebsd.org> Date: Mon, 14 Apr 2014 12:59:21 +0200 From: Stefan Esser User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Benjamin Podszun , freebsd-ports@freebsd.org Subject: [FIX] Re: FreeBSD Port: security/sshguard-pf References: <53453547.2070307@uni-bielefeld.de> In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: multipart/mixed; boundary="------------090607010705020308040608" X-ID: VOaYJ-ZUYhy0ZSMeOUtmnXqY+UdINfUX2EfzZ38gPDJjVTIlbA7A7Yr1udfO1TdQ-u X-TOI-MSGID: 80aabf7c-3343-4e91-bacb-0bc6bf968dd6 Cc: crees@freebsd.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2014 10:59:44 -0000 This is a multi-part message in MIME format. --------------090607010705020308040608 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Am 14.04.2014 10:25, schrieb Benjamin Podszun: > I'd say this is a bug in sshguard: Failing to start shouldn't exit with 0. > That said, it first and foremost is a bug in the port. > > Looking at the rc script and the diff [1] the problem's easy enough: > ${sshguard_pidfile} is passed as parameter to -i, but isn't set in the > script/has no default value. Either the related line from the previous > revision should be revived or the substitution should change to use > ${pidfile}, which _is_ set. The attached diff fixes the problems in the sshguard rc file. I have replaced occurences of ${name} with "sshguard", in accordance with newer rc script style conventions. The diff has to be applied within the files sub-directory of the sshguard port. The other problems of this port (see previous mail) are not fixed and should still be addressed ... Regards, STefan --------------090607010705020308040608 Content-Type: text/plain; charset=windows-1252; name="sshguard-rcfile.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="sshguard-rcfile.diff" --- sshguard.in 2014-04-09 10:49:16.292610649 +0200 +++ /usr/local/etc/rc.d/sshguard 2014-04-14 12:18:00.867681882 +0200 @@ -64,24 +64,23 @@ name="sshguard" rcvar="sshguard_enable" -load_rc_config $name +load_rc_config sshguard : ${sshguard_enable:="NO"} -: ${sshguard_blacklist="40:/var/db/sshguard/blacklist.db"} -: ${sshguard_safety_thresh="40"} -: ${sshguard_pardon_min_interval="1200"} -: ${sshguard_prescribe_interval="420"} -: ${sshguard_whitelistfile="%%PREFIX%%/etc/sshguard.whitelist"} -: ${sshguard_watch_logs="/var/log/auth.log:/var/log/maillog"} - -pidfile=${sshguard_pidfile:-"/var/run/${name}.pid"} +: ${sshguard_blacklist:="40:/var/db/sshguard/blacklist.db"} +: ${sshguard_safety_thresh:="40"} +: ${sshguard_pardon_min_interval:="1200"} +: ${sshguard_prescribe_interval:="420"} +: ${sshguard_whitelistfile:="%%PREFIX%%/etc/sshguard.whitelist"} +: ${sshguard_watch_logs:="/var/log/auth.log:/var/log/maillog"} +: ${sshguard_pidfile:="/var/run/sshguard.pid"} command="/usr/sbin/daemon" -actual_command="%%PREFIX%%/sbin/${name}" +actual_command="%%PREFIX%%/sbin/sshguard" procname="${actual_command}" -start_precmd="${name}_prestart" +start_precmd="sshguard_prestart" -command_args="-cf ${actual_command} -b ${sshguard_blacklist} ${sshguard_watch_params} -a ${sshguard_safety_thresh} -p ${sshguard_pardon_min_interval} -s ${sshguard_prescribe_interval} -w ${sshguard_whitelistfile} -i ${sshguard_pidfile}" +command_args="-cf ${actual_command} -b ${sshguard_blacklist} \${sshguard_watch_params} -a ${sshguard_safety_thresh} -p ${sshguard_pardon_min_interval} -s ${sshguard_prescribe_interval} -w ${sshguard_whitelistfile} -i ${sshguard_pidfile}" sshguard_prestart() { --------------090607010705020308040608--