[SCM] 100% pure-Java implementation of Ruby branch, master, updated. debian/1.5.6-5-1-g53153bf
tony mancill
tmancill at debian.org
Tue Dec 25 06:43:06 UTC 2012
The following commit has been merged in the master branch:
commit 53153bf64166524fb9c89f8cb2c868f843d28452
Author: tony mancill <tmancill at debian.org>
Date: Mon Dec 24 21:50:53 2012 -0800
add patch to set FD_CLOEXEC using F_SETFD (Closes: #696283)
diff --git a/debian/changelog b/debian/changelog
index d2c804a..3bde711 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+jruby (1.5.6-6) UNRELEASED; urgency=low
+
+ * Team upload.
+ * Apply patch to set FD_CLOEXEC correctly using F_SETFD not F_SETFL.
+ - Thank you to Guillem Jover. (Closes: #696283)
+
+ -- tony mancill <tmancill at debian.org> Mon, 24 Dec 2012 21:39:27 -0800
+
jruby (1.5.6-5) unstable; urgency=medium
* Team upload.
diff --git a/debian/patches/0010-jruby-Set-FD_CLOEXEC-correctly-using-F_SETFD-not-F_S.patch b/debian/patches/0010-jruby-Set-FD_CLOEXEC-correctly-using-F_SETFD-not-F_S.patch
new file mode 100644
index 0000000..7c802c1
--- /dev/null
+++ b/debian/patches/0010-jruby-Set-FD_CLOEXEC-correctly-using-F_SETFD-not-F_S.patch
@@ -0,0 +1,73 @@
+From e6ba288b93628e231dbb1a067b30f6f928be87d5 Mon Sep 17 00:00:00 2001
+From: Guillem Jover <guillem at hadrons.org>
+Date: Tue, 18 Dec 2012 18:33:48 +0100
+Subject: [PATCH] jruby: Set FD_CLOEXEC correctly using F_SETFD not F_SETFL
+
+Using that value on F_SETFL is just wrong, and might make the call fail
+on some systems, as it's requesting to set an undetermined flag. For
+example on GNU/* FD_CLOEXEC has value 1, which matches with O_WRONLY.
+
+This might cause the code to at least leak file descriptors, and at worst
+to terminate execution.
+---
+ lib/ruby/1.8/drb/unix.rb | 2 +-
+ lib/ruby/1.8/webrick/utils.rb | 2 +-
+ lib/ruby/1.9/drb/unix.rb | 2 +-
+ lib/ruby/1.9/webrick/utils.rb | 2 +-
+ 4 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/lib/ruby/1.8/drb/unix.rb b/lib/ruby/1.8/drb/unix.rb
+index 57feed8..90ca292 100644
+--- a/lib/ruby/1.8/drb/unix.rb
++++ b/lib/ruby/1.8/drb/unix.rb
+@@ -100,7 +100,7 @@ module DRb
+ end
+
+ def set_sockopt(soc)
+- soc.fcntl(Fcntl::F_SETFL, Fcntl::FD_CLOEXEC) if defined? Fcntl::FD_CLOEXEC
++ soc.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) if defined? Fcntl::FD_CLOEXEC
+ end
+ end
+
+diff --git a/lib/ruby/1.8/webrick/utils.rb b/lib/ruby/1.8/webrick/utils.rb
+index cf9da6f..1c29ef5 100644
+--- a/lib/ruby/1.8/webrick/utils.rb
++++ b/lib/ruby/1.8/webrick/utils.rb
+@@ -29,7 +29,7 @@ module WEBrick
+
+ def set_close_on_exec(io)
+ if defined?(Fcntl::FD_CLOEXEC)
+- io.fcntl(Fcntl::FD_CLOEXEC, 1)
++ io.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC)
+ end
+ end
+ module_function :set_close_on_exec
+diff --git a/lib/ruby/1.9/drb/unix.rb b/lib/ruby/1.9/drb/unix.rb
+index ebecc22..e56008c 100644
+--- a/lib/ruby/1.9/drb/unix.rb
++++ b/lib/ruby/1.9/drb/unix.rb
+@@ -100,7 +100,7 @@ module DRb
+ end
+
+ def set_sockopt(soc)
+- soc.fcntl(Fcntl::F_SETFL, Fcntl::FD_CLOEXEC) if defined? Fcntl::FD_CLOEXEC
++ soc.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) if defined? Fcntl::FD_CLOEXEC
+ end
+ end
+
+diff --git a/lib/ruby/1.9/webrick/utils.rb b/lib/ruby/1.9/webrick/utils.rb
+index dee9363..677ecb8 100644
+--- a/lib/ruby/1.9/webrick/utils.rb
++++ b/lib/ruby/1.9/webrick/utils.rb
+@@ -29,7 +29,7 @@ module WEBrick
+
+ def set_close_on_exec(io)
+ if defined?(Fcntl::FD_CLOEXEC)
+- io.fcntl(Fcntl::FD_CLOEXEC, 1)
++ io.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC)
+ end
+ end
+ module_function :set_close_on_exec
+--
+1.8.1.rc0
+
diff --git a/debian/patches/series b/debian/patches/series
index 8068527..80310f9 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,4 @@
0007-use-unversioned-jarjar.jar.patch
0008-CVE-2011-4838.patch
0009-CVE-2012-5370.patch
+0010-jruby-Set-FD_CLOEXEC-correctly-using-F_SETFD-not-F_S.patch
--
100% pure-Java implementation of Ruby
More information about the pkg-java-commits
mailing list