Your message dated Fri, 01 Nov 2013 17:03:37 +0000
with message-id <e1vci8h-0006tf...@franck.debian.org>
and subject line Bug#696283: fixed in jruby 1.5.6-6
has caused the Debian Bug report #696283,
regarding jruby: Sets FD_CLOEXEC incorrectly with F_SETFL instead of F_SETFD
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
696283: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=696283
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Source: jruby
Version: 1.5.6-5
Severity: important
Tags: patch
User: debian-...@lists.debian.org
Usertags: fcntl-fd-cloexec

Hi!

This package contains code that tries to set the FD_CLOEXEC flag for a
file descriptor, but it does using F_SETFL instead of F_SETFD.

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.

Attached a patch fixing this. (I've filed bug reports for the ruby 1.8
and 1.9.1 parts on their relative packages too.)

Thanks,
Guillem
From e6ba288b93628e231dbb1a067b30f6f928be87d5 Mon Sep 17 00:00:00 2001
From: Guillem Jover <guil...@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


--- End Message ---
--- Begin Message ---
Source: jruby
Source-Version: 1.5.6-6

We believe that the bug you reported is fixed in the latest version of
jruby, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 696...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
gregor herrmann <gre...@debian.org> (supplier of updated jruby package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Fri, 01 Nov 2013 17:55:29 +0100
Source: jruby
Binary: jruby
Architecture: source all
Version: 1.5.6-6
Distribution: unstable
Urgency: low
Maintainer: Debian Java Maintainers 
<pkg-java-maintainers@lists.alioth.debian.org>
Changed-By: gregor herrmann <gre...@debian.org>
Description: 
 jruby      - 100% pure-Java implementation of Ruby
Closes: 696283 713159
Changes: 
 jruby (1.5.6-6) unstable; urgency=low
 .
   * Team upload.
 .
   [ tony mancill ]
   * Apply patch to set FD_CLOEXEC correctly using F_SETFD not F_SETFL.
     - Thank you to Guillem Jover. (Closes: #696283)
 .
   [ gregor herrmann ]
   * Apply all changes from the Ubuntu package:
     - Depend on default-jre.
     - Add patch 0011-java7-compat.patch. Fix build issue with OpenJDK 7.
       Thanks, Julian Taylor.
     - Add patch 0012-nailgun.patch. Use unversioned nailgun.jar.
       Thanks, Julian Taylor.
       Change re the Ubuntu version: nailgun.jar instead of nailgun-0.9.0.jar.
       (Closes: #713159)
   * debian/control: use canonical URLs for Vcs-*.
   * Declare compliance with Debian Policy 3.9.5.
Checksums-Sha1: 
 2ea65746d8a69ac499dc7ba29b011b1a77163de9 2294 jruby_1.5.6-6.dsc
 2e91d2b0f6a088cc402f5bb39b8ab8ff9fff10b9 37558 jruby_1.5.6-6.debian.tar.gz
 de2d5ac8667ae2955cd0765e5ddc491873995aaa 7746018 jruby_1.5.6-6_all.deb
Checksums-Sha256: 
 2db4e0bc214387695a07ff107c3709e8ac08c1efd6197bf2390148927546d6d0 2294 
jruby_1.5.6-6.dsc
 9c298489289c9773d3863339a1677639ee2cfa3f43b3c006c5f2c837cfb8e632 37558 
jruby_1.5.6-6.debian.tar.gz
 4d689b72574b886e73dba2e80adbc3fdc34cb54b25f5582b6b6d4dc011a1c636 7746018 
jruby_1.5.6-6_all.deb
Files: 
 63ef42772edaccdbe3e167d30372e091 2294 ruby optional jruby_1.5.6-6.dsc
 337f2ca2d7763954324e7f57d982e29b 37558 ruby optional 
jruby_1.5.6-6.debian.tar.gz
 ef0a846b33b24661db39f6aaa9da8fda 7746018 ruby optional jruby_1.5.6-6_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (GNU/Linux)

iQIcBAEBCAAGBQJSc94GAAoJELs6aAGGSaoGE3QP/0jV9oSlLNOG/SMfFBtFVXBM
xwxw8KWemPy768I3K/h+wMabQ5CrvVYBPi7PivQQ7DCSn6oarXJw0w404LUo8qUq
az0D3wprHtQQggfYrsax56yk2ug61I4nIfsEElyRKu1lDbXM7zaSRYNBdyqxnvsU
3LT9IabASskc2+TTEZzX1vLvsnOmlkh5oB37YINHsIxw3qVR0oFPBOtY4NwHqa5Q
TO+YGf3z60Fu58dL9S/WjhdlpraLFqS8qM3fjiTUyG6QqbzualNI+Rh8pzK0SkU/
JcOpaub8HVij36iFjD6CXsRLpaVLbZUQxui5bJBipL80u87VYi+oSJRmkC9uIzAd
EDOZaOLqQLIRJ1Ry7FmQwm2ObVJLGJNmbqcFRPf7y9lSkhqHarKd8qHLXyxve2pI
KOcRAjEksCYrhhn/feLCSDeUssZVuwFF7TqrnvjF1Re9evc/acA3X/WcZVk1MSmP
Okj+QbPWNepQPk4sYsRB7Cm3At/z2MjTOe5M2MxQV4ORRIiZS7dOJmdCYUWoA7dY
mq7aG2+lFKMGHwOf+7I3Z19SsDDZfeXOTL1IzZ48mU5uC38JaVLwyCTCywjNJcyR
FsRABmdFn8kTkgiPM8pmOZf6txtkrme+JQ+Nv40/jyGy9d1qpoAib4dWrUE+dtHg
psUpddpWy1wyzHZGkbGZ
=LDAS
-----END PGP SIGNATURE-----

--- End Message ---
__
This is the maintainer address of Debian's Java team
<http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-maintainers>. 
Please use
debian-j...@lists.debian.org for discussions and questions.

Reply via email to