rpms/dbus/devel dbus-inotify-fd-leak.patch, NONE, 1.1 dbus.spec, 1.167, 1.168

Matthias Clasen mclasen at fedoraproject.org
Sat Jun 27 22:57:34 UTC 2009


Author: mclasen

Update of /cvs/pkgs/rpms/dbus/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv19586

Modified Files:
	dbus.spec 
Added Files:
	dbus-inotify-fd-leak.patch 
Log Message:
don't leak inotify fd


dbus-inotify-fd-leak.patch:

--- NEW FILE dbus-inotify-fd-leak.patch ---
diff -u -r dbus-1.2.14/bus/dir-watch-inotify.c dbus-1.2.14.fd-leak/bus/dir-watch-inotify.c
--- dbus-1.2.14/bus/dir-watch-inotify.c	2009-04-17 15:45:29.000000000 -0400
+++ dbus-1.2.14.fd-leak/bus/dir-watch-inotify.c	2009-06-27 18:38:54.966881736 -0400
@@ -98,7 +98,11 @@
   _dbus_assert (dir != NULL);
 
   if (inotify_fd == -1) {
+#ifdef HAVE_INOTIFY_INIT1
+     inotify_fd = inotify_init1 (IN_CLOEXEC);
+#else
      inotify_fd = inotify_init ();
+#endif
      if (inotify_fd <= 0) {
       _dbus_warn ("Cannot initialize inotify\n");
       goto out;
diff -u -r dbus-1.2.14/configure.in dbus-1.2.14.fd-leak/configure.in
--- dbus-1.2.14/configure.in	2009-05-06 12:51:19.000000000 -0400
+++ dbus-1.2.14.fd-leak/configure.in	2009-06-27 18:37:10.787645299 -0400
@@ -983,7 +983,7 @@
 dnl check if inotify backend is enabled
 if test x$have_inotify = xyes; then
    AC_DEFINE(DBUS_BUS_ENABLE_INOTIFY,1,[Use inotify])
-
+   AC_CHECK_FUNCS(inotify_init1)
 fi
 
 AM_CONDITIONAL(DBUS_BUS_ENABLE_INOTIFY, test x$have_inotify = xyes)


Index: dbus.spec
===================================================================
RCS file: /cvs/pkgs/rpms/dbus/devel/dbus.spec,v
retrieving revision 1.167
retrieving revision 1.168
diff -u -p -r1.167 -r1.168
--- dbus.spec	7 May 2009 20:56:32 -0000	1.167
+++ dbus.spec	27 Jun 2009 22:57:02 -0000	1.168
@@ -9,7 +9,7 @@ Summary: D-BUS message bus
 Name: dbus
 Epoch: 1
 Version: 1.2.14
-Release: 1%{?dist}
+Release: 2%{?dist}
 URL: http://www.freedesktop.org/software/dbus/
 Source0: http://dbus.freedesktop.org/releases/dbus/%{name}-%{version}.tar.gz
 Source1: doxygen_to_devhelp.xsl
@@ -41,6 +41,8 @@ Conflicts: cups < 1:1.1.20-4
 Patch0: start-early.patch
 Patch1: dbus-1.0.1-generate-xml-docs.patch
 Patch6: dbus-1.2.1-increase-timeout.patch
+# https://bugs.freedesktop.org/show_bug.cgi?id=22516
+Patch7: dbus-inotify-fd-leak.patch
 
 %description
 D-BUS is a system for sending messages between applications. It is
@@ -63,7 +65,7 @@ Requires: %name = %{epoch}:%{version}-%{
 Requires: devhelp
 BuildArch: noarch
 
-%description doc 
+%description doc
 This package contains developer documentation for D-Bus along with
 other supporting documentation such as the introspect dtd file.
 
@@ -96,6 +98,7 @@ in this separate package so server syste
 %patch0 -p1 -b .start-early
 %patch1 -p1 -b .generate-xml-docs
 %patch6 -p1 -b .increase-timeout
+%patch7 -p1 -b .inotify-fd-leak
 
 autoreconf -f -i
 
@@ -157,7 +160,7 @@ rm -rf %{buildroot}
 %post libs -p /sbin/ldconfig
 
 %post
-/sbin/chkconfig --add messagebus 
+/sbin/chkconfig --add messagebus
 /sbin/chkconfig messagebus resetpriorities
 
 %preun
@@ -227,6 +230,9 @@ fi
 %{_includedir}/*
 
 %changelog
+* Sat Jun 27 2009 Matthias Clasen <mclasen at redhat.com> - 1:1.2.14-2
+- Don't leak inotify fd (#505338)
+
 * Wed Apr 22 2009 Colin Walters <walters at verbum.org> - 1:1.2.14-1
 - CVE-2009-1189
   * Update to 1.2.14




More information about the fedora-extras-commits mailing list