From: Sean Chittenden Date: 2002-07-08T07:43:12+09:00 Subject: [PATCH] lib/mkfm.rb: have_bin()/find_bin() --4zI0WCX1RcnW9Hbu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline This could be me over looking something, but in mkmf.rb, there is no reliable way to test for an external binary, such as net-snmp-config, which contains much of the linking/compiling information. Anyway, the attached implements have_bin() and find_bin() methods. Comments? -sc -- Sean Chittenden --4zI0WCX1RcnW9Hbu Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=patch Index: resolv.rb =================================================================== RCS file: /src/ruby/lib/resolv.rb,v retrieving revision 1.11 diff -u -r1.11 resolv.rb --- resolv.rb 2002/04/18 05:11:31 1.11 +++ resolv.rb 2002/07/07 06:35:01 @@ -279,7 +279,7 @@ unless @initialized @name2addr = {} @addr2name = {} - open(@filename) {|f| + open(@filename.untaint) {|f| f.each {|line| line.sub!(/#.*/, '') addr, hostname, *aliases = line.split(/\s+/) @@ -685,7 +685,7 @@ @search = nil @ndots = 1 begin - open(@filename) {|f| + open(@filename.untaint) {|f| f.each {|line| line.sub!(/[#;].*/, '') keyword, *args = line.split(/\s+/) --4zI0WCX1RcnW9Hbu--