diff options
| author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-08-31 07:22:16 +0000 |
|---|---|---|
| committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-08-31 07:22:16 +0000 |
| commit | 96fac49c19cef2dedf835cd00eb57ad523fd5e1f (patch) | |
| tree | 95fc288567d3309434a197a7093b2577a95ac147 | |
| parent | 6ffd2d5df78181a529bf7cfc71de79559d51d489 (diff) | |
merge revision(s) 45144: [Backport #9544]
* 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/branches/ruby_2_0_0@47335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 7 | ||||
| -rw-r--r-- | lib/resolv.rb | 4 | ||||
| -rw-r--r-- | version.h | 2 |
3 files changed, 11 insertions, 2 deletions
@@ -1,3 +1,10 @@ +Sun Aug 31 16:20:14 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] + Sun Aug 31 16:16:24 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> * re.c (match_aref): should not ignore name after NUL byte. diff --git a/lib/resolv.rb b/lib/resolv.rb index 6cf96a7035..53bfd54a11 100644 --- a/lib/resolv.rb +++ b/lib/resolv.rb @@ -646,7 +646,9 @@ class Resolv begin port = rangerand(1024..65535) udpsock.bind(bind_host, port) - rescue Errno::EADDRINUSE + 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 end end @@ -1,6 +1,6 @@ #define RUBY_VERSION "2.0.0" #define RUBY_RELEASE_DATE "2014-08-31" -#define RUBY_PATCHLEVEL 535 +#define RUBY_PATCHLEVEL 536 #define RUBY_RELEASE_YEAR 2014 #define RUBY_RELEASE_MONTH 8 |
