Issue #8240 has been updated by Raymond Page.

====resolv.conf====
domain domain
search domain foobar
===================

The above results in a domain of "foobar" being identified when it should be 
"domain".  The logic failure is in not looking for domain/search at the 
beginning of the line preceeded only by whitespace.


----------------------------------------
Bug #8240: Facter domain logic does not permit "domain" or "search" as a 
substring of your domainname
https://projects.puppetlabs.com/issues/8240

Author: Raymond Page
Status: Needs More Information
Priority: Normal
Assignee: Adrien Thebo
Category: 
Target version: 
Keywords: 
Branch: 
Affected Facter version: 


In domain.rb

This is incorrect:
20                     if line =~ /domain\s+(\S+)/
21                         domain = $1
22                     elsif line =~ /search\s+(\S+)/
23                         search = $1
24                     end

Better:
20                     if line =~ /^\s*domain\s+(\S+)/
21                         domain = $1
22                     elsif line =~ /^\s*search\s+(\S+)/
23                         search = $1
24                     end



-- 
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