From: Tanaka Akira Date: 2005-01-19T01:29:57+09:00 Subject: Re: bug -- resolv.rb dies when "domain" in resolv.conf has no arg In article <20050117002220.GA1001@ensemble.local>, Sam Roberts writes: > [ensemble] ~/p/ruby/zeroconf $ ruby18 -rresolv -rpp -e '(r=Resolv::DNS::Config.new("./domain.conf")).lazy_initialize; pp r' > /usr/local/lib/ruby/1.8/resolv.rb:921:in `split': private method `scan' called for nil:NilClass (NoMethodError) > from /usr/local/lib/ruby/1.8/resolv.rb:788:in `lazy_initialize' > from /usr/local/lib/ruby/1.8/resolv.rb:788:in `map' > from /usr/local/lib/ruby/1.8/resolv.rb:788:in `lazy_initialize' > from /usr/local/lib/ruby/1.8/resolv.rb:761:in `synchronize' > from /usr/local/lib/ruby/1.8/resolv.rb:761:in `lazy_initialize' > from -e:1 Thank you for the report. > Note that search (before) and domain (now, instead of dieing) with no > arguments both surpress the automagical choice of a search path based on > Socket.hostname. I believe this to be the correct behaviour, because it > seems reasonable to want to surpress the lookup (as a config option), > and because this is how the OS X C library resolver behaves. bind-9.3.0/lib/bind/resolv/res_init.c seems to ignore domain and search directive with no arguments. So I modified resolv.rb to ignore them. This may be incompatible with OS X C library resolver, though. -- Tanaka Akira