summaryrefslogtreecommitdiff
path: root/dbus
diff options
context:
space:
mode:
authorCosimo Alfarano <cosimo.alfarano@collabora.com>2013-08-23 01:56:48 +0200
committerRalf Habacker <ralf.habacker@freenet.de>2013-08-23 03:55:10 +0200
commit64e50dd167993fb2344d2d3be18bb0d5820b5b26 (patch)
tree4d7e9158a60c65fd8c4337f07d80eb04cd3e794c /dbus
parent5fcba306d9e4a9caf137e1550eacd566a7428944 (diff)
downloaddbus-64e50dd167993fb2344d2d3be18bb0d5820b5b26.tar.gz
Remove transport's call to _dbus_authorization_do_authorization().
All mechs do authorization before answering OK/REJECT. There is no reason to run a second round of authorization which will return the same answer of the first time (when OK) or will never be reched (if REJECTed). Bug: http://bugs.freedesktop.org/show_bug.cgi?id=39720 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Diffstat (limited to 'dbus')
-rw-r--r--dbus/dbus-transport.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/dbus/dbus-transport.c b/dbus/dbus-transport.c
index db16574a..da95d2c2 100644
--- a/dbus/dbus-transport.c
+++ b/dbus/dbus-transport.c
@@ -589,9 +589,6 @@ _dbus_transport_try_to_authenticate (DBusTransport *transport)
if (transport->disconnected)
return FALSE;
- /* paranoia ref since we call user callbacks sometimes */
- _dbus_connection_ref_unlocked (transport->connection);
-
maybe_authenticated =
(!(transport->send_credentials_pending ||
transport->receive_credentials_pending));
@@ -623,32 +620,12 @@ _dbus_transport_try_to_authenticate (DBusTransport *transport)
_dbus_verbose ("Client expected GUID '%s' and we got '%s' from the server\n",
transport->expected_guid, server_guid);
_dbus_transport_disconnect (transport);
- _dbus_connection_unref_unlocked (transport->connection);
return FALSE;
}
}
- /* If we're the server, see if we want to allow this identity to proceed.
- */
- if (maybe_authenticated && transport->is_server)
- {
- DBusCredentials *auth_identity;
-
- auth_identity = _dbus_auth_get_identity (transport->auth);
- _dbus_assert (auth_identity != NULL);
-
- /* If we have an authenticated user, delegate deciding whether auth
- * credentials are good enough to the app */
- if (!_dbus_authorization_do_authorization (transport->authorization, auth_identity))
- {
- _dbus_transport_disconnect (transport);
- maybe_authenticated = FALSE;
- }
- }
-
transport->authenticated = maybe_authenticated;
- _dbus_connection_unref_unlocked (transport->connection);
return maybe_authenticated;
}
}