diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-04-04 14:55:36 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-04-04 14:55:36 +0000 |
commit | dc5b184b1f9c5ab8212b28cee07f5b0edf7aa3c2 (patch) | |
tree | 3b7843b98d1fc3d9ab94c6109e0efdc304aa7ede /lib/resolv.rb | |
parent | b2a1339f2457166e2ef9ffe16f7f4bdb46bb5bf8 (diff) | |
download | ruby-dc5b184b1f9c5ab8212b28cee07f5b0edf7aa3c2.tar.gz |
* lib/resolv.rb (bind_random_port): Rescue EACCES for SunOS.
bind() on SunOS for port 2049 (nfs) and 4045 (lockd) causes
EACCES with unprivileged process. cf. PRIV_SYS_NFS in privileges(5)
[ruby-core:48064] [Bug #7183] reported by Frank Meier.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/resolv.rb')
-rw-r--r-- | lib/resolv.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/resolv.rb b/lib/resolv.rb index e52649d32c..cfdca8be5a 100644 --- a/lib/resolv.rb +++ b/lib/resolv.rb @@ -645,7 +645,7 @@ class Resolv begin port = rangerand(1024..65535) udpsock.bind(bind_host, port) - rescue Errno::EADDRINUSE + rescue Errno::EADDRINUSE, Errno::EACCES retry end end |