Skip to content

Ossec-batch-manager.pl exits immediately with error #1914

@seren

Description

@seren

Hi, I believe there's a syntax error in

use Regexp::Common::net;

Currently launching the script produces the error:

Global symbol "%RE" requires explicit package name (did you forget to declare "my %RE"?) at ./ossec-batch-manager.pl line 105.
Global symbol "%RE" requires explicit package name (did you forget to declare "my %RE"?) at ./ossec-batch-manager.pl line 107.
BEGIN not safe after errors--compilation aborted at ./ossec-batch-manager.pl line 139.

Changing the line use Regexp::Common::net; to use Regexp::Common qw(net); eliminates the error.

This import was part of the IPv6 support addition requested discussed in #1276 and implemented in #1667 (commit 999c373)

Given that this change was made 3 years ago and no one has complained, I'm also open to the idea that I'm doing something completely wrong on my end. ossec-batch-manager.pl has been working for us up until we upgraded to the latest version though.

I've opened a PR with the fix, in case it does prove to be the correct solution: #1913

Thanks.

Testing platform: Ubuntu 16.04.7 LTS
Testing version: Ossec 3.6.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions