Puppet: System Administration Automated

Support

Ticket #1220: authstore.rb.patch

File authstore.rb.patch, 1.2 kB (added by technogeeky, 7 months ago)

correctly fixed previous spelling error in comment :)

  • a/lib/puppet/network/authstore.rb

    old new  
    269269                    rescue ArgumentError => detail 
    270270                        raise AuthStoreError, "Invalid IP address pattern %s" % value 
    271271                    end 
    272                 when /^([a-zA-Z][-\w]*\.)+[-\w]+$/: # a full hostname 
     272                when /^([\w]([-\w]*[\w])*\.)+[-\w]+$/: # a full hostname 
    273273                    @name = :domain 
    274274                    @pattern = munge_name(value) 
    275                 when /^\*(\.([a-zA-Z][-\w]*)){1,}$/: # *.domain.com 
     275                when /^\*(\.([\w]([-\w]*[\w])*)){1,}$/: # *.domain.com 
    276276                    @name = :domain 
    277277                    @pattern = munge_name(value) 
    278278                    @pattern.pop # take off the '*' 
    279279                    @length = @pattern.length 
     280               when /^([\w]([-\w]*[\w])*)$/:      # a single-word hostname, no wildcards 
     281                   @name = :domain 
     282                   @pattern = munge_name(value) 
    280283                else 
    281284                    # Else, use the IPAddr class to determine if we've got a 
    282285                    # valid IP address.