* dbus/dbus-tranport.c (auth_via_default_rules): made the verbose spam cross-platform
authorRalf Habacker <ralf.habacker@freenet.de>
Thu, 21 Jun 2007 21:58:36 +0000 (21:58 +0000)
committerRalf Habacker <ralf.habacker@freenet.de>
Thu, 21 Jun 2007 21:58:36 +0000 (21:58 +0000)
ChangeLog
dbus/dbus-transport.c

index 0fc6e9e..58cb591 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2007-06-21  Havoc Pennington  <hp@redhat.com>
 
+       * dbus/dbus-tranport.c (auth_via_default_rules): made the verbose spam
+       cross-platform
+
+2007-06-21  Havoc Pennington  <hp@redhat.com>
+
        * dbus/dbus-watch.c (dbus_watch_get_fd): 1) its behavior should
        not be the same as before, the ABI has never been declared stable
        on Windows and 2) do not commit to cross-platform files without
index d78727c..1d8a5e6 100644 (file)
@@ -619,21 +619,31 @@ auth_via_default_rules (DBusTransport *transport)
       _dbus_credentials_same_user (our_identity,
                                    auth_identity))
     {
-      /* FIXME the verbose spam here is unix-specific */                  
-      _dbus_verbose ("Client authorized as UID "DBUS_UID_FORMAT
-                     " matching our UID "DBUS_UID_FORMAT"\n",
-                     _dbus_credentials_get_unix_uid(auth_identity),
-                     _dbus_credentials_get_unix_uid(our_identity));
+      if (_dbus_credentials_include(our_identity,DBUS_CREDENTIAL_WINDOWS_SID))
+          _dbus_verbose ("Client authorized as SID '%s'"
+                         "matching our SID '%s'\n",
+                         _dbus_credentials_get_windows_sid(auth_identity),
+                         _dbus_credentials_get_windows_sid(our_identity));
+      else
+          _dbus_verbose ("Client authorized as UID "DBUS_UID_FORMAT
+                         " matching our UID "DBUS_UID_FORMAT"\n",
+                         _dbus_credentials_get_unix_uid(auth_identity),
+                         _dbus_credentials_get_unix_uid(our_identity));
       /* We have authenticated! */
       allow = TRUE;
     }
   else
     {
-      /* FIXME the verbose spam here is unix-specific */
-      _dbus_verbose ("Client authorized as UID "DBUS_UID_FORMAT
-                     " but our UID is "DBUS_UID_FORMAT", disconnecting\n",
-                     _dbus_credentials_get_unix_uid(our_identity),
-                     _dbus_credentials_get_unix_uid(our_identity));
+      if (_dbus_credentials_include(our_identity,DBUS_CREDENTIAL_WINDOWS_SID))
+          _dbus_verbose ("Client authorized as SID '%s'"
+                         " but our SID is '%s', disconnecting\n",
+                         _dbus_credentials_get_windows_sid(our_identity),
+                         _dbus_credentials_get_windows_sid(our_identity));
+      else
+          _dbus_verbose ("Client authorized as UID "DBUS_UID_FORMAT
+                         " but our UID is "DBUS_UID_FORMAT", disconnecting\n",
+                         _dbus_credentials_get_unix_uid(our_identity),
+                         _dbus_credentials_get_unix_uid(our_identity));
       _dbus_transport_disconnect (transport);
       allow = FALSE;
     }