[maemo-commits] [maemo-commits] r17313 - in projects/haf/trunk/dbus/debian: . patches

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Wed Jan 28 19:58:32 EET 2009
Author: guillem
Date: 2009-01-28 19:58:31 +0200 (Wed, 28 Jan 2009)
New Revision: 17313

Modified:
   projects/haf/trunk/dbus/debian/changelog
   projects/haf/trunk/dbus/debian/patches/07-open-match-detection.patch
Log:
Add pid and uid to the open match warning on syslog

Fixes: NB#99319


Modified: projects/haf/trunk/dbus/debian/changelog
===================================================================
--- projects/haf/trunk/dbus/debian/changelog	2009-01-28 17:01:34 UTC (rev 17312)
+++ projects/haf/trunk/dbus/debian/changelog	2009-01-28 17:58:31 UTC (rev 17313)
@@ -1,3 +1,9 @@
+dbus (1.2.12-0maemo2) UNRELEASED; urgency=low
+
+  * Add pid and uid to the open match warning on syslog. Fixes: NB#99319
+
+ -- Guillem Jover <guillem.jover at nokia.com>  Wed, 28 Jan 2009 19:55:36 +0200
+
 dbus (1.2.12-0maemo1) unstable; urgency=low
 
   * New upstream release.

Modified: projects/haf/trunk/dbus/debian/patches/07-open-match-detection.patch
===================================================================
--- projects/haf/trunk/dbus/debian/patches/07-open-match-detection.patch	2009-01-28 17:01:34 UTC (rev 17312)
+++ projects/haf/trunk/dbus/debian/patches/07-open-match-detection.patch	2009-01-28 17:58:31 UTC (rev 17313)
@@ -1,8 +1,8 @@
 Index: b/bus/connection.c
 ===================================================================
---- a/bus/connection.c	2008-04-04 18:24:08.000000000 +0300
-+++ b/bus/connection.c	2008-06-09 20:12:25.000000000 +0300
-@@ -1254,6 +1254,18 @@ bus_connection_get_n_services_owned (DBu
+--- a/bus/connection.c
++++ b/bus/connection.c
+@@ -1332,6 +1332,18 @@ bus_connection_get_n_services_owned (DBu
    return d->n_services_owned;
  }
  
@@ -23,9 +23,9 @@
  			 const DBusString *name,
 Index: b/bus/connection.h
 ===================================================================
---- a/bus/connection.h	2008-04-04 18:24:08.000000000 +0300
-+++ b/bus/connection.h	2008-06-09 20:12:25.000000000 +0300
-@@ -96,6 +96,7 @@ void        bus_connection_remove_owned_
+--- a/bus/connection.h
++++ b/bus/connection.h
+@@ -97,6 +97,7 @@ void        bus_connection_remove_owned_
  void        bus_connection_add_owned_service_link (DBusConnection *connection,
                                                     DBusList       *link);
  int         bus_connection_get_n_services_owned   (DBusConnection *connection);
@@ -35,8 +35,8 @@
  dbus_bool_t bus_connection_complete (DBusConnection               *connection,
 Index: b/bus/signals.c
 ===================================================================
---- a/bus/signals.c	2008-04-04 18:24:08.000000000 +0300
-+++ b/bus/signals.c	2008-06-09 20:12:25.000000000 +0300
+--- a/bus/signals.c
++++ b/bus/signals.c
 @@ -24,6 +24,7 @@
  #include "services.h"
  #include "utils.h"
@@ -109,20 +109,25 @@
          }
        else
          {
-@@ -993,6 +1009,26 @@ bus_match_rule_parse (DBusConnection   *
+@@ -993,6 +1009,31 @@ bus_match_rule_parse (DBusConnection   *
        ++i;
      }
    
 +  if (!method_type_is && !sender_is && !interface_is && !member_is
 +      && !path_is && !arg_is) {
 +      const DBusList *list, *link = NULL;
++      unsigned long pid = 0, uid = 0;
++
 +      list = bus_connection_get_services(matches_go_to);
++      dbus_connection_get_unix_process_id(matches_go_to, &pid);
++      dbus_connection_get_unix_user(matches_go_to, &uid);
 +
 +      openlog("D-Bus daemon", LOG_PID | LOG_CONS, LOG_DAEMON);
-+      syslog(LOG_DAEMON | LOG_WARNING, "WARNING: match %s added by %s"
-+             " who owns services:",
++      syslog(LOG_DAEMON | LOG_WARNING,
++             "WARNING: match %s added by %s (pid=%lu, uid=%lu) who owns services:",
 +             _dbus_string_get_data(rule_text),
-+             bus_connection_get_name(matches_go_to));
++             bus_connection_get_name(matches_go_to),
++             pid, uid);
 +      if (list != NULL)
 +        link = _dbus_list_get_first_link(&list);
 +      while (link != NULL) {


More information about the maemo-commits mailing list