summaryrefslogtreecommitdiffstats
path: root/lib/puppet/network
diff options
context:
space:
mode:
authorMarkus Roberts <Markus@reality.com>2009-12-21 14:10:07 -0800
committerJames Turnbull <james@lovedthanlost.net>2009-12-22 15:17:19 +1100
commitd60ea0e52debf03fddb2336704df10589108fe3a (patch)
tree9e952eb6cc72e568f01295301036c2c45b9574ff /lib/puppet/network
parentb185801835cd656a8c3bab7654a8dddd2a74dba4 (diff)
downloadpuppet-d60ea0e52debf03fddb2336704df10589108fe3a.tar.gz
puppet-d60ea0e52debf03fddb2336704df10589108fe3a.tar.xz
puppet-d60ea0e52debf03fddb2336704df10589108fe3a.zip
A slide down the RFC-1123 slope towards MS Windows compatibility and chaos
Diffstat (limited to 'lib/puppet/network')
-rwxr-xr-xlib/puppet/network/authstore.rb10
-rwxr-xr-xlib/puppet/network/handler/fileserver.rb1
2 files changed, 6 insertions, 5 deletions
diff --git a/lib/puppet/network/authstore.rb b/lib/puppet/network/authstore.rb
index a171537fc..796d3d830 100755
--- a/lib/puppet/network/authstore.rb
+++ b/lib/puppet/network/authstore.rb
@@ -236,15 +236,15 @@ module Puppet
segments = value.split(".")[0..-2]
bits = 8*segments.length
[:ip,:inexact,bits,IPAddr.new((segments+[0,0,0])[0,4].join(".") + "/#{bits}")]
- when /^([a-zA-Z0-9][-\w]*\.)+[-\w]+$/ # a full hostname
- # Change to /^([a-zA-Z][-\w]*\.)+[-\w]+\.?$/ for FQDN support
+ when /^(\w[-\w]*\.)+[-\w]+$/ # a full hostname
+ # Change to /^(\w[-\w]*\.)+[-\w]+\.?$/ for FQDN support
[:domain,:exact,nil,munge_name(value)]
- when /^\*(\.([a-zA-Z][-\w]*)){1,}$/ # *.domain.com
+ when /^\*(\.(\w[-\w]*)){1,}$/ # *.domain.com
host_sans_star = munge_name(value)[1..-1]
[:domain,:inexact,host_sans_star.length,host_sans_star]
- when /\$\d+/ # a backreference pattern ala $1.reductivelabs.com or 192.168.0.$1 or $1.$2
+ when /\$\d+/ # a backreference pattern ala $1.reductivelabs.com or 192.168.0.$1 or $1.$2
[:dynamic,:exact,nil,munge_name(value)]
- when /^[a-zA-Z0-9][-.@\w]*$/ # ? Just like a host name but allow '@'s and ending '.'s
+ when /^\w[-.@\w]*$/ # ? Just like a host name but allow '@'s and ending '.'s
[:opaque,:exact,nil,[value]]
else
raise AuthStoreError, "Invalid pattern %s" % value
diff --git a/lib/puppet/network/handler/fileserver.rb b/lib/puppet/network/handler/fileserver.rb
index 6bc6d9d4a..7049fb0dc 100755
--- a/lib/puppet/network/handler/fileserver.rb
+++ b/lib/puppet/network/handler/fileserver.rb
@@ -310,6 +310,7 @@ class Puppet::Network::Handler
mount.info "allowing %s access" % val
mount.allow(val)
rescue AuthStoreError => detail
+ puts detail.backtrace if Puppet[:trace]
raise FileServerError.new(detail.to_s,
count, @configuration.file)
end