Quantalytics / pulledpork

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

Some modifysid.conf lines ignored #114

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Any modifysid.conf line with an IP address or network CIDR notation in the 
first field after the SID. For example:

2402001 "173.236.44.0\/24," ""

2.
3.

What is the expected output?

With $Verbose set to 2, I expect to see the SID listed after "Modifying 
Sids..." in stdout. I also expect the SID actually to be modified.

What do you see instead?

The line in the modifysid.conf file is ignored. The SID is not modified.

What version of the product are you using? 

0.5.0, but the behavior is the same with 0.6.1.

On what operating system?

Ubuntu 12.04.

Please provide any additional information below.

Using a "\" before the CIDR slash, and/or preceding any "." with "\", seems to 
make no difference.

The modify_sid sub seems also not to like prefixing the SID with the GID and a 
colon - but that might be considered a different issue. I simply discovered it 
while researching this problem.

Original issue reported on code.google.com by shane.ca...@gmail.com on 24 Aug 2012 at 5:24

GoogleCodeExporter commented 9 years ago
Actually, it's the way the regex in modify_sid is formed that is the issue. The 
third field on the line, the "to" field, must have at least one character in it 
or the regex will fail. I want it to be null, and it won't work. The regex 
should be

/([\d+|,|\*]*)\s+"(.+)"\s+"(.*)"/

And this is what I changed it to in my pulledpork.pl. It now works as I want.

Original comment by shane.ca...@gmail.com on 24 Aug 2012 at 8:17

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r242.

Original comment by Cummin...@gmail.com on 28 Aug 2012 at 3:46