diff options
author | Markus Roberts <Markus@reality.com> | 2009-08-14 19:41:54 -0700 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2009-08-18 07:36:56 +1000 |
commit | a35e9bf918db0f6fca45d8b0b002a372cff4f982 (patch) | |
tree | 0bea447ae749c985c7e20d2c00a24fc7a7c0b000 /lib | |
parent | 299eadb7d903d250c8340049bd78611f0c705920 (diff) | |
download | puppet-a35e9bf918db0f6fca45d8b0b002a372cff4f982.tar.gz puppet-a35e9bf918db0f6fca45d8b0b002a372cff4f982.tar.xz puppet-a35e9bf918db0f6fca45d8b0b002a372cff4f982.zip |
Fix for #2531; adds tests to confirm problem and related cases,
notes fixes specific issue by eliminating the specal case for
opaque strings which caused them to be strings when everything else
was arrays; adds nots and pending tests where FQDN support could be
added but stops short of a full refactor.
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/puppet/network/authstore.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/puppet/network/authstore.rb b/lib/puppet/network/authstore.rb index 306e1ba8a..4707f36a5 100755 --- a/lib/puppet/network/authstore.rb +++ b/lib/puppet/network/authstore.rb @@ -249,7 +249,7 @@ module Puppet # Does the name match our pattern? def matchname?(name) - name = munge_name(name) unless @name == :opaque + name = munge_name(name) return true if self.pattern == name # If it's an exact match, then just return false, since the @@ -272,6 +272,7 @@ module Puppet # Convert the name to a common pattern. def munge_name(name) # LAK:NOTE http://snurl.com/21zf8 [groups_google_com] + # Change to x = name.downcase.split(".",-1).reverse for FQDN support x = name.downcase.split(".").reverse end @@ -306,6 +307,7 @@ module Puppet raise AuthStoreError, "Invalid IP address pattern %s" % value end when /^([a-zA-Z][-\w]*\.)+[-\w]+$/ # a full hostname + # Change to /^([a-zA-Z][-\w]*\.)+[-\w]+\.?$/ for FQDN support @name = :domain @pattern = munge_name(value) when /^\*(\.([a-zA-Z][-\w]*)){1,}$/ # *.domain.com |