diff options
author | Ralf Habacker <ralf.habacker@freenet.de> | 2007-06-21 21:58:36 +0000 |
---|---|---|
committer | Ralf Habacker <ralf.habacker@freenet.de> | 2007-06-21 21:58:36 +0000 |
commit | 62c638249ecc1a3ae3e4388fc9f4a45a80e34587 (patch) | |
tree | 12377e112d6c7e612eb4280b368cb71003869ee7 | |
parent | ee721d13c455b5780af5989662ff7fca68374327 (diff) |
* dbus/dbus-tranport.c (auth_via_default_rules): made the verbose spam cross-platform
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | dbus/dbus-transport.c | 30 |
2 files changed, 25 insertions, 10 deletions
@@ -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 diff --git a/dbus/dbus-transport.c b/dbus/dbus-transport.c index d78727cf..1d8a5e6c 100644 --- a/dbus/dbus-transport.c +++ b/dbus/dbus-transport.c @@ -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; } |