1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/resolv.rb (bind_random_port): Rescue EPERM for FreeBSD which

security.mac.portacl.port_high is changed.
  See mac_portacl(4) for details.
  Reported by Jakub Szafranski.  [ruby-core:60917] [Bug #9544]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2014-02-22 17:38:57 +00:00
parent 1513550611
commit db537c5181
2 changed files with 10 additions and 1 deletions

View file

@ -1,3 +1,10 @@
Sun Feb 23 02:19:51 2014 Tanaka Akira <akr@fsij.org>
* lib/resolv.rb (bind_random_port): Rescue EPERM for FreeBSD which
security.mac.portacl.port_high is changed.
See mac_portacl(4) for details.
Reported by Jakub Szafranski. [ruby-core:60917] [Bug #9544]
Sat Feb 22 23:17:01 2014 Kouhei Sutou <kou@cozmixng.org> Sat Feb 22 23:17:01 2014 Kouhei Sutou <kou@cozmixng.org>
* lib/rexml/xpath_parser.rb: Fix indent. * lib/rexml/xpath_parser.rb: Fix indent.

View file

@ -652,7 +652,9 @@ class Resolv
begin begin
port = rangerand(1024..65535) port = rangerand(1024..65535)
udpsock.bind(bind_host, port) udpsock.bind(bind_host, port)
rescue Errno::EADDRINUSE, Errno::EACCES rescue Errno::EADDRINUSE, # POSIX
Errno::EACCES, # SunOS: See PRIV_SYS_NFS in privileges(5)
Errno::EPERM # FreeBSD: security.mac.portacl.port_high is configurable. See mac_portacl(4).
retry retry
end end
end end