ruby-changes:28060
From: akr <ko1@a...>
Date: Thu, 4 Apr 2013 23:56:00 +0900 (JST)
Subject: [ruby-changes:28060] akr:r40112 (trunk): * lib/resolv.rb (bind_random_port): Rescue EACCES for SunOS.
akr 2013-04-04 23:55:36 +0900 (Thu, 04 Apr 2013) New Revision: 40112 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40112 Log: * 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. Modified files: trunk/ChangeLog trunk/lib/resolv.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 40111) +++ ChangeLog (revision 40112) @@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Thu Apr 4 23:45:13 2013 Tanaka Akira <akr@f...> + + * 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. + Thu Apr 4 23:24:45 2013 Tanaka Akira <akr@f...> * ext/socket/extconf.rb: Remove condition for bcc. Index: lib/resolv.rb =================================================================== --- lib/resolv.rb (revision 40111) +++ lib/resolv.rb (revision 40112) @@ -645,7 +645,7 @@ class Resolv https://github.com/ruby/ruby/blob/trunk/lib/resolv.rb#L645 begin port = rangerand(1024..65535) udpsock.bind(bind_host, port) - rescue Errno::EADDRINUSE + rescue Errno::EADDRINUSE, Errno::EACCES retry end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/