Issue #9415 has been updated by Jim Pirzyk.

So the last update was a bit of a red herring.  Seems that I might have found a 
bug outside of my change.  My change is completely contained within 
Puppet::Network::AuthStore::parse()

Currently the parse() method returns the following:

parse('192.168.1.0/24') => [ 'ip', 'inexact', 24, 192.168.1.0 ]

parse('192.168.1.0/255.255.255.0') => [ 'ip', 'inexact', 24, 192.168.1.0 ]

So both cases are returning the same values (as they should be).  If you take 
my changes out you get the following:

parse('192.168.1.0/24') => [ 'ip', 'inexact', 24, 192.168.1.0 ]

parse('192.168.1.0/255.255.255.0') => "Invalid pattern 
192.168.1.0/255.255.255.0"

So we see my patch is trying to imitate existing behavior.  Just for reference 
my initial patch actually returned the following:

[ 'ip', 'inexact', 192, 192.168.1.0 ]

Which is clearly wrong.  Seems to me what ever code that is using the results 
of parse() is not quite correct in handling the resultant output.

My thought is we should open another bug that the 'allow 192.168.1.0/24' is not 
correct, pend this issue on that issue and have that worked on.  Not sure I can 
find the problem but I can take a stab at it.

Thoughts?
----------------------------------------
Feature #9415: use IPv4 netmasks in allow statements in config files
https://projects.puppetlabs.com/issues/9415

Author: Jim Pirzyk
Status: Tests Insufficient
Priority: Normal
Assignee: Jim Pirzyk
Category: plumbing
Target version: 
Affected Puppet version: 2.7.3
Keywords: 
Branch: 


If I use the following template for the namespaceauth.conf file (extends to 
other config files too)

[fileserver]
        allow *.<%= domain %>
        allow <%= network_eth0 %>/<%= netmask_eth0 %>
        allow 127.0.0.1

I get the following error:

Invalid pattern 192.168.1.0/255.255.255.0

In lieu of having a netmasklen_eth0 fact, I have supplied a patch to enable 
this syntax.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to