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