Hi,
I've some freebsd server, with many version of it.
I'd also a script that use File::Tail to listen /var/log/auth.log and some other files to ban IPs those are trying brute force ssh attacks.
That test fails on any server and on my BSD servers that security script doesn't create any File::Tail, it simply hangs on that first call for anytime, without report any errors. So you think that servers are protected while they aren't.
I've written that test script to track the problem, please don't drop it easly: if on some (your) server it succeded you can include that simply test in your distro without problem and help others sysadmin to discover if they have security issues or not.
I've same issue on FreeBSD 8.1, 8.4, 9.3 and DragonFlyBSD 4.2.3, I can suppose that there are other BSD (real and not virtual) with same problems.
Best regards, \ferz
Show quoted text> Il giorno 30/lug/2015, alle ore 15:41, Matija Grabnar via RT <bug-File-Tail@rt.cpan.org> ha scritto:
>
> <URL:
https://rt.cpan.org/Ticket/Display.html?id=106145 >
>
> I think you're doing something wrong.
> I installed freebsd into a virtual machine, installed perl and
> File::Tail, and your test script WORKS FOR ME, so your claim that
> File::Tail is incompatible with FreeBSD is bogus.
>
> Perhaps if you actually propagated the error you get from eval instead
> of doing a die without a parameter, you might find out what the real
> problem was.
>
> Next time, if you think File::Tail died unreasonably, try to collect any
> errors it might have reported,
> and sending those along instead of throwing them away in your test script.
>
> Best regards,
> Matija Grabnar
>
>> On 07/29/2015 04:28 PM, nonsolosoft@diff.org via RT wrote:
>> Queue: File-Tail
>> Ticket <URL:
https://rt.cpan.org/Ticket/Display.html?id=106145 >
>>
>>> On Wed Jul 29 10:01:22 2015, nonsolosoft@diff.org wrote:
>>> perl test_FileTail.pl
>>> 1..3
>>> ok 1 - use File::Tail;
>>> ok 2 - file to test is readable by this user
>>> not ok 3 - Timeout File::Tail->new has not return object
>>> # Failed test 'Timeout File::Tail->new has not return object'
>>> # at test_FileTail.pl line 25.
>>> # Looks like you failed 1 test of 3.
>>>
>>> --------
>>>> uname -a
>>> FreeBSD myhost 9.3-RELEASE FreeBSD 9.3 - Sun Jul 26 11:40:02 UTC 2015
>>> amd64
>>> --------
>>>
>>> #!/usr/bin/env perl
>>>
>>> use strict;
>>> use warnings;
>>> use Test::More tests=>3;
>>>
>>> BEGIN {
>>> use_ok( 'File::Tail' );
>>> };
>>>
>>> my $filename = $ENV{FILE_TAIL_TO_TEST} || '/var/log/auth.log';
>>>
>>> ok(-r $filename, 'file to test is readable by this user');
>>>
>>> eval {
>>> local
>>> $SIG{ALRM} = sub { die "alarm\n" }; # NB: \n required
>>> alarm(1);
>>> my $fp = File::Tail->new(name=>'/var/log/auth.log', tail=>5);
>>> isa_ok($fp,'File::Tail');
>>> alarm 0;
>>> };
>>> if ($@) {
>>> alarm 0;
>>> die
>>> unless $@ eq "alarm\n"; # propagate unexpected errors
>>> #
>>> timed out
>>> fail('Timeout File::Tail->new has not return object');
>>> }
>>>
>>> exit 0;
>
>