shift / pulledpork

Automatically exported from code.google.com/p/pulledpork
GNU General Public License v2.0
0 stars 0 forks source link

Noisy warnings from Perl when generating stub rules #87

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. pulledpork -c /path/to/config -K /path/to/rules_dir
2.
3.

What is the expected output? What do you see instead?
The following Perl warning is repeated many times:
"Use of uninitialized value within %hcategory in numeric eq (==) at 
/usr/bin/pulledpork.pl line 1055."

What version of the product are you using? On what operating system?
0.6.1 on Gentoo (x86 and amd64)

Please provide any additional information below.
Line 1055 is checking for a key being set in %hcategory before the key is 
defined.  Line 1055 in pulledpork.pl should check for the key being defined 
before checking the key itself.

if ( -f "$filepath/$file" && defined($hcategory{file}) && $hcategory{$file} == 
1 ) {

Just checking for the key being defined is sufficient to silence the warning.  
A diff is attached.

Original issue reported on code.google.com by brett.ed...@gmail.com on 14 Jul 2011 at 1:48

Attachments:

GoogleCodeExporter commented 9 years ago
I would just like to confirm that I have the same problem when using:

/usr/bin/pulledpork.pl -k -c /etc/nsm/pulledpork/pulledpork.conf

with out_path being set to /etc/nsm/rules/ in pulledpork.conf

I am using Security Onion.

The given patch fixed the issue, there are no longer noisy warnings when 
running the rule-update and generating stub rules.

Original comment by idboeh...@gmail.com on 27 Mar 2013 at 1:25