diff options
author | Cosimo Alfarano <cosimo.alfarano@collabora.com> | 2013-08-23 01:11:10 +0200 |
---|---|---|
committer | Ralf Habacker <ralf.habacker@freenet.de> | 2013-08-23 01:20:34 +0200 |
commit | 600621dbc8073527a958091316eddfbb490c1032 (patch) | |
tree | ede116828e6715785294886e33b2726cb8764a47 /bus | |
parent | 36bb2125d1dbca0ee30fbe29090c4a6a7be37854 (diff) | |
download | dbus-600621dbc8073527a958091316eddfbb490c1032.tar.gz |
Factor out DBusAuthorization from DBusTransport
In order to authorize/reject a connection in a polite way, instead of
cutting it off after authentication succeed and Hello() is
sent, because authorization failed, we need to factor out some
authorization bits from DBusTransport and pass them to DBusAuth.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39720
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Diffstat (limited to 'bus')
-rw-r--r-- | bus/driver.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/bus/driver.c b/bus/driver.c index 23197e43..564cecb4 100644 --- a/bus/driver.c +++ b/bus/driver.c @@ -1535,6 +1535,7 @@ bus_driver_handle_get_connection_credentials (DBusConnection *connection, DBusMessageIter reply_iter; DBusMessageIter array_iter; unsigned long ulong_val; + char *windows_sid; const char *service; _DBUS_ASSERT_ERROR_IS_CLEAR (error); @@ -1569,6 +1570,16 @@ bus_driver_handle_get_connection_credentials (DBusConnection *connection, goto oom; } + if (dbus_connection_get_windows_user (conn, &windows_sid)) + { + if (!_dbus_asv_add_string (&array_iter, "WindowsSID", windows_sid)) + { + dbus_free(windows_sid); + goto oom; + } + dbus_free(windows_sid); + } + if (!_dbus_asv_close (&reply_iter, &array_iter)) goto oom; |