diff -u dbus-1.1.20/debian/changelog dbus-1.1.20/debian/changelog --- dbus-1.1.20/debian/changelog +++ dbus-1.1.20/debian/changelog @@ -1,3 +1,9 @@ +dbus (1.1.20-1ubuntu2) hardy; urgency=low + + * Make inotify backend less aggressive. (LP: #221834) + + -- John Carr Thu, 01 May 2008 22:34:36 +0100 + dbus (1.1.20-1ubuntu1) hardy; urgency=low * New upstream release: Tons of bug fixes, a security fix (CVE-2008-0595), only in patch2: unchanged: --- dbus-1.1.20.orig/debian/patches/82-fixmonitor.patch +++ dbus-1.1.20/debian/patches/82-fixmonitor.patch @@ -0,0 +1,30 @@ +diff -p -up dbus-1.1.20/bus/dir-watch-inotify.c.fixmonitor dbus-1.1.20/bus/dir-watch-inotify.c +--- dbus-1.1.20/bus/dir-watch-inotify.c.fixmonitor 2008-03-27 10:02:23.000000000 +0100 ++++ dbus-1.1.20/bus/dir-watch-inotify.c 2008-03-27 10:18:07.000000000 +0100 +@@ -64,7 +64,7 @@ _handle_inotify_watch (DBusWatch *watch, + + ret = read (inotify_fd, buffer, INOTIFY_BUF_LEN); + if (ret < 0) +- _dbus_verbose ("Error reading inotify event: '%s'\n, _dbus_strerror(errno)"); ++ _dbus_verbose ("Error reading inotify event: '%s'\n", _dbus_strerror(errno)); + else if (!ret) + _dbus_verbose ("Error reading inotify event: buffer too small\n"); + +@@ -134,7 +134,7 @@ bus_watch_directory (const char *dir, Bu + goto out; + } + +- wd = inotify_add_watch (inotify_fd, dir, IN_MODIFY | IN_CREATE | IN_DELETE); ++ wd = inotify_add_watch (inotify_fd, dir, IN_CLOSE_WRITE | IN_DELETE | IN_MOVED_TO | IN_MOVED_FROM); + if (wd < 0) + { + _dbus_warn ("Cannot setup inotify for '%s'; error '%s'\n", dir, _dbus_strerror (errno)); +@@ -156,7 +156,7 @@ bus_drop_all_directory_watches (void) + _dbus_verbose ("Dropping all watches on config directories\n"); + ret = close (inotify_fd); + if (ret) +- _dbus_verbose ("Error dropping watches: '%s'\n", perror(ret)); ++ _dbus_verbose ("Error dropping watches: '%s'\n", _dbus_strerror(errno)); + + num_wds = 0; + inotify_fd = -1;