Re: [FIX] Re: FreeBSD Port: security/sshguard-pf

2014-04-25 Thread Chris Rees
On Mon, 14 Apr 2014 12:59:21 +0200, Stefan Esser wrote
> 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 ...

Sorry, I thought you'd committed this!

Thanks very much for the patch-- the trick with \$ to delay evaluation was
more elegant than my plan to stick that line inside _prestart.

Chris

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: [FIX] Re: FreeBSD Port: security/sshguard-pf

2014-04-14 Thread Chris Rees
Please commit it in the meantime, I'll fix the rest shortly.  Can't remember if 
you have a ports bit, if not "Approved" :)

Thanks,

Chris

On 14 April 2014 11:59:21 BST, Stefan Esser  wrote:
>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
>
>-- 
>This message has been scanned for viruses and
>dangerous content by MailScanner, and is
>believed to be clean.

-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


[FIX] Re: FreeBSD Port: security/sshguard-pf

2014-04-14 Thread Stefan Esser
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
--- sshguard.in 2014-04-09 10:49:16.292610649 +0200
+++ /usr/local/etc/rc.d/sshguard2014-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()
 {
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"