New upstream version

This commit is contained in:
Karel Klíč 2010-07-08 13:19:56 +00:00
parent a3d8e00b2b
commit b33ac52a9c
4 changed files with 7 additions and 88 deletions

View File

@ -1 +1 @@
ypbind-mt-1.31.tar.bz2
ypbind-mt-1.32.tar.bz2

View File

@ -1 +1 @@
99383456e3a02cdc0863ecb24b8399e0 ypbind-mt-1.31.tar.bz2
54100619846ad0f428017bf0cb6de2f9 ypbind-mt-1.32.tar.bz2

View File

@ -1,81 +0,0 @@
diff -up ypbind-mt-1.20.4/src/ypbind_dbus_nm.c.matches ypbind-mt-1.20.4/src/ypbind_dbus_nm.c
--- ypbind-mt-1.20.4/src/ypbind_dbus_nm.c.matches 2010-06-22 19:52:43.732020839 +0200
+++ ypbind-mt-1.20.4/src/ypbind_dbus_nm.c 2010-06-22 20:10:55.040016349 +0200
@@ -51,6 +51,17 @@ typedef enum NMState {
#endif
+#define DBUS_MESSAGE_MATCH \
+ "type='signal'," \
+ "interface='" DBUS_INTERFACE_DBUS "'," \
+ "sender='" DBUS_SERVICE_DBUS "'"
+
+#define NM_MESSAGE_MATCH \
+ "type='signal'," \
+ "interface='" NM_DBUS_INTERFACE "'," \
+ "sender='" NM_DBUS_SERVICE "'," \
+ "path='" NM_DBUS_PATH "'"
+
#include "ypbind.h"
#include "log_msg.h"
#include "local.h"
@@ -276,10 +287,7 @@ dbus_init (void)
if (!dbus_connection_add_filter (connection, dbus_filter, NULL, NULL))
goto out;
- dbus_bus_add_match (connection, "type='signal',"
- "interface='" DBUS_INTERFACE_DBUS "',"
- "sender='" DBUS_SERVICE_DBUS "'",
- &error);
+ dbus_bus_add_match (connection, DBUS_MESSAGE_MATCH, &error);
if (dbus_error_is_set (&error))
{
log_msg (LOG_ERR, "Error adding match, %s: %s",
@@ -291,16 +299,17 @@ dbus_init (void)
goto out;
}
- dbus_bus_add_match (connection,
- "type='signal',"
- "interface='" NM_DBUS_INTERFACE "',"
- "sender='" NM_DBUS_SERVICE "',"
- "path='" NM_DBUS_PATH "'", &error);
+ dbus_bus_add_match (connection, NM_MESSAGE_MATCH, &error);
if (dbus_error_is_set (&error))
{
log_msg (LOG_ERR, "Error adding match, %s: %s",
error.name, error.message);
dbus_error_free (&error);
+
+ dbus_bus_remove_match (connection, DBUS_MESSAGE_MATCH, &error);
+ if (dbus_error_is_set (&error)) /* ignore the error */
+ dbus_error_free (&error);
+
dbus_connection_unref (connection);
connection = NULL;
goto out;
@@ -314,6 +323,24 @@ dbus_init (void)
if (!check_for_nm (connection))
{
/* NetworkManager not in use. */
+
+ /* The matches must be removed here. When dbus_init() is
+ called repeatedly without removing matches, it starts to
+ report errors:
+ Error adding match, org.freedesktop.DBus.Error.LimitsExceeded:
+ Connection ":1.0" is not allowed to add more match rules
+ */
+ dbus_bus_remove_match (connection, DBUS_MESSAGE_MATCH, &error);
+ if (dbus_error_is_set (&error))
+ {
+ /* ignore the error, most likely it is MatchRuleNotFound. */
+ dbus_error_free (&error);
+ }
+
+ dbus_bus_remove_match (connection, NM_MESSAGE_MATCH, &error);
+ if (dbus_error_is_set (&error))
+ dbus_error_free (&error);
+
dbus_connection_unref (connection);
is_online = 1;
return 0;

View File

@ -1,7 +1,7 @@
Summary: The NIS daemon which binds NIS clients to an NIS domain
Name: ypbind
Version: 1.31
Release: 7%{?dist}
Version: 1.32
Release: 1%{?dist}
License: GPLv2
Group: System Environment/Daemons
Source0: ftp://ftp.us.kernel.org/pub/linux/utils/net/NIS/ypbind-mt-%{version}.tar.bz2
@ -9,8 +9,6 @@ Url: http://www.linux-nis.org/nis/ypbind-mt/index.html
Source1: ypbind.init
Source2: nis.sh
Patch1: ypbind-1.11-gettextdomain.patch
# Sent to upstream.
Patch2: ypbind-mt-1.31-matches.patch
Requires(post): chkconfig
Requires(preun): chkconfig
# This is for /sbin/service
@ -40,7 +38,6 @@ also need to install the ypserv package to a machine on your network.
%prep
%setup -q -n ypbind-mt-%{version}
%patch1 -p1 -b .gettextdomain
%patch2 -p1 -b .matches
%build
%configure --enable-dbus-nm
@ -82,6 +79,9 @@ fi
%doc README NEWS COPYING
%changelog
* Thu Jul 8 2010 Karel Klic <kklic@redhat.com> - 3:1.32-1
- Update to new version which contains the -matches.patch
* Wed Jun 23 2010 Karel Klic <kklic@redhat.com> - 3:1.31-7
- Added -matches.patch removing matches when dereferencing
DBus connection.